## April 15, 2013 11:13 am

### This Computer Could Soon Beat You At Super Mario Bros.

Computers can already assemble cars and fly airplanes now, but they’ll eventually be able to do nearly everything we can. In the not-very-far future, for instance, they’ll be able to play our video games: Tom Murphy, a PhD student in computer science, just built a computer program that can play Super Mario Bros.

The paper about the work—which has the amazing title “The First Level of Super Mario Bros is Easy with Lexicographic Orderings and Time Travel… after that it gets a little tricky”—details the computer science behind the work and was presented at SIGBOVIK 2013. The intro to that study reads:

The Nintendo Entertainment System is probably the best video game console, citation not needed. Like many, I have spent thousands of hours of my life playing NES games, including several complete playthroughs of classics like Super Mario Bros., Bionic Commando, Bubble Bobble, and other favorites. By the year 2013, home computers have become many orders of magnitude faster and more capacious than the NES hardware. This suggested to me that it may be time to automate the playing of NES games, in order to save time. In this paper I present a generic technique for automating the playing of NES games. The approach is practical on a single computer, and succeeds on several games, such as Super Mario Bros.. The approach is amusingly elegant and surprisingly effective, requires no detailed knowledge of the game being played, and is capable of novel and impressive gameplay (for example, bug exploitation). Disclaimer for SIGBOVIK audience: This work is 100% real.

Basically, the program treats Super Mario Bros. like a math problem and orders the values in a way that makes sense. You’ve seen this idea before—a comes before b which comes before c. To train the computer which values come first, Murphy recorded himself playing the game and fed that information into a computer. And this strategy actually worked pretty well. Here’s Murphy explaining and demonstrating:

Of course, it’s not perfect. Ars Technica explains where the program falls short:

It’s still dumb in places, though—Murphy describes the whole method as “a really simple, mathematically elegant and stupid technique that really works”—so it still makes mistakes. At one point, until Murphy diagnoses a bug in LearnFun, Mario couldn’t get himself to go backwards and try a different route. That’s down to the simplicity of the approach, which relies on Mario always generally needing to scroll to the right while occasionally jumping over something to increase his score.

And, as the title of the study suggests, it can only get to one particular part in world 1-3, where there’s a long jump. So for now, your Super Mario Bros. bragging rights remain intact. But just know that the computer are coming for your games.

More from Smithsonian.com:

***

Comments are moderated, and will not appear until Smithsonian.com has approved them. Smithsonian reserves the right not to post any comments that are unlawful, threatening, offensive, defamatory, invasive of a person's privacy, inappropriate, confidential or proprietary, political messages, product endorsements, or other content that might otherwise violate any laws or policies.