Skip to content

Updating the reinforcement learning project to focus on speedrunning milestones

License

Notifications You must be signed in to change notification settings

gendestus/PokemonRedAISpeedrun

Repository files navigation

Pokemon Red RL

Experiments training reinforcement learning agents to play Pokemon Red.
Watch the Video on Youtube!

To run the pretrained model locally:

  1. Copy your legally obtained Pokemon Red ROM into the base directory. You can find this using google, it should be 1MB. Rename it to PokemonRed.gb if it is not already.
  2. Move into the baselines/ directory:
    cd baselines
  3. Install dependencies:
    pip install -r requirements.txt
    It may be necessary in some cases to separately install the SDL libraries.
  4. Run:
    python run_pretrained_interactive.py

Interact with the emulator using the arrow keys and the a and s keys (A and B buttons).
You can pause the AI's input during the game by editing agent_enabled.txt

To train the model (requires a lot of cpu cores and memory):

  1. Previous steps 1-3
  2. Run:
    python run_baseline_parallel.py

Tracking training progress

You can view the current state of each emulator, plot basic stats, and compare to previous runs using the VisualizeProgress.ipynb notebook.

Extra

Map visualization code can be found in visualization/ directory.

About

Updating the reinforcement learning project to focus on speedrunning milestones

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 98.1%
  • Python 1.9%