Infinite platformer runner AI built using NeuroEvolution of Augmenting Topologies (NEAT).
There are a few librarier that need to be installed in order for the app to work.
npm install npm@latest -g
-
Clone the repo
git clone https://github.com/andreiec/mario-runner-ai.git
-
Install NPM packages
npm install
Mario Runner is built upon NEAT. A very simple to understand workflow of the algorithm is the following
- Generate the initial population of players with random genomes
- Since they are built randomly, some players might get further than others
- Get the highest scoring players and breed their genomes to get the next generation
- Generate the same amount of players, but with the new and improved genomes
- Let them run until there are no more players
- Loop through steps 3-5
There are 3 values used for player input and one for the output (jump button)
- Distance to the next pipe
- Next pipe type
- Y-position of player
H
- Display HUD for generation information
K
- Kill all current players and move to next generation
Distributed under the MIT License. See LICENSE
for more information.