Skip to content
/ SMB Public

Super Mario Bros agent playing the game and completing the levels

License

Notifications You must be signed in to change notification settings

SpeedFireF/SMB

Repository files navigation

Static Badge


Logo

Super Mario Bros AI agent

Super Mario's Bros: AI-Powered Game Mastery
Explore the docs » · View Presentation » · Check Project Paper »

Table of Contents
  1. About The Project
  2. Getting Started
  3. Model Architecture
  4. Usage
  5. Contact
  6. License

About the project

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.

Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites

Make sure you have nes-py 8.1.5+ and gym 0.26.2+.

  • nes-py
    pip install nes-py
  • gym
    pip install gym

Installation

  1. Clone the repo
    git clone https://github.com/SpeedFireF/SMB.git
  2. Install needed packages above
  3. You can access train process using train.py and then test the trained model inside the test.py

Model Architecture: Deep Q-Network (DQN) with Replay Memory

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.

Logo

Usage

  1. 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.

  2. 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.

  3. 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

Contact

Abdulayev Damir - telegram - d.abdulayev@innopolis.university

Dautov Almaz - telegram - a.dautov@innopolis.university

Project Link: https://github.com/SpeedFireF/SMB

License

Distributed under the MIT License. See LICENSE for more information.

About

Super Mario Bros agent playing the game and completing the levels

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages