Programmer Builds AI That Will Play Classic Nintendo Games For You

The classic Nintendo Entertainment System (NES) was a fixture through many a childhood.

For the first time in the history of video games, graphics could be represented with more complexity than a series of dots and rectangles. There were colors, storylines, and characters that captured imaginations and led to a new era of video game tech and artificial intelligence.

And it’s on this topic of AI that I want to focus this story because Tom Murphy, a graduate student and now Ph.D., has developed a program that can take these classic Nintendo games and play through them.

The results are not always successful, but keep in mind this is a program that has had very little development, with Murphy being the sole developer.

Keeping that in mind, what it can do is pretty remarkable in that it was able to learn a series of manual data inputs recorded from Murphy’s button presses and develop into a complex player that might even beat you if you were to challenge it head-to-head.

Murphy explains further on his website.

“Bytes in memory (and sometimes 16- and 32-bit words) can contain interesting game facts like the player’s position in the level or score. The central idea of this paper is to use (only) the value of memory locations to deduce when the player is “winning”. The things that a human player perceives, like the video screen and sound effects, are completely ignored. As an additional simplification, we assume that winning always consists of a value going up—either the position in the level getting larger, the score getting larger, the number of lives, the world or level number getting bigger, and so on.”

The results are quite entertaining to watch, and they start at about the five-minute mark after Murphy explains in greater detail how his program works.

Some takeaways: The program is pretty good at games that involve moving to the right and avoiding objects — Super Mario Bros., for instance — but it’s comically horrible at Tetris.

And one particularly amusing characteristic of the program is that it’s an incredibly sore loser. When one of the Nintendo games has it beat, it makes like your childish little brother and pauses the game so he won’t lose.

Have a look.

With a little more work, it’s clear to see how this program could eventually beat all those classic Nintendo games that you were unable to as a kid. It might be worth it for that alone.