Skip to main content

Scientists prove playing ‘Super Mario Bros.’ can be as hard as complex math

Super Mario Maker
Image used with permission by copyright holder
If you’ve found that solving the most challenging levels of Super Mario Maker can be as taxing as your toughest college mathematics problem sets, you’re not alone, and now there’s scientific research to back you up. According to MissOpen, a team of artificial intelligence and computer science researchers from the Massachusetts Institute of Technology (MIT) recently published a study showing that beating a level in Nintendo’s seminal platformer is “as hard as the hardest problem in the ‘complexity class’ PSPACE.”

To explain what that means, first we have to address what “complexity class” means. Computer scientists are not just concerned with solving complicated problems, but also with how quickly and efficiently those problems can be solved, given the real-world constraints of working with finite time and computing power. For the sake of easy comparison, all of these considerations are made assuming that you are doing the calculations with a Turing Machine, the rudimentary computer featuring a single, infinite tape that was conceived of by computing, cryptography, and AI pioneer Alan Turing and proven to be functionally equivalent to all digital computers as we currently understand them.

“P”-class problems are those where the relationship between the number of elements involved in the problem (N) has a polynomial (hence the “P”) relationship to the amount of time it takes. That means that the time to solve can be expressed in an equation that involves performing basic operations on N or N raised to various powers (N-squared, N-cubed, etc).

An example of a P problem would be determining which number from a set is the highest. Because you would only need to check each number once and record the highest encountered, the time to solve scales directly to how large the set is. The alternative is an exponential relationship between N and the time to solve, involving numbers raised to the Nth power, which can take orders of magnitude longer.

Encompassing the set of all P problems is “NP” (non-deterministic polynomial), where a solution can be quickly verified by an algorithm in polynomial time, but it can’t necessarily be solved in the first place as efficiently. A classic example is determining the prime number factors of an arbitrarily large number.

P = NP
The Simpsons via frinkiac.com Image used with permission by copyright holder

Determining whether or not P = NP (i.e., whether any problem that can be easily checked can also be easily solved) is one of the biggest questions looming over mathematics and computer science, so much so that the Clay Mathematics Institute listed it as one of its seven Millennium Problems, the solutions to which have a $1 million bounty each. While mathematicians generally agree that P is likely not equivalent to NP, no one has definitively proven the case either way. The problem has garnered enough attention to have several pop culture references, such as in the above episode of The Simpsons, or multiple allusions on Futurama.

By Hand drawn in Inkscape Qef - Own work by uploader, intended to replace bitmap image illustrating same thing, Public Domain, https://commons.wikimedia.org/w/index.php?curid=4353102
Wikimedia Commons Image used with permission by copyright holder

An even larger set of problems, however, is called PSPACE, encompassing the sets of both P and NP problems. PSPACE refers to problems where there is a polynomial relationship between the number of elements involved in the problem and the amount of space required to compute a solution (i.e., how much memory the computer needs). Looping back to where we started, the researchers showed that Super Mario Bros. levels can be among the most difficult to solve of the PSPACE problems.

“The paper doesn’t attempt to establish that any of the levels in commercial versions of Super Mario Brothers are that hard,” the team pointed out, “only that it’s possible to construct PSPACE-hard levels from the raw materials of the Super Mario world.” Anyone familiar with the fan-made levels from Super Mario Maker can attest to the fact that the upper limit for complexity in levels made from the elemental Mario components is extremely high.

The discrete rules and emergent complexity of video games have made them an excellent test bed for all sorts of AI and computer science experiments that could find applications in the real world. “Mathematically, video games are not very different from computational models of real-world physical systems, and the tools used to prove complexity results in one could be adapted to the other,” the team added.

“I’m really excited about these kinds of hardness proofs, and I’ve been pushing them a lot in the last couple years,” explained lead author Erik Demaine. “My hope is to encourage more people to do this, because it really does build up a lot of expertise that makes it easier to conquer problems. The more practice we get as a collective, the better we are at solving these types of problems. And it’s important to know the limitations of algorithms.”

Editors' Recommendations

Will Fulton
Former Digital Trends Contributor
Will Fulton is a New York-based writer and theater-maker. In 2011 he co-founded mythic theater company AntiMatter Collective…
Super Mario Bros. Wonder Direct: how to watch and what to expect
Mario as an elephant in Super Mario Bros. Wonder.

Nintendo will reveal more about Super Mario Bros. Wonder during a Nintendo Direct dedicated to the game that's set for later this week. Nintendo announced this new 2D Mario game during a Direct in June, but we haven't learned much more about it since then outside of the fact that Charles Martinet won't voice Mario in it. As such, this is a presentation Mario fans will definitely want to tune into ahead of the game's release in October. If you're planning to watch the Super Mario Bros. Wonder Direct live, this is everything you need to know about watching it.

When is the Super Mario Bros. Wonder Direct
Nintendo confirmed that the Super Mario Bros. Wonder Direct will take place at 7 a.m. PT on August 31. It says the showcase will last "roughly 15 minutes," so you'll only need to set aside a little bit of time on Thursday morning for it.
How to watch the Super Mario Bros. Wonder Direct
Like most Nintendo Directs, this Super Mario Bros. Wonder Direct will be live-streamed on Nintendo's YouTube channel. The premiere for it is already live on YouTube, and you can watch it from this article with the embedded video below. 
Super Mario Bros. Wonder Direct 8.31.2023
What to expect from the Super Mario Bros. Wonder Direct
Super Mario Bros. Wonder launches for Nintendo Switch on October 20, but there's still a lot we don't know about it. Nintendo simply says the Direct will serve as "an in-depth look at Mario's latest 2D side-scrolling adventure," so expect a deep dive into the different characters, gimmicks, and abilities players will encounter during the game. 
I personally hope we learn more about some of the new power-ups we can use in the adventure, like the Wonder Flower that makes levels weird and the strange-looking power-up that turns Mario into an elephant. One thing you shouldn't expect from this Direct: other Nintendo games. This is a livestream to tune into if you want to learn more about Super Mario Bros. Wonder and Super Mario Bros. Wonder alone. That's not such a bad thing, though.

Read more
Super Mario Bros. Wonder: release date, trailers, gameplay, and more
Mario, Luigi, Peach and Yoshi in Super Mario Bros.: Wonder key art.

It's been over a decade since we got the last new 2D Mario game, but that dry spell has finally come to an end. Super Mario Bros. Wonder has appeared and will give us a brand new side-scrolling adventure through the Mushroom Kingdom. While 3D Mario titles tend to get most of the excitement and praise from fans, there's no denying that the 2D games are just as creative and fun in their own ways. Even though they all follow the same basic formula of running through a stage in an attempt to reach the flagpole at the end, they all put fun and creative twists on how you get there that keep each title fresh. If you've been wondering what Mario's next 2D adventure will hold, here's everything we know about Super Mario Bros. Wonder.
Release date

We have waited long enough for a new 2D Mario, and Nintendo seems to agree. Super Mario Bros. Wonder will arrive this fall on October 20.
Platforms

Read more
The Super Mario Bros. Movie looks like the games, but their spirit is missing
Mario and Peach walk through a mushroom field in The Super Mario Bros. Movie.

It's already safe to say that The Super Mario Bros. Movie is a rousing success. Despite a middling critical reception, the animated film smashed box-office records like blocks in its opening weekend and is currently earning high audience scores. That all but assures that Nintendo and Illumination’s cinematic partnership will continue, bringing more sequels and spinoffs set in the Mushroom Kingdom. This is the long-in-the-works start of Mario’s on-screen empire.

And I can’t help but feel just a little disappointed by that.

Read more