This project uses stable-retro, a modern fork of openai gym-retro

Agent playing Sonic after 1 million training steps
This project trains an AI agent to play Sonic the Hedgehog using Proximal Policy Optimization (PPO) from Stable Baselines3. The agent was trained for 1 million timesteps on the Sonic and Knuckles Genesis game.
A video of an unedited run with three lifes can be found here
This project uses python 3.10
uv venv -p 3.10 # Creates virtual environment (Python 3.10)
source .venv/bin/activate # Linux/Mac
uv syncpip install -r requirements.txtAfter installing stable-retro, import the rom:
python -m retro.import ./rompython training.pypython record.py