Skip to content

erickfunier/SuperMarioAI

Repository files navigation

SuperMarioAI

Made by Erick Santos

This code contains a Player created with Machine Learning and Neural Network who can play the state YoshiIsland2 from Super Mario World - SNES.

YouTube video from the winner genoma during training: https://youtu.be/zrWIRNy16BI

The neat takes three generations of genomas, with 150 genomas. The winner from Gen 3 was the id 377.

The folder train-codes contains all saves from neat, but you can train changing the parameters to improve the results.

Running the application

To run the winner and the application you can follow the below instructions:

Dependencies

Python 3.7

gym-retro

Gym 0.21.0

ImportLib Metadata 4.8.1

Install Instructions

Uses Python 3.7

Install Gym Retro

pip install gym-retro

Install Gym version 0.21.0

pip install gym==0.21.0

Install ImportLib Metadata 4.8.1

pip install importlib-metadata==4.8.1

Install OpenCV

pip install opencv-python

Install Neat

pip install neat-python

Import the ROM to your Gym Retro

python -m retro.import <completed-folder-rom>

Example:

python -m retro.import "C:\Users\Erick\Desktop\Super Mario Brother\rom"

Running the application

Run the python play.py to view the gameplay

python play.py

Enjoy

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages