Advanced Neural Network Is Taught To Play Mario Kart

Thursday, 05 January 2017 - 8:50PM
Artificial Intelligence
Thursday, 05 January 2017 - 8:50PM
Advanced Neural Network Is Taught To Play Mario Kart
AI can now do everything from run your household to steal your job. And with so much being demanded from the latest in technology, it's no surprise that sometimes AI needs to just kick back and relax with some video games, just like its human counterparts. 

In his spare time over the holidays, Kevin Hughes, a developer at Shopify, trained an artificial neural network to play the classic Mario Kart 64, originally for the Nintendo 64 console. The machine learning was done using TensorFlow (an open source software library created by engineers and researchers from Google's own AI team). Hughes recorded his project, and all the trials and tribulations that came with it, on his blog.   

To begin, Hughes created the dataset to train the neural net by writing "a program to take screenshots of [his] desktop synced with input from [his] Xbox controller." Once that was in place, he "ran an N64 emulator and positioned the window in the capture area."  Using these two programs in combination, Hughes was able to compile a dataset about what the AI was seeing on the screen, and what the corresponding action should be. 

Advertisement



Even with all this work, and even more fine tuning, his first test run was less than impressive, "Mario drove straight into a wall and made no attempt to turn," he recalls. To debug the program, he added a manual override, and was able to quickly spot the problem.  "I noticed that MarioKart is a very jerky game... players usually make several sharp adjustments throughout a large turn," Hughes noted. What this meant was that "there would be images of Mario in the middle of a turn both with and without the joystick output indication the turn. I suspected the model learned to never turn and this actually resulted in the smallest error over the dataset." 

Finally, with corrections made to counteract this error, the neural net was able to cruise through 3 laps on a Mario Kart course.


Hughes had only set aside a few days for the passion project, so the results, while impressive, came with limitations. Notably - the self-driven car can only handle a select portion of the game's simplest track, Luigi Raceway. There's no need for the project to die just because Hughes went back to work. He made sure to release his data on Github, in case anyone more dedicated than he wants to pick up where he left off. Maybe someday soon the neural net may even be able to beat a human at its own game.

article continues below

Robotics Supply Pod Available Now
Science
Technology
Artificial Intelligence

Load Comments