Inspiration
We all love Mario Kart and thought it would be an exciting challenge to build an AI agent that can play the game.
What it does
Our project involves running an N64 emulator and building an AI agent capable of playing Mario Kart automatically. The AI uses reinforcement learning to make decisions and improve its gameplay over time.
How we built it
We built our project using Pytorch, training on a modified OpenAI Gym built on top of a Mupen64Plus emulator running Mario Kart n64. It trained the agent using CNN and DQN learning algorithms. The AI starts with zero knowledge, learns by interacting with the game environment, receiving rewards for good actions and penalties for bad ones, gradually improving its performance through trial and error.
Challenges we ran into
One of the biggest challenges we faced was the training time. Reinforcement learning can be very time-consuming, and with only 24 hours for the hackathon, it was a race against the clock. Additionally, fine-tuning the parameters to optimize the AI's performance proved to be quite challenging.
To counteract the training time, we tried to gently nudge our model to stay on the road by measuring the "greyness" of the pixels adjacent to the player. Unfortunately, this led to unexpected behaviour such as the player staring at grey walls. We found fine-tuning the reward to obtain the desired behaviour to be tricky, so we scrapped the idea and opted to let the model to train overnight.
Accomplishments that we're proud of
We are proud of that we successfully implemented the DQN learning algorithm and got our AI agent up and running. For all our team members, it was the first time training an AI to play a game.
What we learned
We learned a lot about convolutional neural network and reinforcement learning, including how the algorithm works and how to decide actions, penalties, and rewards.
What's next for AndyNET
We plan to improve the logic for the reward system, allowing the AI to learn more effectively. We also aim to extend the training time and develop more complex neural networks to achieve better performance. Our ultimate goal is to create an AI that can compete with above-average human players in Mario Kart.
Log in or sign up for Devpost to join the conversation.