Super Mario's Bros: AI-Powered Game Mastery
Explore the docs »
·
View Presentation »
·
Check Project Paper »
Table of Contents
Our project focuses on training an AI agent to play the popular game Super Mario Bros using reinforcement learning techniques. To accomplish this, we utilized the gym open-ai platform, which provides a standardized environment for testing and evaluating machine learning algorithms. One of the key components of our approach is the use of Q-learning, a popular reinforcement learning algorithm, to train the agent. Additionally, we utilize a convolutional neural network (CNN) to capture the game screen, allowing the agent to learn directly from the raw pixels of the game.
To get a local copy up and running follow these simple example steps.
Make sure you have nes-py 8.1.5+ and gym 0.26.2+.
- nes-py
pip install nes-py
- gym
pip install gym
- Clone the repo
git clone https://github.com/SpeedFireF/SMB.git
- Install needed packages above
- You can access train process using train.py and then test the trained model inside the test.py
The model architecture is a Deep Q-Network (DQN) that incorporates replay memory for enhanced training. It employs Q-learning to approximate the Q-value function, using a Convolutional Neural Network (CNN). During training, the replay memory stores transitions, and the Q-network is updated periodically. It uses an epsilon-greedy policy for action selection, and the update process involves computing target Q-values as the sum of rewards and discounted maximum Q-values for the next state, with weights updated through backpropagation.
-
Game Learning Platform: The Super Mario Bros AI agent can serve as a platform for gamers to learn and improve their skills. Players can observe the agent's strategies and employ them to advance through challenging levels.
-
Speedrunning Assistant: Speedrunners can use the AI agent to optimize their gameplay. By observing the agent's precise movements and decision-making, they can identify strategies to achieve faster completion times.
-
Teaching Tool: Educators can use the AI agent to demonstrate reinforcement learning concepts in a fun and interactive way. It can help students grasp the fundamentals of AI and machine learning.
For more examples, please refer to the Project Paper
Abdulayev Damir - telegram - d.abdulayev@innopolis.university
Dautov Almaz - telegram - a.dautov@innopolis.university
Project Link: https://github.com/SpeedFireF/SMB
Distributed under the MIT License. See LICENSE for more information.