Skip to content

A neural network that learns to emulate your play on SpeedRunners

License

Notifications You must be signed in to change notification settings

Chainso/SpeedRunnersAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpeedRunnersAI

SpeedRunnersAI learns to play SpeedRunners only using images from the screen. The AI can be trained from your own demonstrations, and using reinforcement learning.

 

Dependencies

The following dependencies are all required to run the program. They can be installed using pip or Anaconda.

PyUserInput
H5PY
PyTorch
Numpy
MSS
OpenCV

 

Setup

Set up your key bindings in the config.ini file. Model parameters can be altered in train_model_supervised.py, and train_model_reinforcement.py.

 

Recording Gameplay

Run record_gameplay.py and open your SpeedRunners game. Using the keybindings set in config.ini, start and stop recording.

 

Training the Model

To train the model only using your recorded samples, run train_model_supervised.py. To train the model using reinforcement learning and supervised learning (MAIL algorithm), run train_model_reinforcement.py. For training using reinforcement learning, make sure to run the game offline.

 

Running the Model

To run the model on the game, run run_model.py and use the keybindings to start and stop the agent.

About

A neural network that learns to emulate your play on SpeedRunners

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages