Holiday breaks are a good time to catch up on relaxing, reading, or maybe indulging in some video gaming. Kevin Hughes did just that over his winter break, only it wasn’t he who was playing the games: It was an artificial neural network he trained using TensorFlow.
He originally got the idea for this project a few years ago after seeing a post about artificial intelligence applied to video games. Since he found other machine learning demos lacking a thorough end-to-end process for other developers to follow, part of his mission included documenting and detailing his results so others could do the same thing.
“It always bugged me that [posts] didn’t contain the full pipeline from data collection, preparation through to actually playing,” said Hughes. “Showcasing a full system is really what I wanted to achieve with this project.”
Mario Kart 64 was selected mostly because of Hughes’ love for it, but also because he thought it might get a broader audience interested in what machine learning is all about.
Despite being a lower-level abstraction than previous tools Hughes has used (like scikit-learn and Shogun), TensorFlow worked well for Hughes’ project because it had the basic tools needed for deep learning. Plus it could use his new GPU.
“I try and stay up to date on the latest tools, and with TensorFlow getting quite popular, I wanted to try it out,” he said. “Plus, during my masters I used a lot of other tools for machine learning and computer vision, and I was interested to see how they compared.”
He said getting the positive end results wasn’t easy, and he learned to fully understand the data of the model. He said that he “probably rushed onto later steps too quickly and could have saved some time if I had done more upfront analysis on the data I collected.”
After playing a lot of Mario Kart and writing an emulator plug-in in C, Hughes finally managed to get Mario to successfully drive around the track using the same technique that Google uses for its self-driving cars. He said that with 20 minutes of training data, his AI could travel around the majority of the simplest course (Luigi Raceway).
Hughes’ project highlights some of the things artificial neural networks and deep learning can accomplish, not just for gaming, but for self-driving vehicles too. He said he is looking forward to the new era of self-driving vehicles, mostly because it can be safer than human drivers, and potentially change the world.
Adjustments for self-driving vehicles need to be made of course, according to Hughes, but the future shows Mario isn’t going to be the only one that’s driving around, hands-free.