FPGA Plays Super Mario Bros Just Like A Real Human Does
— by
hoppasaurus
It’s no secret that we love FPGAs and we love games. When we see a cool project that combines both of these, it’s kinda hard NOT to post it here on the blog.
Advanced Microcontroller Design students Jeremy Blum, Sima Mitra, and Jason Wright have been hard at work on their open source, FPGA-based, Super Mario Bros-solving AI. Here’s their project synopsis:
We built an FPGA-based AI that uses video input from an NES console to automatically play the game Super Mario Bros. All of the video analysis and AI techniques are performed using Verilog-compiled hardware running on an Altera DE2 Cyclone board. The project combines NTSC decoding, VGA output, kernel-based pattern matching, real-time image manipulation, and NES controller emulation.
The real kicker on this project is that they have designed the AI to play Super Mario Bros just like a human player would. All of the information that the AI is using is derived visually – navigation of obstacles and defeating or evading enemies.
At a high level, our AI works by reading the each video frame into a buffer and analyzing it against a set of precomputed kernels and colors to look for areas of interest. The program then uses a kernel and color matching algorithm with an error threshold to attempt to identify the location of enemies, walls, and pipes, while keeping false positives to a minimum. With this information, the program makes decisions about when to make Mario jump and run so that he avoids enemies and obstacles. We chose to define “success” as Mario making it through the first level, alive, as quickly as possible.
You can see more on the logical structure, algorithm design, program design, and project implementation over at Nintendo Ninja. Kudos to you guys, this is pretty awesome!
Leave a Reply
You must be logged in to post a comment.