A Python program to play the first or second level of Donkey Kong Country (SNES, 1996), Jungle Hijinks or Ropey Rampage, using the genetic algorithm NEAT (NeuroEvolution of Augmenting Topologies) and Gymnasium, a maintained fork of OpenAI's Gym.
Requires a valid ROM file (.sfc
) of Donkey Kong Country, USA version, Rev 2 (SHA-1 sum: cd606e77ab2034438e06891cd2d067dad69b4d1a).
Please check that you have this specific ROM version, as other versions of Donkey Kong may not work.
pyenv must be installed, as well as Python version 3.8 (through pyenv). Details for how this may be done can be seen here.
Prerequisites are viewable in requirements.txt
.
Clone with:
git clone https://github.com/talhaahussain/Donkey-Kong-NEAT.git dkc-neat
cd dkc-neat/
Install prerequisites with:
. install.sh
or alternatively:
pip install -r requirements.txt
The NEAT algorithm can be configured using config_feedforward.txt
. More information on how to do this can be seen here, at NEAT-Python’s documentation.
Run with:
python dkc-retro.py
This project does not infringe on any intellectual property. Always obtain ROMs from an authentic and legal source - piracy is a crime.