Slashdot Mirror


Classic Nintendo Games Are NP-Hard

mikejuk writes "You may have have thought games like Super Mario Bros., Donkey Kong, and so on were hard at the time you were playing them, but you probably didn't guess they were NP-hard. Now we have some results from computer scientists at Universite Libre de Bruxelles and MIT Computer Science and Artificial Intelligence Laboratory that many classic games contain within them an NP-hard problem. It has been proven that the following game franchises are NP-hard (PDF): Mario, Donkey Kong, Legend of Zelda, Metroid and Pokemon. At least you now have an excuse for your low scores."

51 of 204 comments (clear)

  1. Not just nintendo games by Janek+Kozicki · · Score: 3, Interesting

    My favorite NP-hard game is adom. Just try it - see my sig.

    --
    #
    #\ @ ? Colonize Mars
    #
    1. Re:Not just nintendo games by K.+S.+Kyosuke · · Score: 4, Interesting

      Adom may or may not be NP-hard, but first and foremost, it's insanely complex for anyone but a basement gaming zombie. I adore the whole concept, but I don't have the time for playing something like that. The endless stream of "What? The game takes XYZ into account, in addition to all the food, curse, day of the year etc. stuff?" kind of wore me down rather quickly. Now if you excuse me, I'd like to finish eating my uncursed large bat. (Mmm, tastes like chicken.)

      --
      Ezekiel 23:20
    2. Re:Not just nintendo games by Janek+Kozicki · · Score: 2

      I'm not a basement gaming zombie ;) I'm a scientist.

      I'm careful to avoid playing adom more often than once per 2 or 4 years. Otherwise a month is lost.

      --
      #
      #\ @ ? Colonize Mars
      #
    3. Re:Not just nintendo games by Ihmhi · · Score: 2

      Check out Dwarf Fortress. It's an easy game that's fun to play and certainly not in any way addictive! Really!

      HELP ME.

  2. Kid Icarus by donotlizard · · Score: 3, Funny

    Kid Icarus for Nintendo is the most difficult game in the history of mankind.

    1. Re:Kid Icarus by kerohazel · · Score: 5, Funny

      Harder than Battletoads? I think not.

      --
      Skype is too convoluted... Now I'm reverse-engineering the Kyoto Protocol.
    2. Re:Kid Icarus by lambent · · Score: 3, Insightful

      There's a pretty big difference between "hard" and "fundamentally broken".

      Battletoads was hard because it was designed poorly.

    3. Re:Kid Icarus by Anonymous Coward · · Score: 5, Funny

      There's a pretty big difference between "hard" and "fundamentally broken".

      Battletoads was hard because it was designed poorly.

      Sounds like SOMEONE'S still bitter they couldn't even beat the Turbo Tunnel.

    4. Re:Kid Icarus by Hatta · · Score: 2, Insightful

      Ahem. Silver Surfer.

      --
      Give me Classic Slashdot or give me death!
    5. Re:Kid Icarus by gauauu · · Score: 3, Informative

      I never could get past that lava jet ski level!

      I could whoop up all the way there and I kept getting just a little bit further, but then, nothin.
      I'll bet the final baoss wasn't that hard!

      No, the final boss level (and final boss) were as tough as the rest of the game. I spent a couple months in college where I dug out my old nes and vowed to beat Battletoads (on the real thing, with no save state cheating). It was incredibly painful. It was hard all the way through. The only real hope you have is juggling the vultures on the 2nd level to gets tons of 1-ups.

    6. Re:Kid Icarus by elrous0 · · Score: 4, Insightful

      Desert Bus is WAY harder to beat.

      --
      SJW: Someone who has run out of real oppression, and has to fake it.
    7. Re:Kid Icarus by MobileTatsu-NJG · · Score: 2

      Battletoads was hard because it was designed poorly.

      I'm not sure what your basis for that statement is. Every time I've lost at that game the Toads had done everything I had told them to do. I lost because I didn't order them properly.

      There is a distinction there. I've played MANY games where the design really was poor, it was the fault of the game that I couldn't succeed. Maybe jumps had to be too precise. Maybe your path was obscured and required luck to find. Maybe the button presses didn't register at all. I'd go into more detail, but instead I'll suggest finding the 'Angry Video Game Nerd' videos on the internet. (cinemassacre.com) He shows actual poorly-designed games. It's entertaining, although filled with foul language. I will be up front and tell you I am a fan of the show.

      --

      "I like to lick butts!" by MobileTatsu-NJG (#32700246) (Score:5, Informative)

    8. Re:Kid Icarus by DemonGenius · · Score: 2

      Teenage Mutant Ninja Turtles 1 for NES. Most of the game was pretty easy, but once you get to the last few levels, you pretty much have to utilize bugs in the game just to proceed. Same thing for beating Big Boss in Metal Gear.

    9. Re:Kid Icarus by Gotung · · Score: 2

      You clearly haven't played any non-lemmings titles by Psygnosis

  3. Buzz by Anonymous Coward · · Score: 3, Insightful

    Is "NP-hard" the next buzz word?

    1. Re:Buzz by TheVelvetFlamebait · · Score: 5, Insightful

      No, NP-Hard cannot be, nor ever become, a buzz word, because NP-Hard has a clear, well-defined meaning. Buzzwords are defined by their own lack of definition, making them perfect for marketing and generally impressing people without saying anything meaningful.

      --
      You know, there is a difference between trolling and pointing out the flaws in your reasoning. Just saying.
    2. Re:Buzz by robthebloke · · Score: 5, Funny

      Where have you been for the last 5 weeks? Didn't you get the tweet? The term "NP-hard" has been superseded by "NP-cloud-based-social-media-hipster". Keep up!

    3. Re:Buzz by Anonymous Coward · · Score: 2, Insightful

      Should NP-hard become a buzzword, it would be first spread by people who understand it badly, and then by people who have completely misunderstood the idea but think it's neat. It doesn't matter that it has a precise technical meaning, if only a few people understand that meaning. In fact many buzzwords start out being well defined in some community of experts, but whatever meaning there was to begin with is quickly diluted to another feel-good word associated with a vague cloud of ideas.

    4. Re:Buzz by jellomizer · · Score: 4, Insightful

      Buzzwords have a well defined meaning... They just abuse them. Using them in cases where they shouldn't be used.

      For example
      Synergy: Is when the output of a team or groups activity is greater then the sum of each member.
      This happens when you are working together and you come up with a solution together that no one by themselves would come up.

      The word had been misused because of its closeness to Synchronous and Energy and used more to express things working well together.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    5. Re:Buzz by Chris+Burke · · Score: 5, Funny

      Where have you been for the last 5 weeks? Didn't you get the tweet? The term "NP-hard" has been superseded by "NP-cloud-based-social-media-hipster". Keep up!

      An "NP-cloud-based-social-media-hipster" would be proof that P=NP, since you're saying this cloud-based-social-media-hipster is in NP(Non-Pretentious), when it has already been proven that all hipsters are in P.

      --

      The enemies of Democracy are
    6. Re:Buzz by phantomfive · · Score: 4, Insightful

      This paper is as close to marketing as science ever comes. The use of the words 'NP-Hard' and "video games" were chosen specifically because they sound impressive, not because they've shown anything useful. They came up with some way to connect those two words in a paper (by morphing Mario, and defining it in a way that never entered any cartridge. If you have a finite number of paths through Mario in an arbitrarily large map, and some choices make the game impossible to beat because you get stuck, then yes you have an NP-Hard search problem. But there is no Mario level like that, and never will be because it would be boring).

      It also fulfills the other requirement of marketing, that it makes me feel dumber after reading. This super-annoying movie comes very close to showing the method used in this proof. It solves a problem that no gamer would ever face, and no level designer would ever face either, unless his method was to randomly drop blocks on the screen, rearrange them into chunks of which some are impossible to pass, and then rearrange those randomly. Can you see how this has absolutely nothing to do with the game we call Super Mario Bros?

      In other words, the authors saw the attention people got for using the word "NP-Hard" in relation to Tetris (look! Made it on BBC!), and though "wow, maybe if we use the word NP-Hard in relation to Super Mario Bros, we can get on the BBC too!

      There is absolutely nothing novel about this result, and in fact, it might be a homework problem you would give to students in an undergraduate class on computer theory. Given the right introduction, the students could easily do it. It is a blatant attention whore attempt.

      --
      "First they came for the slanderers and i said nothing."
  4. Castlevania by logical_failure · · Score: 2

    Castlevania was harder than Mario, Zelda, or Metroid -- especially the Grim Reaper fight. If you didn't have triple-shot boomerangs, when the Reaper started spamming you with Scythes you were in trouble.

    Battletoads was another one that was brutally hard...

    I saw where someone thought the Mega-Man games were hard... but those always seemed easy to me.

    --
    Sock Puppets: damn_registrars=pudge_confirmer=jimmy_slimmy=raiigunner=cml4524=a_klavan=red4men=ronpaulisanidiot
  5. Fantastic by Anonymous Coward · · Score: 4, Funny

    Now Billy Mitchell's ego can finally get a much needed boost.

  6. What? by Anonymous Coward · · Score: 2

    I Honestly don't understand what NP refers to.

    1. Re:What? by who_stole_my_kidneys · · Score: 2

      was about to say the same thing. The Wikipedia entry makes my head hurt, like watching 'Lost' for the first time in the middle of the 2nd season, i throw my hands up in the air and say "WTF?".

    2. Re:What? by Anubis+IV · · Score: 3, Informative

      For an intro to NP and NP-hard, might I suggest Wikipedia's entry on NP-hard? You get to stuff like this in any classes that cover computational complexity, such as coursework covering algorithms. NP comes up every few weeks on Slashdot since it's an interesting-ish topic for most of us.

    3. Re:What? by Oxford_Comma_Lover · · Score: 2, Informative

      "Not polynomial."

      It refers to the complexity of a computing problem being significant enough that it cannot be guaranteed to be solved in polynomial time.

      So doing an operation on a two digit number is easy, but as the number of digits goes up, and you try to do the same operation on the bigger numbers, it gets harder at a rate which is greater than polynomial with the size of the input.

      It's a little more complex than that, but that's basically it.

      --
      -- IANAL, this isn't legal advice, and definitely isn't legal advice for you. Also, Squee!
    4. Re:What? by SorcererX · · Score: 3, Informative

      NP is "Nondeterministic polynomial", not "Not polynomial."

      --
      Any sufficiently advanced technology is indistinguishable from magic.
    5. Re:What? by Sqr(twg) · · Score: 2

      No, NP stands for "nondeterministic polynomial time". Informally, it means that the problem can be solved in polynomial time if you are really, really lucky.

    6. Re:What? by Surt · · Score: 2

      Here's a slightly inaccurate explanation that will hopefully give you the gist:

      P problems are easy to solve with computers. The number of operations required to solve them can be described by some polynomial, for example for a problem of size X, perhaps X-squared steps. In this example, a problem of size 100 would take 100-squared = 10,000 computer operations. Virtually any modern computer can do 10,000 operations faster than you can blink.

      NP problems are hard to solve with computers. The best known computer solution to such a problem might typically take exponentially many computer operations (for example, if the problem has X elements, it might take 2 to the power X operations to solve). In this example, a problem of size 100 would take 2 to the 100th = 1,267,650,600,228,229,401,496,703,205,376 operations. This would take the fastest supercomputer on earth more than 4 million years to solve.

      NP-hard problems are even worse, for reasons which are difficult to explain without really getting into the theory.

      --
      "Who is the Journal of Quantum Physics going to believe?" --Stephen Hawking
    7. Re:What? by basscomm · · Score: 4, Funny

      I Honestly don't understand what NP refers to.

      Nintendo Power.

      --
      http://crummysocks.com
  7. pointless by khipu · · Score: 4, Interesting

    These games aren't "NP-hard" because they are fixed size and fixed levels. Complexity results show you nothing about the difficulty of individual instances.

    What is "NP-hard" is some generalization of these games chosen by the authors, with a particular chosen outcome (e.g., maximum score). Whether that generalization is still a good game, or even the same game, is questionable.

  8. Tool-assisted speedrun by tepples · · Score: 2

    Battletoads was another one that was brutally hard

    Is it hard to TAS, or just demanding in reaction time and memorization? Because the article is assuming tool-assisted speedrun conditions: "Indeed, the clicking of the button at the right time is factored out of these proofs of complexity - these are results that apply to a perfect player with infinite speed and reaction times of zero."

  9. I'm sure ... by gstoddart · · Score: 3, Informative

    I'm sure I've seen this before. Ahh, yes here it is, almost two years ago.

    I guess not the exact same thing, since the last story didn't explicitly mention Donkey Kong ... but certainly the NP-hard part has been discussed for a while.

    --
    Lost at C:>. Found at C.
  10. Pfft, they were... by Anubis+IV · · Score: 5, Insightful

    They were "Nintendo hard" long before anyone realized they were NP-hard, and that's a much more meaningful measure for difficulty of video games on a practical level.

    1. Re:Pfft, they were... by medv4380 · · Score: 2

      I always used "Mega Man Hard"

    2. Re:Pfft, they were... by GameboyRMH · · Score: 3, Insightful

      Better than "80's arcade hard" 8-(

      --
      "When information is power, privacy is freedom" - Jah-Wren Ryel
  11. No, you don't have an excuse by Chemisor · · Score: 5, Interesting

    Whether a problem is NP-hard has nothing to do with it being hard for you. NP is hard only for computers, because they are restricted to brute force search for the solution. As a human being, you use your intuition to probabalistically arrive at a likely solution instead of using a logical process to arrive at an exact and perfect solution. People do not care much about absolute knowledge, which is the province of science; we care about practical knowledge, which is the province of engineering. For example, the infamous travelling salesman problem is NP-hard, which makes it impossible for a computer to come up with the optimal solution in a predictable amount of time. However, in real life this has minimal utility because the difference between the optimal solution and the "good enough" solution that millions of travelling salesmen come up with every day is likely not financially significant. This is true in most everyday situations: we simply don't care if the solutions we use are the best available, only that they are the best we can think of in a reasonable amount of time.

    This is not to say that we don't need the absolute knowledge that science provides; in many cases it does indeed lead to the practical knowledge that improves our lives. But because most absolute knowledge has no useful applications, it does make sense to have a lot fewer scientists than engineers.

    1. Re:No, you don't have an excuse by Whatsisname · · Score: 4, Insightful

      This post isn't correct. It's just as hard for humans as computers, if you are searching for the optimal solution.

      You're claiming it's easier for humans because we don't actually need the optimal solution, which changes the problem.

      When you change the terms of the problem to accept a "good enough" solution, there are also computer algorithms that can find "good enough" solutions very quickly and are very useful for problem sets that are out of the realm for a human being to solve in a reasonable amount of time.

  12. Human brains solve NP-Hard problems by cyberfringe · · Score: 5, Interesting

    Assuming the analysis is correct and these games are NP-hard, then what is interesting is not that some of us failed miserably at the games but so very many people did quite well. The human brain is a special-purpose computer that excels at solving problems critical to the species' survival. This suggests to me that reformulating problems of interest into a form that the brain can process (e.g., video games) might be an excellent way to tap the computational power of the brain. Wouldn't it be interesting if the millions of brains playing games were actually solving major problems in physics, biochemistry, etc.? Call it "crowd-sourced computation".

    --
    There's no sense in being precise when you don't even know what you're talking about. -- John von Neumann
    1. Re:Human brains solve NP-Hard problems by timeOday · · Score: 4, Interesting

      NP hard doesn't necessarily mean something is hard in any practical sense. It might be a tiny problem instance (like traveling salesman with 3 or 4 cities). Or more commonly, it might be very hard to definitely find an optimal answer, but easy to get a good answer (within a couple percent of optimum), which is the normal way living things get by in the world. And since the computer is solving a mathematical model of your real problem and not the real problem itself, optimizing the model to the tenth decimal point is often a complete waste of time.

    2. Re:Human brains solve NP-Hard problems by Hatta · · Score: 2

      Nonsense. Just because someone can solve a specific instance of an NP hard problem in a finite amount of time doesn't mean he's capable of solving NP hard problems in P time.

      --
      Give me Classic Slashdot or give me death!
    3. Re:Human brains solve NP-Hard problems by sourcerror · · Score: 2

      This suggests to me that reformulating problems of interest into a form that the brain can process (e.g., video games)

      That's what "gamification" is. Not a new idea. It even has its own Wikipedia page.

      http://en.wikipedia.org/wiki/Gamification

    4. Re:Human brains solve NP-Hard problems by The+Raven · · Score: 2

      Not exactly... there's a huge difference between getting a solution to a problem, and getting the best solution to a problem.

      The traveling salesman problem is a classic NP Hard one. But that doesn't mean you can't get an OK answer just by looking at the possible routes and making a pretty good choice. Human brains (and computer algorithms) can get 'pretty good' answers on many NP Hard issues. That's not the same as finding the best solution. I wager no human has ever gotten the 'optimal' play through of any of the listed games.

      --
      "I will trust Google to 'do no evil' until the founders no longer run it." Hello Alphabet.
  13. Infinite Mario by wisnoskij · · Score: 3, Interesting

    I think it might all come down to how you look at the problem.
    many people have programmed AI to beat Mario, I believe a few years ago their was some random Mario level generator (possibly called Infinite Mario) and a contest to create AI to play it. The simple act of taking it one frame at a time, dodging and jumping, is not hard to program AI or resource intensive I think, but any problem can be made complicated. If you are saying take a static level, how do you get the absolute maximum score, now of course that is NP hard.

    --
    Troll is not a replacement for I disagree.
  14. What? by snowgirl · · Score: 2

    The proofs are based on showing that the problem of deciding if a goal point is reachable from a starting point is NP-hard. The games are also generalized in that the size of the board is increased.

    But the goal points are always reachable from the starting point... otherwise it would be a really shitty computer game.

    The fact that the games are not randomized every play-through, and of limited size...

    Grr... "NP-Hard" doesn't mean actually hard to solve... There is a proper subset of generalized NP-Hard (NP-Complete even) problems that are not particularly difficult to solve.

    While the original Super Mario Brothers may have had one level that has an actual real maze to it, and as such, the underlying principles of the game may be extrapolated to be NP-hard, the first level of Super Mario Brothers is clearly not. In fact, most of the original Super Mario Brothers doesn't have any splits or deviations from the linear path that do anything but take you to a point further along in the linear path.

    What I'm saying is, it seems like they generalized at least some of the games beyond all meaningful criteria... especially when these early games were specifically constructed to ensure that they the goals remained always potentially reachable.

    --
    WARNING! This girl exceeds the MAXIMUM SAFE standards established by the FDA for BRATTINESS
  15. For a gentler introduction by tepples · · Score: 5, Informative
    There are three classes of problems at issue here:
    • NP, problems for which you can verify a solution in polynomial time (e.g. O(x^2) or O(x^3) operations);
    • NP-hard, problems that are at least as hard as the hardest problems in NP; and
    • NP-complete, problems that are both NP and NP-hard.

    For a gentler introduction, see P vs. NP.

  16. Re:Scoring is NP-hard by fuzzyfuzzyfungus · · Score: 2

    My understanding, admittedly layman's, is that a lot(all of?) the early console systems were hardware constrained as hell and certainly didn't have the luxury of a hardware RNG or even many peripheral interfaces with the unpredictable outside world, so their games tended to not only lack randomness; but rely on techniques for faking randomness sufficiently rudimentary that "luck manipulation" becomes viable...

  17. Super Mario Forever IPS by tepples · · Score: 3, Informative

    The IPS file for Super Mario Forever, the map pack featured in the Super Mario Frustration video, is still available.

  18. Re:NP-hard is overrated by slew · · Score: 2

    Almost any interesting game will be NP-hard. Mostly only boring games will be NP-complete though.

    NP is the second-most boring class of problems (and it might even be the most-boring class, if NP=P).

    Look into some lecture of AI-planing, most problem solving problems are EXP(EXP())- complete, and if you want optimal solutions, it might even get harder....

    Even more interesting than an NP-hard game is a game that simulates real life. With NP-hard game you know there is an optimal solution and you usually get a chance to try it over and take another decision path if you fail (even if you can't verify the optimality of your decision in polynomial time). In games that simulate real life, you know that you aren't playing optimally, and you don't get to try again and make another different decision, so NP-complete may be the third-most boring class of problems. As a simple example, take the secretary problem. Of course if you "replay" the secretary problem, you can get the optimal result (basically a P-problem with order 1), but if you can't, well isn't that more interesting?

    On the other hand maybe such a game would be so interesting that it's boring (too much like real life, not escapist enough). Which leaves open the other possiblity that a game can be so boring, that it can be made interesting again. Say like a favorite drinking game, or playing inverse checkers for example.

  19. adom vs. dwarf fortress by Janek+Kozicki · · Score: 2

    I tried dwarf fortress. Probably about 3 or 5 weeks in total. I learned the basics, tried the adventure mode, etc. Indeed it's a nice complex game with many possibilities. But after that time, and having fully configured dwarf therapist. I decided that this game is not fun for me. It's babysitting mixed with sim city. I decided that I do not want to spend more time learning its quirks.

    Instead my adom nostalgia grown stronger. And after I was finished with dwarf fortress I successfully resisted the urge to play adom. Doing frequent and successful checks for willpower apparently increases it. Looks like adom is quite good at mimicking real life.

    About adom, I especially love the single-life no-saving feature in adom. It trains your skills at solving ultra-complex problems with cold head. I still remember the adrenaline rush when in this turn-based game I was fighting Andor Drakon, planning many moves ahead and thinking several seconds before making next move. Lovely, especially the adrenaline!

    One of my high scores says: "He saved the world with his brave efforts and became a great ruler while saving himself 2 times." Indeed I saved only two times in this game, and this winning-marathon took about 40h of playing. But also it took one month of dying, before I played the winning game. Heh, my last win was in 2008. But still I need to resist playing it now again. There is lots of interesting research for me to do.

    Violence! This is very funny, but for me there is as much violence in adom, as you have in a game of chess. Indeed you can beat the pawns in chess, and they are killed. Same thing in adom, only more complex.

    I wonder why I can't have that much fun from other "popular" games like Elder Scrolls or Twilight Princess. Only Diablo 1 is comparable, albeit much worse.

    well... back to QED

    --
    #
    #\ @ ? Colonize Mars
    #