/SuperMarioAI

Primary LanguageJupyter NotebookGNU General Public License v2.0GPL-2.0

SuperMarioAI

An AI which plays Super Mario

About Git

To clone the repository

git clone https://github.com/LauBok/SuperMarioAI.git

To commit a change

You should first make sure your current directory is the repository directory.

git add file # for files not tracked
git commit -m "message"

To push or pull

git pull
git push # Make sure to commit before push

To set up a new branch

git branch branch_name

To move to some branch

git checkout branch_name

If you want to set up a new branch and move to that branch, you can write together as

git checkout -b branch_name

To merge a branch to master

git checkout master
git merge branch_name

To delete a branch

If you have successfully merged from a branch, you may not need it anymore. You can delete the branch via this instruction.

git branch -d branch_name

To resolve a conflict

If there is a conflict in the merge process, you can check the status.

git status

Then, you can resolve the conflict and use git add to mark it as resolved. You can also use git mergetool to open a GUI for resolving merge conflicts.

Install the environment

The preferred installation is through pip:

pip install gym-super-mario-bros

Then you can check whether it has been successfully installed by running this line in bash:

gym_super_mario_bros -e 'SuperMarioBros-v0' -m 'random'

Install Tensorflow

You can install tensorflow through pip if your pip version is $>19.0$:

pip install tensorflow

Otherwise, you may want to first upgrade your pip.

pip install --upgrade pip

References