This project aims to train a machine learning model to play Super Mario Bros. using reinforcement learning techniques. The core of this project is the MarioRL.ipynb
Jupyter notebook, which contains the implementation of the reinforcement learning algorithms and the environment setup for the game.
The MarioRL.ipynb
notebook is designed to:
- Set up the game environment using Gym.
- Implement a reinforcement learning model, specifically a Proximal Policy Optimization (PPO) agent, to learn how to play the game.
- Train the model to navigate through the game levels, collecting coins and avoiding enemies.
- Evaluate the model's performance and visualize its learning progress.
To run the MarioRL.ipynb
notebook, you need to have the following prerequisites installed:
- Python 3.6 or higher
- Jupyter Notebook
- TensorFlow or PyTorch for the reinforcement learning model
- Gym for the game environment
The project requires the following Python packages:
- gym
- tensorflow or torch
- numpy
- matplotlib (for visualization)
You can install these dependencies using pip:
pip install gym tensorflow numpy matplotlib
- Open the
MarioRL.ipynb
notebook in Jupyter Notebook. - Run the notebook cells in order. The first few cells import necessary libraries and set up the environment.
- The notebook then defines the reinforcement learning model and the game environment.
- Proceed with training the model by running the training cells. This process may take some time depending on the complexity of the model and the number of training iterations.
- Finally, evaluate the model's performance and visualize its learning progress.
Contributions to this project are welcome. Please feel free to submit a pull request or open an issue if you encounter any problems or have suggestions for improvement.
For any questions or inquiries, please contact the project maintainer at abdulwadoodwaseem@gmail.com.