BLOG > Building an FPGA AI to play Super Mario Bros. in Real Time

Cyclone II FPGA
Mario gets a Brain Upgrade.

Jason WrightSima Mitra, and I recently built an FPGA-based (Field Programmable-Gate Array) AI that uses video input from an NES console to automatically play the Super Mario Brothers for our Advanced Microcontrollers final project. 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.

We launched a website that explains the workings of the system in extreme detail.  Visit the website to get all the nitty-gritty technical details:

Visit my “Nintendo Ninja” portfolio page for more information and a link to the open source materials.

This video shows the AI beating World 1-1 of Super Mario Bros. without breaking a sweat:


  1. Oh my god! This is so awesome! I wonder how you guys pulled the entire thing off in just a single semester!

    1. It was a final project, so we actually did most of it in about 3 weeks. This was definitely a group effort. It would have been impossible alone.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: