Slashdot Mirror


Pac-Man Is NP-Hard

MrSeb writes "An Italian researcher with a penchant for retro games — or perhaps just looking for an excuse to play games in the name of science! — has used computational complexity theory to decide, once and for all, just how hard video games are. In a truly epic undertaking, Giovanni Viglietta of the University of Pisa has worked out the theoretical difficulty of 13 old games, including Pac-Man, Doom, Lemmings, Prince of Persia, and Boulder Dash. Pac-Man, with its traversal of space, is NP-hard. Doom, on the other hand, is PSPACE-hard."

195 comments

  1. Tetris isn't NP-hard anymore by tepples · · Score: 5, Interesting

    I am reminded of an proof from a few years ago that Tetris is NP-hard. But this proof is for old versions of Tetris that used a pure randomizer, not the new bag style generator in games since 2001. This randomizer incidentally allows playing forever.

    1. Re:Tetris isn't NP-hard anymore by Anonymous Coward · · Score: 5, Insightful

      It would be more accurate to say Tetris isn't Tetris anymore.

    2. Re:Tetris isn't NP-hard anymore by Formalin · · Score: 5, Interesting

      I think the gameboy one stopped speeding up and some point, letting you play forever, well at least until you ran into a batch of randomness that gave you too many bad pieces.

      The NES one, on the other hand, was actually impossible after a certain level... the blocks fell faster than you could get them to the edges of the screen.

      There was a version of tetris someone made, maybe from here... that always gave you the worst possible piece.
      Googling 'ragetris' tells me it was called 'hatetris'.

      Not entirely related to things being NP-hard, but yeah.

    3. Re:Tetris isn't NP-hard anymore by Formalin · · Score: 1

      Hmmm. Further research tells me the bit about NES getting to impossible speeds is only a figment of my imagination. Perhaps it was a different version...

      Achin' to play some tetris now. It's been years...

    4. Re:Tetris isn't NP-hard anymore by Anonymous Coward · · Score: 1

      bastet, bastard tetris.

    5. Re:Tetris isn't NP-hard anymore by Lehk228 · · Score: 1

      tetris DS does get to the point where the piece lands nearly as soon as it appears, however you can keep it from fixing to the stack by rotating it and wiggling it constantly.

      --
      Snowden and Manning are heroes.
    6. Re:Tetris isn't NP-hard anymore by b4dc0d3r · · Score: 2

      I am embarrassed to say, this is the most interesting comment I have seen on this site in well over X;X3 years. You know the changes in the Tetris engine, and links to a strategy guide for playing Tetris infinitely.

      Screw mod points, I salute you, sir or madam or intermediate.

    7. Re:Tetris isn't NP-hard anymore by Anonymous Coward · · Score: 0

      fire up emacs, m-x tetris

    8. Re:Tetris isn't NP-hard anymore by Anonymous Coward · · Score: 0

      Many versions of Tetris have a 'bastard mode' that does that.

    9. Re:Tetris isn't NP-hard anymore by Anonymous Coward · · Score: 0

      The gameboy version sped up forever also.

      I know this because I had a Game Genie with codes to get only the long straight blocks... After a certain point it would move too fast to get them to the sides, as you described.

    10. Re:Tetris isn't NP-hard anymore by VortexCortex · · Score: 2

      It was probably Bastet (Bastard Tetris).

    11. Re:Tetris isn't NP-hard anymore by Anonymous Coward · · Score: 1

      No, you're correct. In NES tetris, past level 29, it is generally considered humanly impossible to get the pieces to the sides of the well (though it can still be done with emulators, framestepping, etc.).

    12. Re:Tetris isn't NP-hard anymore by Anonymous Coward · · Score: 0

      https://www.youtube.com/watch?v=gIy7xF68H1w

      "This is the fastest speed the NES game is capable of", apparently.

      CAPTCHA: deadly

    13. Re:Tetris isn't NP-hard anymore by EdIII · · Score: 4, Funny

      most versions of tetris use pure randomizers, faggot.

      LMAO.

      How can you get so emotionally involved in an algorithm used in a 20+ year old game? It's a game man. You think he is wrong about the algorithm so it is cause to call him a faggot?

      You AC's crack me up sometimes. Faggot!

      If the waiter brings you too much ice in your drink do you yell at him and call him a faggot too? I can hear Beavis and Butthead in the background telling you, "That was uncalled for dude".

    14. Re:Tetris isn't NP-hard anymore by Anonymous Coward · · Score: 1, Informative

      Posting anon to preserve mod upvotes for the article.

      It makes sense, and I kinda laughed when I saw the comment and instantly knew it was Tepples. The guy has coded the most configurable version of Tetris I've ever seen after all.

    15. Re:Tetris isn't NP-hard anymore by Stuarticus · · Score: 1

      I find that this is normal language when coming away from a long session of "super tetris 3" vs mode for the super nintendo. You'd feel the same if you got 20 Z tetrominoes in a row.

      --
      If you think someone isn't free to have a different definition of "freedom" you may be a tyrant.
    16. Re:Tetris isn't NP-hard anymore by delinear · · Score: 1

      Fast is nothing. Now fast with invisible tetrominoes... that is impressive (skip to 5:10, but really the whole thing blows my mind).

    17. Re:Tetris isn't NP-hard anymore by Anonymous Coward · · Score: 0

      Tetris isn't NP-hard anymore

      That's good. If Tetris remains NP-hard for longer than 4 hours, it should call its doctor.

    18. Re:Tetris isn't NP-hard anymore by cpu6502 · · Score: 1

      Invisible Space Invaders is my favorite mode on the old Atari console.

      Shooting the last invader as it rapidly scrolls across the screen is nigh impossible. I miss the old days when games came with "128 variations" of play. It helped keep them interesting.

      --
      My AC stalker: " I personally agree with your posts most of the time, but that won't keep me from modding you troll"
    19. Re:Tetris isn't NP-hard anymore by N0Man74 · · Score: 1

      The NES one, on the other hand, was actually impossible after a certain level... the blocks fell faster than you could get them to the edges of the screen.

      That made me think of the old Columns game on the Sega Genesis that I used to play when I was around 13. I recall that the rate at which pieces fell when you pushed down was fixed. After a certain point, the fall speed of pieces became faster than the fixed speed of pushing down, so you could slow pieces down by pushing down. Using this technique, I could play indefinitely without it ever getting too fast.

    20. Re:Tetris isn't NP-hard anymore by Anonymous Coward · · Score: 0

      don't feed the troll...

    21. Re:Tetris isn't NP-hard anymore by tehcyder · · Score: 1

      How can you get so emotionally involved in an algorithm used in a 20+ year old game?

      This is slashdot, People here can get emotionally involved in almost anything, other humans of the female gender being the obvious exception.

      --
      To have a right to do a thing is not at all the same as to be right in doing it
    22. Re:Tetris isn't NP-hard anymore by what2123 · · Score: 1

      I can say that "Tetris" for the Ti-XX calculators was impossible after 200 rows.

    23. Re:Tetris isn't NP-hard anymore by SmileyByte · · Score: 1

      There was a version of tetris someone made, maybe from here... that always gave you the worst possible piece.

      Bastard Tetris.

      --

      h@hh@hh@...@.&.... "You shall not pass!"
    24. Re:Tetris isn't NP-hard anymore by Anonymous Coward · · Score: 0

      PROTIP: Google the term "4chan", and Encyclopedia Dramatica the term "fag".

      For 4channers, saying "faggot", is like saying "dude", "pal" or "mate". It means the same thing. (An interesting thing is, that *we* are now actually the gay haters, since we still think of something bad when reading/hearing the world, they don't.)
      Of course, they are by definition always totally emotionally involved trolls, so they are always dicks. It's ye olde TIFT (Total Internet Fuckwad Theory). ;)

      Welcome to the 21st century. Welcome to the Internet. Welcome to Slashdot. Cause you must be new here! ^^

    25. Re:Tetris isn't NP-hard anymore by Lisandro · · Score: 1

      Jesus. That guy needs to get out more. You know, from where the pizza delivery comes.

    26. Re:Tetris isn't NP-hard anymore by maxwell+demon · · Score: 1

      How can you get so emotionally involved in an algorithm used in a 20+ year old game?

      This is slashdot, People here can get emotionally involved in almost anything, other humans of the female gender being the obvious exception.

      Of course they can be emotionally involved in other humans of the female gender. It's just that the other humans of the female gender won't get emotionally involved in them. But then, neither will 20+ year old games. :-)

      --
      The Tao of math: The numbers you can count are not the real numbers.
    27. Re:Tetris isn't NP-hard anymore by Anonymous Coward · · Score: 0

      That guy just sucks at Tetris.

  2. nothing of value was gained by kyrio · · Score: 3, Funny

    I'm pretty sure we knew this from actually playing the games.

    1. Re:nothing of value was gained by fuzzyfuzzyfungus · · Score: 5, Insightful

      It would actually be somewhat surprising(especially with games where the twitch factor keeps the player from strategizing too deeply) if you could discern the computational complexity of a game just by playing it....

      Naively, I'd imagine that a human player most closely resembles a stochastic hill-climbing agent, providing the input at each tick that seems most likely to improve their situation in the relatively short term. That would make them brutally efficient at some problems, miserably hung up on local maxima or discontinuities in others; but not necessarily provide much correlation between difficulty of play and difficulty of problem.

    2. Re:nothing of value was gained by JustSomeProgrammer · · Score: 1

      I was actually quite surprised that a game that is developed through a simple program would be NP-Hard and that a more advanced game with more stuff to do is actually easier.

    3. Re:nothing of value was gained by martin-boundary · · Score: 4, Insightful

      Naively, I'd imagine that a human player most closely resembles a stochastic hill-climbing agent,

      That's too naive. Most game players don't just play the game once (start game, yay, play, win a little, die, never play this game again). Instead, they play many times, and use their previous knowledge as leverage to improve their performance.

      That puts the hill climbing analogy into more modern optimization territory, like multiple randomized restarts, adaptive strategies, etc. As such, the odds of winning are high when players are willing to put in the hours.

    4. Re:nothing of value was gained by johnnyb · · Score: 2

      Interestingly, there is a conference this summer dealing with humans and their abilities to perform computation. It's titled Engineering and Metaphysics, and deals with the relationship between humans, physics, and reality.

    5. Re:nothing of value was gained by VortexCortex · · Score: 5, Interesting

      Most game players don't just play the game once (start game, yay, play, win a little, die, never play this game again).

      I'd have to disagree, as both a Game Player and Game Developer. Gone are the days when Sonic or MegaMan sat in your console for weeks while you tried endlessly to beat it. Today's game players are EXACTLY like what you describe. That's why we have to baby them & lead them into playing the game -- They have many other options, a virtually endless supply of games to Try and fail at until one lets them win.

      I sit "average" gamers of all age ranges in front of the games from yesteryears and the majority do exactly what you describe when given a choice to switch between any classic game on the shelf. They play the longest on familiar or easy to play titles.

      PacMan is HARD. Rarely will you find a decent arcade with 5 lives instead of 3, and longer power-up periods (selectable via dip switches or .conf files). However, people don't play games to beat them, now they play to be entertained, and an unforgiving game that eats your quarters or $50 at once can't compete with the free casual games of today.

      I think some balance can be found -- A short introduction to get you interested in the mechanics and/or story, followed by an increasingly engaging experience, but there's a fine line between too steep a learning curve and too boring of a game.

      As for whether or not PacMan is NP Hard, I'd say that since it's 100% fully deterministic it's actually not. It's easy as hell to map out then play perfectly every single time afterwards, especially if you have the source code "running" through your brain and can can predict exactly what the Ghosts will do. Also, the same damn level over and over again is quite boring... That's why when I was required to learn JavaScript I created my own rendition that was non deterministic (pseudorandomly so) as well as had many differing levels.

    6. Re:nothing of value was gained by EdIII · · Score: 3, Insightful

      A pleasure to see you again my liege. I am still most grateful for your correction of my unconsciable grammar and spelling last time.

      I too lament how game players today have been turned into "whiny little pussies". I long for the days past when a kill screen was indicative of godhood.

      There was great value in a game that was actually hard to play, and was progressively impossible to beat. The point of that game was the journey of suffering itself, not the end. Those that actually reached the end, the aforementioned kill screens, were granted immediate entrance into Valhalla and spoken of in legends.

      I think the last game that I played that was actually hard might have been Doom or Doom II. To this day the sound of a Arch-Vile makes me twitch.

      In fact, thinking about, the harder a game is, and the more I have to constantly replay levels to achieve perfection, the more I enjoy it. Games these days seem to be more like interactive stories requiring a modicum of effort and designed with soft rubber corners so you don't trip along the way.

      Personally, I think it all went downhill the moment you had a save game state. The unrelenting suffering of being so close to finishing and seeing that start screen, and to keep coming back, was in my opinion, a rite of manhood in my day. It separated the boys from the men.

    7. Re:nothing of value was gained by KDR_11k · · Score: 1

      I think that's why online multiplayer is so popular now, it's the only way to turn most modern games into a fun challenge.

      --
      Justice is the sheep getting arrested while an impartial judge declares the vote void.
    8. Re:nothing of value was gained by __aancvu2993 · · Score: 0

      I don't see why you want to find a balance. Minds are diverse. Why do you want to find the perfect game, with graphics for everyone, with perfect ramp-up of difficulty, with perfect final stages, with perfect everything for everyone? At the pace games are designed today I guess you can only come up with a blockbuster by sheer luck. Google interviews with Shigeru Miyamoto. The amount of work that went into his games is too great for the average developer. I enjoy Sokoban, it teases me. It would make no money in today's Angry Birds world but that is of no consequence. I still enjoy it, so please make the games you want to see, someone will like them.

    9. Re:nothing of value was gained by Stuarticus · · Score: 1

      See switch. Hit switch.

      --
      If you think someone isn't free to have a different definition of "freedom" you may be a tyrant.
    10. Re:nothing of value was gained by Anonymous Coward · · Score: 0

      A friend of mine bought thier 10 year old round one time, who was a "games player" - I didn't have a console so ran MAME ona laptop (with a usb joystick). He hated it, most of the games he tried were "too hard".

      Even Wonderboy and Pac-Land!

    11. Re:nothing of value was gained by serviscope_minor · · Score: 2

      I think the last game that I played that was actually hard might have been Doom or Doom II. To this day the sound of a Arch-Vile makes me twitch. ...

      Personally, I think it all went downhill the moment you had a save game state.

      I think you may be rewriting history a bit, there.

      Although it *is* interesting. Doom did havea s aave state, yet for some reason, I don't know anyone whose playing strategy was to repeatedly save and reload[*].

      Perhaps that's because there wasn't much choice and it was a fantastic game so we played and replayed and re-re-re-replayed it. After a while, a straightforward runthrough on UV wasn't challenging.

      Of course once it lost that challenge we would adopt various ad-hoc challenges, like doing levels on nightmare starting with a pistol, or completeing every UV level starting with just a pistol, or doing things fast, etc at which point reloading isn't part of the game anymore.

      [*]Though it was a useful strategy to figure out how to do a challenging level, before going back and actually doing it properly.

      Perhaps it was because it somehow felt like cheating to do anything other than save at the level transition. After all, why not jyst hit iddqd idkfa and randomly blast away at stuff for an hour?

      I don't know the answer. Perhaps it's quicksave and quickload that are the problem. It was mildly annoying to save levels in Doom, so you wouldn't do it unless you were really sure. With more modern games, I find myself hammering on quicksave even though it does in some way spoil the experience.

      That said, when a game is good enough even that doesn't matter...

      I remember playing Half Life. There was a classic moment which I expect will be remembered by everyone who played it with sound on. You crawl into a duct, then you hear a marine say "Sarge, I hear something..." (the first time the phrase is used in the game), then they start shooting at the duct from underneath and with each bullet hole a shaft of light appears until the duct finally collapses into a room full of marines.

      It was an astonishingly memorable sequence. I was blown away. Even by the already ground breaking feel of Half Life, it was outstanding.

      I remember I had quicksaved before crawling into the duct and I actually survived first time. What I did after was to save my state (for later continuation) and then replay the same bit about 10 times simply because it was so cool.

      I remember doing the same thing at several really good points in the game (though I have a vague memory that HL actually autosaved before something cool happened just to make it all the more cool).

      --
      SJW n. One who posts facts.
    12. Re:nothing of value was gained by delinear · · Score: 2

      The biggest factor for me (and I'd guess a lot of other gamers) is having the spare time for games. The average gamer age is now mid thirties. When we were all kids it was easy to spend countless hours replaying the same games to perfect our speed runs etc. These days, even replaying the last ten minutes due to a stupid mistake seems like a massive chore when you can only manage to grab a spare hour here and there when work/real life isn't getting in the way. That, to me, is the obvious root of why people don't want games that need weeks of practice to beat; why they will make more frequent use of save games; why they get frustrated with games that don't help you get back into the experience after a prolonged period away (through lack of objectives or no timeline to remind you what you were doing); why they will move onto another game if they're not enjoying the experience or don't feel they're making progress in the game.

    13. Re:nothing of value was gained by delinear · · Score: 1

      Never played Pac-Land but there were a ton of cheap shot deaths in Wonderboy. The game consisted mostly of replaying levels and getting a little further each time and memorising which cheap shot killed you last time and what you need to do to avoid it this time. That's not to say I didn't love it back in the day (and could make it all the way through on one shiny 10 pence piece), but it deliberately was difficult to extract as many replays as possible from what was ultimately quite a short experience.

    14. Re:nothing of value was gained by Anonymous Coward · · Score: 0

      I hope you realize that the OP was making a joke about games being "hard" (to play).

    15. Re:nothing of value was gained by HapSlappy_2222 · · Score: 1

      I'm working through Demon's Souls, and then Dark Souls, right now, actually.

      Brutally difficult games for the PS3, and like the days of yore, if you die, you start the level over. The only "save" spots are boss kills, which really demand you to be at your best. Most fights require you to dance around the boss for a while to see how it's going to kill you (and, boy, will it kill you good). Most bosses have dozens of subtle patterns, requiring you to have quick reflexes, to pay attention, and to devise your own survival techniques; even the walkthroughs basically say "do what you can to live. I got nothin specific except survive and counterattack."

      I can't quite put my finger on why, but even when you die and have to restart a level, you don't feel that "SMASH CONTROLLER NOW" feeling like most of the older die-and-do-it-again type games. When you die, you are punished by losing all of your game currency, with ONE chance to get to your body safely to recover it. Death is risky, especially if you find you're in over your head. Do you risk going back to get your hard earned soul-cash, or do abandon it and tackle a different challenge, honing your skills to exact revenge on what just murdered you at a later time? It almost feels like a rescue mission for your own body, and there's something truly satisfying about the game demanding you do a better job the second time around, or punishing you a second time for not getting better. This risk is part of what makes you want to avoid death in the first place - it feels great to be given that second chance and picking up the spare, so to speak, but it feels better to get in and get the careful strike in the first place.

      Here's a description from an early adventure of mine: I am walking through an underground mine with my oh-so-lovely flame-resistance shield up at all times, knowing full well that any monster I encounter will kill me if I'm not careful, and I'm on the watch for new beasts and surprises. Still, I also know that I am well equipped for survival with an arsenal of skills I have honed and continue to perfect. Using these skills I defend and counterattack my way through traps, ambushes, and swarms of enemies, earning my way to a truly awesome boss named Flamelurker, a fire demon that announces it's presence with blood curdling cry and the confidence that comes from a lifetime of experience killing folks just like me, flame-resistance or not. I'm a heavily armored temple knight, and he handily serves my ass to me on a platter. I just can't seem to move quickly enough to avoid his overwhelming and super-quick attackes. I'm forced to navigate my way back to him, carefully defending and attacking, parrying and thrusting, through the hordes again, the whole time pondering my strategy. This time will be different.... but oh, no.... I forgot about that ambush and my reflexes are a moment too slow to save my life... Ok, I tell myself, head in the game this time. That distraction just cost me 30,000 souls, but I'm not mad or disappointed... I know why this happened, and the game is playing by rules that it taught me early on, and that it consistently and efficiently enforces. I delve into the dungeon again, this time putting off thinking about strategy as best I can, until I near the boss. I decide on a light-armor hit and run technique, which allows me to survive long enough to practice and perfect which moves work best. Now the tables have turned. I perfect my attack to the point that there is no defense. Once learned, my new ability (not a "skill point"; a literal new ability that *I* learned, not some "spell" the game granted me) is so powerful that I devastate my nemesis with nary a healing potion required. The best part? Better even than the vast rewards from killing demon in the first place? The technique learned above is now potentially useful in ANY future situation I encounter, and I can add it to my toolbox accordingly.

      None of this discusses the ingenious multiplayer options, which allow adrenaline pu

    16. Re:nothing of value was gained by JTsyo · · Score: 1

      There are still games that are hard to beat. Super Meat Boy and Demon's Souls come to mind. Of course I haven't played either since I don't have the time to commit like I did to Contra and SuperC.

    17. Re:nothing of value was gained by marnues · · Score: 1

      I think you actually add weight to the GP's premise, even if you tore down one of his points. We are optimization engines (at least us rational engineer types). But when we optimize we don't do it like computers. We don't check all possible routes as we consider many of them sub-optimal. But computational theory mandates that even the seemingly sub-optimal paths be explored. Some people do this kind of experimentation some times, but it's too time consuming so that's the exception rather than the rule. In fact I'd surmise that every good engineer has done this at least once in their life, then hopefully realized the usefulness of computers.

    18. Re:nothing of value was gained by marnues · · Score: 1

      That's one of the reasons given for the retro-gaming craze. Modern games spend too much time developing complex systems. Time spent developing complex systems is time not spent ensuring complex paths. Developing both is what every sandbox game attempts, with minimal success. The retro-gaming craze is definitely tied to nostalgia, but also the fact that simple systems allow incredibly complex path structures.

    19. Re:nothing of value was gained by HapSlappy_2222 · · Score: 1

      You should try Demon's Souls. Spend an hour or two a week and it won't disappoint. Get a used copy from Gamestop or some such. Lots of folks gave up on it in the beginning as being too hard, so there's plenty of cheap used ones. Got mine for $14, and picked up Dark Souls (sort of a sequel, haven't tried it yet) when I found out how good Demon's Souls is.

    20. Re:nothing of value was gained by HapSlappy_2222 · · Score: 1

      Hmm. I like your argument, but to play devil's advocate: could it be that a more complex game system allows for exponentially more solutions to a linearly more complex path structure? It seems like providing a consistently difficult gaming experience is much more difficult as you provide player characters with more complex. Giving a player to have a minimal set of actions would seem to limit the player's ability to exploit weaknesses or find shortcuts in the path to solving a problem. As a for instance, if Pac-Man could apply damage over time effects to Inky, Pinky, Blinky, or Dot, Blizzard would nerf him.

    21. Re:nothing of value was gained by Reapy · · Score: 1

      I've been plowing through emulator games recently, and to some extent the go is right, I play what I know longest, and the only ones that get more time are the rare gems that I missed out on like secret of mana or some such.

      Anyway my point here is that games don't sit in consoles for weeks because we aren't 12 years old anymore. Back then you have time and no cash, so you just play what is available.

      Often the skill needed to win the game was rote memorization or extreme repetition. Where is that next guy? Let me throw an endless supply of guys at you, or if you didn't run fast through this spot or kill that guy fast enough you are now in a auto die situation.

      I don't know about you but I don't have the will to honestly waste time getting better at nes style games. Now, I used to be a person who locked myself in a small too. With 4 cyber demons in Doom2 and try to get through with no health pickups...but again that was a product of boredom.

      Now if I am going to get good at a game it's because its most likely multiplayer and has fun mechanics. Once you peak out in a multiplayer game, no way you'll ever find a ai as unique as your opponents online, further, the skills and mechanics you need to know to beat someone are just more interesting than remembering that a random bullet will hit you once you land on platform x across the insta die pit, so you have to jump again when you get there, book.

      Anyway, don't really miss the old designs, but like to visit them from time to time to remember. However I still don't like the corridor spoon feed we get now, and generally want interesting mechanics, not insta death and platforming.

    22. Re:nothing of value was gained by Reapy · · Score: 1

      Really enjoyed demoted souls myself, great game...though I think the game beeping p2p broke the unique mp a bit. The only time I raged was Capra demon, but that was because many deaths were due too bad camera (big boss, small room) and sloppy targeting controls (2 small hit stun dogs with boss), which makes you mad. The rest though we're oops, my fault moments, so you don't feel bad.

      The skills you learn in the game are great, a mix of knowledge of where things are in the world, memory of enemy attack patterns, stat building and gear optimization, yet still requiring some degree of reflexes and execution to make it all come together. That is something I really enjoy learning and playing.

      Though I did t like the multiplayer, was hard to find people to coop with, even at the right level at the right spots. Pvp, I just didn't like how you have to play to win , not to mention if you want frequent fights I would invade, often feeling like a huge jerk since I knew that guy I just great combusted was gearing up to take down a hard boss and make progress, and I just wrecked it for him.

      Overall a very cool seirs of games, well executed on many fronts, not to be missed by anybody if you can help it.

    23. Re:nothing of value was gained by martin-boundary · · Score: 1

      Computers do that too. You might want to look at the A* algorithm and variations (there's a nice Java applet floating around that illustrates it, but I can't seem to find it again just now).

    24. Re:nothing of value was gained by Anonymous Coward · · Score: 0

      As for whether or not PacMan is NP Hard, I'd say that since it's 100% fully deterministic it's actually not.

      Pac-Man is not 100% deterministic, because ghosts in Frightened mode will take pseudo-random routes.
      Also, it does not matter if the standard board is easy, because the paper considers an infinite set of potential boards. The purpose is to show that the "gameplay" is hard (which is the "essence" of the game), not that a single level is.

    25. Re:nothing of value was gained by Anonymous Coward · · Score: 0

      All NP hard problems are deterministic. It is just if they are solvable in linear or poly time. Pacman being a form of traveling salesman problem makes it NP hard. Non deterministic is if there is some sort of random in the mix (such as what everyone in this page was talking about with the older tetris games).

      The 'solve' is NP hard. The re-running of the path is usually some subset of N or in the P set. Picking an optimal path in traveling salesman problems is currently in the NP set. As you pretty much have to try all paths and that is O(n^y) usually (with some newer methods lowering the bounds on y but not to a constant).

      For example there are many known paths to solve level 1 in pacman. But in the upper levels there are many fewer 'solves'. Some of those 'solves' do not even work in the lower levels.

      Also it 'is as easy as hell' for you as human. Teach it to a machine and you will quickly find out that the run time is polynomial. There are many NP problems that are like that where humans can see a solution instantly but known algorithms take poly time to figure out. It is why people suspect NP may equal P. However they can not prove it yet. Our brains may be doing multi testing also so the problems may still be NP (what some people suspect NP!=P) But each test is cheap...

      You are confusing pre rendered with NP problems. Think of it like this it takes a couple of weeks to render Toy Story 3. Yet it only takes you a couple of hours to watch... There are many shortcuts in problems like that these days. Where you pre-calculate then just use the result over and over. It is a good optimization. But does make NP=P.

  3. Re:stupid by oodaloop · · Score: 1, Troll

    Was that you watching me last night?

    --
    Tic-Tac-Toe, Global Thermonuclear War, and relationships all have the same winning move.
  4. Re:Yeah... by ZeroSumHappiness · · Score: 4, Funny

    Wouldn't that more be NPH-ard?

  5. How can Pac-Man be hard when there are patterns? by Anonymous Coward · · Score: 0

    Just program in the patterns.

  6. Pac-Man Was 'Solved' by Anonymous Coward · · Score: 1

    Pac-Man is solved. There's a book on how to beat it (sorry, I don't know the title). Well, at least the book tells you how to play the game until the arcade glitches out...

    1. Re:Pac-Man Was 'Solved' by UnknownSoldier · · Score: 5, Informative

      Yup, posted on /. a while back

      http://games.slashdot.org/story/10/12/03/2237200/pac-mans-ghost-behavior-algorithms

      --->

      http://gameinternals.com/post/2072558330/understanding-pac-man-ghost-behavior

      --->

      http://home.comcast.net/~jpittman2/pacman/pacmandossier.html

      I don't know what it is but reading about the internals of how games worked (algorithms, data structures, tricks, etc.) is neat.

    2. Re:Pac-Man Was 'Solved' by mosschops · · Score: 1

      One of the books that includes all the maze patterns: http://www.amazon.com/Video-Masters-Guide-Pac-Man/dp/0553229591

      Though it doesn't go as far as achieving the maximum possible score, as that requires other manual tricks to round up the ghosts.

    3. Re:Pac-Man Was 'Solved' by slim · · Score: 2

      Indeed, PacMan was solved, but that doesn't mean it can't be NP-Hard.

      People solve Sudokus every day; a computer can do it in a flash - yet Sudoku is NP-Complete. In a 9x9 grid, the scale of the problem remains small enough that you can brute-force it. Make a bigger Sudoku -- or a bigger pacman maze -- and it would become significantly more difficult to solve.

    4. Re:Pac-Man Was 'Solved' by Anonymous Coward · · Score: 0

      Well, is a bigger pacman-maze harder to solve? If you want to take the optimal shortest path - sure! But you don't need to do that. You just need to get all the dots, who cares if you walk the same circuit many times while avoiding the ghosts?

  7. What does the hell does NP Hard mean? by hairyfish · · Score: 5, Insightful

    Yes I RTFA and wiki'd it but that page makes no sense to me either. Can someone give me the NP Hard/PSpace Hard for dummies version? Or maybe give me an analogy using football fields?

    1. Re:What does the hell does NP Hard mean? by Anonymous Coward · · Score: 0, Troll

      Here is a site that may be more your speed.

    2. Re:What does the hell does NP Hard mean? by RJFerret · · Score: 3, Informative

      I had the same issue, but better wiki luck... NP-hard was confusing as the article kind of defines it by itself. However, there is a link in it to a more sensible version:

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

    3. Re:What does the hell does NP Hard mean? by cslax · · Score: 5, Informative
    4. Re:What does the hell does NP Hard mean? by JustSomeProgrammer · · Score: 3, Informative

      It means it isn't computationally solvable in linear time. A computer would only be able to solve very very simple permutations of an NP hard problem in reasonable amount of time. The more complexity added to the problem space makes the time it takes to solve grow to be something most people would not wait around for.

      i.e. Traveling Salesman (look it up, its the classic problem) problem for 4 cities is pretty easy and quickly solved for by a computer. However 100 or 1000 cities takes much much longer for the best algorithms we have to solve it. (think minutes -> days -> decades for orders of magnitude larger problem space)

      There's a bit more math to a detailed explanation and this isn't entirely accurate in measurements, but this is the gist of it.

    5. Re:What does the hell does NP Hard mean? by jd · · Score: 3, Informative
      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    6. Re:What does the hell does NP Hard mean? by Hentes · · Score: 1

      It's all explained in the paper in the second link.

    7. Re:What does the hell does NP Hard mean? by Anonymous Coward · · Score: 3, Informative

      An oversimplification though - it really means it's not solvable in deterministic polynomial time. An algorithm with O(n^12328372) would still fall under P, because it's solvable deterministically in Polynomial time.

    8. Re:What does the hell does NP Hard mean? by Anonymous Coward · · Score: 0

      It means it isn't computationally solvable in linear time.

      Not quite. NP hard problems have a worst-case exponential complexity.
      So the class of problems that is not NP-hard include those solvable in linear, polynomial, time etc. (not just linear time)

    9. Re:What does the hell does NP Hard mean? by lgw · · Score: 2, Insightful

      OK, without the wiki dive, here's the short version:

      • * P is the set of problems that can be solved in polynomial (or better) time.
        * NP-Complete is the set of problems that (probably) can't be solved in polynomial time, but the solution can be verified in polynomial time.
        * NP-Hard is the set of all problems that can't be solved in polynomial time.

        Only two of those are actiually distinct. We think P and NP-complete are different, which would mean NP-Complete and NP-Hard are the same (IIRC).

      --
      Socialism: a lie told by totalitarians and believed by fools.
    10. Re:What does the hell does NP Hard mean? by Anonymous Coward · · Score: 0

      So, say the way a computer solves a problem is like going through a maze. At each step, you can choose one of a few paths, and eventually you'll reach an exit (symbolizing you've solved the problem), or you'll have covered the entire maze and you can conclude that there aren't any exits, so you stop trying.

      Say that the maze can be enormous -- infinite, even. If we're going to classify a maze as P, it means that there is a deterministic method for walking that maze where you can find an exit, or safely conclude that there aren't any exits. And, this method has to work in polynomial time -- this means that as the maze grows larger, the number of steps it takes to deterministically traverse this maze doesn't grow faster than some polynomial function. So, if you have a maze of size N, then any deterministic function to traverse that maze that is guaranteed to complete in less than N^p steps (for a fixed p) can be considered polynomial time. (contrast this with a function that traverses a maze of size N in N^N steps, or N! steps -- these functions grow much more quickly than polynomial functions).

      All of the mazes that are solvable this way are considered to be in class P (which stands for Polynomial Time).

      Now say that we remove the deterministic constraint (but everything else stays the same). This means that at each step, instead of choosing one path to take you can simultaneously try each path. This doesn't mean you get to skip steps -- if you had to go left, then right, then left to get to an exit, you'd still have to go through those three steps. It's more like, you can make a copy of yourself every time you face a decision, and send all of your copies down each path.

      In this case, if *any one* of the paths you take yields an exit, or concludes that it's impossible to find an exit, then you consider the maze solved. If you can still solve this maze in polynomial time with your new super powers (and we only count the number of steps the 'solution' copy took), then we consider it a part of the class NP (which stands for non-deterministic polynomial time --- *NOT* non-polynomial time, as many people mistakenly believe).

      There you have it --

      There are all kinds of really useful and interesting problems that are in NP (the traveling salesman problem is a good example), and NP is the go to definition of a problem space that is infeasible to solve with computers (a lot of cryptography depends on the crypto system being theoretically infeasible to crack, rather than impossible to crack). So proving things are in various problem classes has a lot of utility.

      NP-Hard is a subset of NP problems --- if a problem is in NP-Hard, then it's at least as hard as the hardest problem in NP.

    11. Re:What does the hell does NP Hard mean? by snowgirl · · Score: 4, Informative

      It means it isn't computationally solvable in linear time.

      No, it can't be solved in POLYNOMIAL time. For instance, comparative sorting cannot be done in linear, yet is not NP-hard.

      Something that is O(n^12387349892319348917359872394872328349872398723985729375982734598275) is in fact insanely hard, yet still not NP-hard.

      --
      WARNING! This girl exceeds the MAXIMUM SAFE standards established by the FDA for BRATTINESS
    12. Re:What does the hell does NP Hard mean? by Anonymous Coward · · Score: 5, Informative
      More or less correct, but you are slightly confused on the definition of NP-Hard.
      • NP is the set of problems that can be verified in polynomial time.
      • NP-Hard is the set of problems which are provably at least as hard as any problem in NP (in the sense that a solution to an NP-Hard problem can be used to solve any problem in NP with only polynomial additional effort).
      • NP-Complete is the intersection of NP-Hard and NP.

        It is believed that P != NP, and if any problem that is NP-Hard (usually one just says NP-Complete) turns out to be solvable in polynomial time, then P = NP.

    13. Re:What does the hell does NP Hard mean? by Faulkner39 · · Score: 2, Informative

      To solve a problem that has 'n' parts in it:

      PSpace hard means the problem is relatively simple, maybe check n things n times, which is only n*n things. For example, "For n cities, find the sum of all the distances between all the cities".

      NP hard usually means you have to start at one part, then make a new decision each time you want to move on to the next part. The classic example is: "for n cities, start at a city and find the shortest possible distance to visit each city once". Since you have to make a new decision every time, you can solve this problem using permutations: you have n choices for the first city, then n-1 choices for the next city, then n-2 choices for the next city, and so on. To check ALL of the possible routes you can take and select the shortest, you need to check (n)*(n-1)*(n-2)* ... * (2) * (1) things. That's a factorial, and is denoted n!.

      So for 12 cities:
      12*12 = 144
      12! = 479,001,600

      For 20 cities:
      20*20 = 400
      20! = 2.432902008×10^18

      The "search space" for problems that are NP Hard explodes to quickly to solve any reasonably sized problem. So basically, computers can solve problems that are PSpace hard, but they can't really solve any NP hard problems that are worth solving. E.g., to solve the NP Hard "traveling salesperson" problem I described above for all the cities in Italy, there's something like 12000 cities, which is (almost) impossible to solve with a computer. For fun:

      12000*12000 = 144,000,000
      12000! = 1.201858406×10^43741 (and that's just nuts)

      The above is not the only way a problem can be NP Hard, but all these kinds of problems have "similar" classes of "time complexity". If you model this "time complexity" (that is, count the number of things you have to check) as a function, PSpace hard problems are polynomials at worst. NP Hard are worse than polynomials. The notation used here is called "Big Oh", and the above two problems are O(n^2) and O(n!), respectively.

    14. Re:What does the hell does NP Hard mean? by Anonymous Coward · · Score: 0

      Suppose that n football players are standing in a field, and want to pass the ball between them so that each player gets the ball exactly once. The question is whether this is possible so that the ball never travels more than x feet.

      This problem is NP. One of the things this means is that, if the answer is 'yes', then I can give you some extra information that will help you "easily" (see below) verify it, but if it's 'no' then I cannot. For example, I can give you the correct order to pass the ball, if one exists, and you can "easily" verify that it qualifies.

      This problem is also NP-hard. This means that if you could "easily" solve this problem yourself (without my hint), then you could do the same for *every* NP problem out there. This would have significant implications, for example many security techniques rely on some NP problem being "hard" to solve.

      It is conjectured and widely believed, but not yet proved or disproved, that NP is different than P, meaning that NP-hard problems cannot be "easily" solved.

      In the above, "easy" means that there's some polynomial p(n) and an algorithm which always solves the problem correctly within time p(n), for any size n of the problem.

      PS: I'm not an American. Good thing wikipedia's article about football is clearer than about NP.

    15. Re:What does the hell does NP Hard mean? by Anonymous Coward · · Score: 5, Informative

      Roughly speaking, NP-hard (NP = non-polynomial) means that it scales non-polynomially fast ... e.g. if an algorithm is O(n^n) then it is NP-hard but if it is O(n^3) than it is only P-hard. By this definition, even O(n^lg(n)) is NP-hard and O(N^100) is "only" P-hard.

      No, no, no, no. NP does not mean "non-polynomial". In fact, all "P" problems are also "NP". NP means "nondeterministic polynomial", i.e, polynomial in a non-deterministic machine (think a computer with an infinite number of CPUs). It is unlikely that they are "P" ("deterministic polynomial"), but it has not been proven either way. Also, a problem being NP-hard doesn't imply that it is NP. It actually may be harder than NP: in general, to say that a problem is X-hard means that there is no problem of class X that is "harder" than it.

      For the precise definition of "harder", the wikipedia article http://en.wikipedia.org/wiki/P_versus_NP_problem is pretty good.

      (Hmm. it seems I can't log in from the comment box...)

    16. Re:What does the hell does NP Hard mean? by KhabaLox · · Score: 2
      --
      Ceci n'est pas un sig.
    17. Re:What does the hell does NP Hard mean? by FrootLoops · · Score: 1

      Mod up. This is the only correct explanation so far.

    18. Re:What does the hell does NP Hard mean? by FrootLoops · · Score: 1

      Mod up (or mod GP down). Confusing linear and polynomial time is a horrible mistake, and even then the GP assumes P != NP without saying so.

    19. Re:What does the hell does NP Hard mean? by dkf · · Score: 2

      We think P and NP-complete are different, which would mean NP-Complete and NP-Hard are the same (IIRC).

      There are many problems that are wholly outside polynomial complexity (used to work with some, years ago, and they were brutes even with a Top-500 supercomputer of the day). That means that NP-Hard must not be just NP-Complete; there's got to be higher levels in there.

      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
    20. Re:What does the hell does NP Hard mean? by FrootLoops · · Score: 2

      Also not quite. NP-hard problems can be as difficult as one likes. The key is that, given an oracle for an NP-hard problem, you can solve any NP problem within a polynomial amount of time (where calls to the oracle take unit time).

      Another point to be mindful of is that there are runtimes between polynomial and exponential.

    21. Re:What does the hell does NP Hard mean? by Faulkner39 · · Score: 2

      Correction: I confused PSpace with P. The above definition is for P and NOT PSpace. Haven't spent much time thinking about complexities ABOVE NP hard. PSpace actually considers the "memory" you need to solve the problem. This is relevant when you talk about Turing machines, where you have to use "tape" that you "write on" while solving the problem. The thing that's been proved is that you only need a polynomial amount of memory (relative to 'n') to solve problems that need NP Hard time.

    22. Re:What does the hell does NP Hard mean? by Anonymous Coward · · Score: 0

      wtf is g? gravity? define your variables. ef'ing math...

    23. Re:What does the hell does NP Hard mean? by sustik · · Score: 3, Informative

      Assuming NP != P your first sentence is correct. And maybe this is what laymen should know about it. However for completeness...

      In general a problem is presented as a string of n bits and the algorithm (Turing Machine) has to decide whether it is acceptable or not (good or bad etc.) For example, take the graph coloring problem. This involves a graph on m vertices and you have to color it using k colors such that neighboring vertices have different colors. The input to the algorithm is a description of the graph and k as a bit-string. And the bit-string is acceptable if there is a proper coloring.

      If the Turing machine can decide whether the bit-string with n bits is acceptable in less than p(n) steps where n is a polynomial, then the problem is in P.

      NP does *not* stand for Not P.

      NP means that there is a witness to the acceptability of a bit-string that can be verified in p(n) steps. For example, the witness for the graph coloring is an actual assignment of the colors to the vertices. It is quite straightforward to verify that the coloring is proper (no neighboring vertices have the same color, it takes less than n^2 color comparisons. NP stands for Nondeterministic Polynomial, I am
      not a fan of the name.

      NP-Hard means that the problem is such that any NP problem can be reduced to it (with a polynomial correspondance). Therefore, if you had a polynomial algorithm for it than you had one for *all* NP problems. This would imply P=NP and is doubtful to be true. In other words a proof of NP-hardness means: Yes, it is harder than P, at least most scientists think so.

      I have no idea yet how the Pac-Man problem is represented as a bit-string. I will find out tomorrow on a lecture...

      It is worth mentioning the class co-NP. This is a the class of problems for which there is a witness that the input is *not* acceptable. Think what witness could easily verify that a graph is not k colorable... For example existence of a full k+1 subgraph would suffice but other constructions also prohibit k coloring which have no full k subgraph in them. I do not recall from the top of my head whether k coloring is co-NP or not. But I think it is not, here is why:

      There is a conjecture that may have more chance than P = NP. And that is: P = NP intersect co-NP. That is if both acceptability and non-acceptibility can be polynomially verified then there would be a guaranteed polynomial algorithm. So far this appears to be the case.
      The last famous problem that is NP and co-NP at the same time and was found to be in P was prime testing.

      And of course there are many, many other complexity classes...

    24. Re:What does the hell does NP Hard mean? by lgw · · Score: 2

      But could you verify the solutions in polynomial time?

      --
      Socialism: a lie told by totalitarians and believed by fools.
    25. Re:What does the hell does NP Hard mean? by AmbushBug · · Score: 5, Interesting

      Heh, heh, yeah. Here, try wikipedia's "simple" version: http://simple.wikipedia.org/wiki/P_versus_NP.

    26. Re:What does the hell does NP Hard mean? by Morty · · Score: 4, Informative

      Mod parent down, please. The definition of NP above is circular -- if NP actually stood for non-polynomial, then P!=NP by definition. That would be begging the question.

      Rather, NP means "nondeterministic polynomial time." It is the class of problems whose solutions can be verified in polynomial time. NP-hard are the "hardest" problems in this class. All algorithms known to solve problems in this class are super-polynomial. The question of "P==NP?" really amounts to "is there an undiscovered polynomial solution to every problem that we currently think is NP-hard?" or even more simply, "if a problem's solution can be verified in polynomial time, can the solution be discovered in polynomial time?"

    27. Re:What does the hell does NP Hard mean? by Anonymous Coward · · Score: 0

      That doesn't matter for being NP-hard. As another AC posted above, "NP-Hard is the set of problems which are provably at least as hard as any problem in NP", and an NP-Complete problem is one that is both NP and NP-hard.

    28. Re:What does the hell does NP Hard mean? by godrik · · Score: 1

      I read so much wrong answer replying to you post I attempt a new explanation.

      A problem is in P if there is a polynomial time algorithm to solve it. It means, that there is a algo which will always find the correct answer AND the algorithm an instance of the problem in at most a*n^b operations, where a and b are constants and n is the size of the smallest file that can contain an instance of the problem. Example of problems in P includes: deciding whether a number is divisible by2, whether a number is prime, finding a shortest path between two points in a city, solving linear equations,...

      A problem is in NP, if a solution of an instance of a this problem has a solution whose size is at most a*n^b. I do not care about algorithms that generate that solution, juste about the size of the solution. Interestingly, all problem that are in P are also in NP. The reverse, might or might not be true.

      A problem is NP-hard if, assuming we have an algorithm that can solve that problem in constant time for (think one assembly instruction on your computer), it can be used to solve all the problems in NP in polynomial time.

      If a problem is NP-hard AND in NP, then the problem is said to be NP-complete. This class of problem is interesting because, some mathematical techniques have been used to show that some practically relevant problems are NP-complete: the most comon one if the post delivery problem: "is it possible to deliver the mail for all the inhabitant of a given city while travelling less than a given number of miles".

      There are no known polynomial algorithms for NP-complete problems. And actually, most theoreticians believe that we do not know any because no such algorithm exist. So if you have an algorithm that solve all problems in a*n^b operations, then b is typically not a constant, it is a function of n. (or at least we believe)

      Notice that all the talk on P, NP and NP-complete consider ALL the instances of a given problem. Some instances might be easy for some algorithms but if a problem is NP-complete (or NP hard), then there exists an instance which the algorithm can not solve in polynomial time (or at least that what we believe).

      Interestingly, all NP-complete problems are "equivalent", if we can solve one in polynomial time, we can solve them all in polynomial time. That mandate the search for weird problems that can be shown to be NP-complete. Because solving any of them in polynomial time would solve them all. And we have been trying to do that for more than 60 years.

      Moreover, because of how NP is defined, all NP-complete problems can be solved by an exponential algorithm (one that would take less than a*n^(b*n^c), where a, b and c are constants)

      P-space is a little bit different. All the classes I mentionned before, P, NP, NP-Complete are interested in runtime of the algorithm and are sometimes called P-time, NP-time, NP-time-complete. P-space is interested in how much memory is required to solve a problem. Interestingly, P-time and NP-time are in P-space.

      Showing that doom is P-space-hard is interesting because there are not too many practically relevant problems that are shown to be P-space-hard.

      I hope it helps people understand.

    29. Re:What does the hell does NP Hard mean? by Anonymous Coward · · Score: 0

      Yes I RTFA and wiki'd it but that page makes no sense to me either. Can someone give me the NP Hard/PSpace Hard for dummies version? Or maybe give me an analogy using football fields?

      That's OK, just hand me your nerd card. The door's over there, please take the first left and you'll find Digg if you keep walking.

    30. Re:What does the hell does NP Hard mean? by Surt · · Score: 1

      So, most computer scientists assume P != NP. But there's no proof (yet).

      NP-hard is a class of problems, the solution of which is guaranteed not more efficient than NP. That is, there is a demonstrated way to convert an NP-complete problem (let's call that problem NPC) to the hard problem (NPH), and the conversion can be done in polynomial time.

      How does that work? Well, if you were able to solve the NPH problem more efficiently (in polynomial time or better), you'd first use the conversion (costing you only polynomial time, as required above), then use your efficient NPH solver (again, polynomial time), and the combined solution would be polynomial time (The additive time of two polynomial algorithms is also polynomial). If you had any such NPH solution, it would be a satisfactory proof that P = NP. If you assume that P != NP (as most of us do ...), then this means that NPH, like NPC and NP are, in fact, 'harder' than problems that are merely polynomial in difficulty.

      So understanding all that, NPH is a class of problems. It includes all NPC problems as a subset, plus some problems that are even harder.

      --
      "Who is the Journal of Quantum Physics going to believe?" --Stephen Hawking
    31. Re:What does the hell does NP Hard mean? by ProfessorPillage · · Score: 2

      Right, except that NP-hard problems don't have to be in the NP class, they can be harder. They are the problems, not necessarily in NP, that are at least as hard as the hardest problems in NP. You're thinking of NP-complete or equivalent.

    32. Re:What does the hell does NP Hard mean? by betterunixthanunix · · Score: 1
      1. P -- problems that can be solved in time that grows according to some polynomial of the size of problem (e.g. sorting -- can be solved in n^2 time by bubble sort).
      2. NP -- problems that can be verified in polynomial time; we think that some of these problems cannot be solved in polynomial time. For example, graph three colorability is in NP and is not known to be in P; this means that if I show you a 3-colored graph, you can check that it is indeed 3-colored in polynomial time, but if I give you a graph and ask you to compute its 3-coloring, the amount of work you do will be exponential in the size of the graph (unless P=NP).
      3. NP-complete -- problems for which any polynomial time solution would imply a polynomial time solution for any NP problem and for which a proof that shows there is no polynomial time algorithm would imply that none of the NP-complete problems can be solved in polynomial time.
      4. NP-hard -- problems which any NP-complete problem can be reduced to i.e. given an NP-complete problem, it can be reexpressed as an NP-hard problem. Another way to state this is that NP hard problems cannot be solved faster than NP complete problems. Note that while a polynomial time solution to an NP-hard problem would imply P=NP, it is not the case that a proof that NP-hard != P implies P!=NP.
      5. PSPACE -- problems which can be solved using a polynomial amount of space. Note that this not only includes P, but also NP and NP-hard, as well as even harder to solve problems.
      6. PSPACE-complete -- same as NP-complete, but for PSPACE rather than NP.
      7. PSPACE-hard -- ditto.

      ...or you can consult the nearest copy of Goldreich's computational complexity text, which covers these in more detail than Slashdot ever could.

      --
      Palm trees and 8
    33. Re:What does the hell does NP Hard mean? by Anonymous Coward · · Score: 0

      it is not g(n), but rather lg(n) which is the binary logarithm, i.e. log_2 (n). Unlike science where 10 is the natural base or calculus where e is, in comp sci, 2 is the natural base and so complexity often uses lg() rather than log() or ln(). lg(n) infinity, n^lg(n) is still bigger. Even more extreme would be something like O(n^ lg(lg(n)) for which n must be bigger than 2^(2^100) to beat n^100. This n is more than 10^(10^10), a 1 followed by 10 billion 0's.

    34. Re:What does the hell does NP Hard mean? by elsurexiste · · Score: 2

      Ron Fagin (a heavyweight in this topic) once told me about this in layman's terms. Can't remember precisely, but this is more or less what he said:

      I assume you know Sudoku. Solving a Sudoku game from the clues has a certain difficulty (complexity). Compare it with just verifying that a Sudoku with all its squares filled is a valid solution. You can see that verifying a solution is much faster than finding one! In general, we can accept that verifying is faster than solving... but even though it's intuitive, no one has proven it :) .

      He left out what he meant about complexity, though...

      --
      I rarely respond to comments. Also, don't ask for clarifications: a brain and Google are faster, believe me!
    35. Re:What does the hell does NP Hard mean? by Anonymous Coward · · Score: 0

      But an oversimplification that didn't use the phrase "polynomial time" without defining it, like (literally) every other response that offered an explanation, and therefore provided the only real explanation.

    36. Re:What does the hell does NP Hard mean? by Anonymous Coward · · Score: 0

      You can't have an "infinite number" of anything. Infinity doesn't work that way. It simply means arbitrarily large, as in "given any finite value N, I have more than N CPU's in my computer". There's no concept of an infinite number.

      Also, nondeterminism doesn't really work the way that would imply. A more exact definition is that if you already have the answer you can confirm it deterministically in the complexity class. You're basically saying that you want to simultaneously test every possible answer on a separate CPU in parallel and have the one which tests positive report back, but for someone who's trying to learn the concept, your way is only confusing.

    37. Re:What does the hell does NP Hard mean? by Anonymous Coward · · Score: 0

      Mod down, this is plain wrong.

    38. Re:What does the hell does NP Hard mean? by Jason1729 · · Score: 2

      Totally wrong. First, as the previous response said NP-hard is a separate set from NP. The intersection of the two sets is called NP-complete. NP-hard are the "hardest" problems in this class is axiomatically wrong because NP-hard is not a subset of NP.

      Second, by definition of NP-hard, given a polynomial-time solution to any NP-hard problem, you can solve *every* NP problem in polynomial time, so what you meant to say is The question of "P==NP?" really amounts to "is there a polynomial-time solution to any problem that has been rigorously proven to be NP-hard?

    39. Re:What does the hell does NP Hard mean? by Jason1729 · · Score: 1

      Mostly wrong, and even the parts that a right, you make far more confusing than the need to be. I think you're using your maze example to try and represent branching within the algorithm and only confusing yourself. How would the maze for multiplying two numbers together (a P algorithm) look different from the maze for the satisfiability problem (an NP-complete algorithm)? I really can't picture your maze for either of them.

      As far as your nondeterminism allowing you to simultaneously try each path, make copies of yourself, etc. It's just confusing, it makes NP harder to understand, and really clouds what's actually going on. Look at it this way. Nondeterminism allows you to always choose the correct path. Every branch you come to, you have the magic ability to pick the correct path on the first try. I call it a magic ability, you call it a super power. Forget about trying to understand how you're trying all paths; the whole concept is a mathematical model, so why inflate it with bloat trying to explain something that need not be explained?

    40. Re:What does the hell does NP Hard mean? by goose-incarnated · · Score: 1

      You can't have an "infinite number" of anything. Infinity doesn't work that way. It simply means arbitrarily large, as in "given any finite value N, I have more than N CPU's in my computer". There's no concept of an infinite number.

      Actually, you are wrong - inifinity does not mean "arbitrarily large" (nor "arbitrarily small"). There is the concept of an infinite number. We call them non-real numbers. Pi, for example, comes to mind as an actual number that is infinite.

      Better example (from an assignment in COS101, circa 1995): Prove that infinity comes in different sizes. Bonus points: prove that it comes in an infinite number of sizes.

      Pick any two numbers, X and Y such that X < Y. Then choose two fractional numbers less than one, A and B, of the form 1/A and 1/B. This results in
      (X+A) < (Y+B)
      no matter what the numbers are. Since A and B is a fraction of the form 1/A and 1/B, both A and B can increase or decrease to infinity, but no matter what value they are, the infinity represented by (X+A) will always be less than the infinity between (X+B). Since X and Y can also increase/decrease to infinity, it follows that infinity comes in different sizes.

      Example: X=2, Y=3. This means that (X+A) will be of the form (2+1/2), or (2+1/3), or (2+1/4) ... all the way to infinity. It also means that (Y+B) will be of the form (3+1/2), or (3+1/3) or (3+1/4) ... all the way to infinity. This means that there is an infinite number of numbers between 2 and 3, all of which are smaller than the infinite number of numbers between 3 and 4. Thus there are two infinities, and the infinity in the one is smaller than the infinity in the other.

      HTH

      --
      I'm a minority race. Save your vitriol for white people.
    41. Re:What does the hell does NP Hard mean? by Anonymous Coward · · Score: 0

      To your last sentence: O(f(n)) denotes a set of functions - a linear function is in fact also an element of O(n^12387....5), so just that a problem is solvable in O(n^12387...5) (denoting an UPPER BOUND) does not necessarily mean that it is "insanely hard", it can in fact be quite easy, for example, solvable in constant time. Good lower bounds are much harder to come by than upper bounds for most problems.

    42. Re:What does the hell does NP Hard mean? by FrootLoops · · Score: 1

      What's wrong with it? If you're in a very nitpicky mood, the word "provably" should be removed from the second point (our ability to prove something is irrelevant to the definition of a complexity class), but that's a ridiculously minor error. It's nothing compared to the errors in the post they replied to.

    43. Re:What does the hell does NP Hard mean? by YoopDaDum · · Score: 2

      You can't have an "infinite number" of anything. Infinity doesn't work that way. It simply means arbitrarily large, as in "given any finite value N, I have more than N CPU's in my computer". There's no concept of an infinite number.

      There is definitely a concept of infinite, and actually there are several different kinds of infinite. With some infinite bigger than others (size of set of natural numbers vs. real for example), which usually give a "wow" moment the first time you encounter this concept.

      There's plenty of funny things with infinite sets. For example, what about the size of the set of positive integers N, and the size of the set of pairs of integers NxN? In a way, for each integer you can have a subset of NxN as large as N: think all (0, n), (1, n), etc. So surely NxN is much bigger than N? Nope, they're actually the same size because you can find a one to one mapping between N and NxN. Think about a growing linear spiral over a 2D grid for example.

      For more on this, you can look-up "Aleph number" on wikipedia, or look-up various articles there on infinite and infinity.

    44. Re:What does the hell does NP Hard mean? by dotbot · · Score: 1

      You can't have an "infinite number" of anything. Infinity doesn't work that way. It simply means arbitrarily large, as in "given any finite value N, I have more than N CPU's in my computer". There's no concept of an infinite number.

      You're confusing people because it sounds like "It" is referring to infinity. Also, I think you meant to say explicitly that there is no concept of infinity required for the definition of NP. I would agree that the above poster would have been better saying "think a computer with an unbounded number of CPUs".

      Also, nondeterminism doesn't really work the way that would imply. A more exact definition is that if you already have the answer you can confirm it deterministically in the complexity class. You're basically saying that you want to simultaneously test every possible answer on a separate CPU in parallel and have the one which tests positive report back, but for someone who's trying to learn the concept, your way is only confusing.

      I generally agree. But I'm not sure the above poster meant that every answer is tested though. They could have been describing a scenario where, when a computational step from one state results in N states, the program does N - 1 'fork-exec's and the newly spawned processes can run in parallel with the original process, i.e. modelling a non-deterministic machine.

    45. Re:What does the hell does NP Hard mean? by dotbot · · Score: 1

      of course, where I said 'fork-exec', I just meant fork. It's been a long time since I just did a fork.

    46. Re:What does the hell does NP Hard mean? by ildon · · Score: 3, Interesting

      Wow, an actual use for the simple version of wikipedia. Who knew?

    47. Re:What does the hell does NP Hard mean? by Morty · · Score: 1

      Augh. Correct.

    48. Re:What does the hell does NP Hard mean? by JustSomeProgrammer · · Score: 1

      Right sorry. It has been a long time since I actually studied it.

    49. Re:What does the hell does NP Hard mean? by snowgirl · · Score: 1

      Informally, especially in computer science, the Big O notation often is permitted to be somewhat abused to describe an asymptotic tight bound where using Big Theta notation might be more factually appropriate in a given context. For example, when considering a function T(n) = 73n3 + 22n2 + 58, all of the following are generally acceptable, but tightnesses of bound (i.e., bullets 2 and 3 below) are usually strongly preferred over laxness of bound (i.e., number 1 below).
      T(n) = O(n100), which is identical to T(n) O(n100)
      T(n) = O(n3), which is identical to T(n) O(n3)
      T(n) = (n3), which is identical to T(n) (n3).
      The equivalent English statements are respectively:
      T(n) grows asymptotically no faster than n100
      T(n) grows asymptotically no faster than n3
      T(n) grows asymptotically as fast as n3.
      So while all three statements are true, progressively more information is contained in each. In some fields, however, the Big O notation (number 2 in the lists above) would be used more commonly than the Big Theta notation (bullets number 3 in the lists above) because functions that grow more slowly are more desirable. For example, if T(n) represents the running time of a newly developed algorithm for input size n, the inventors and users of the algorithm might be more inclined to put an upper asymptotic bound on how long it will take to run without making an explicit statement about the lower asymptotic bound.

      Yes you are pedantically correct, but CS (where I learned the big-O notation) tends to abuse it, because in algorithm analysis making such a weak argument as "this linear function is O(n^12387...5)" is next to meaningless, and impractical. Yes, it is mathematically true, but for practicality (since computer science is the practical application of math) one typically considers big-O notation to describe the strongest upper-bound statement available.

      Sure, mathematics has need to be stricter about the rules of Landau notation, but in computer science there's far less of a care about such details.

      As a good example, talking about vector spaces in mathematics requires notation as to how many dimension the vectors hold (e.g. v elements R^42), meanwhile in practical physics, it's like "duh, of course this vector is three dimensional, why would you ask such a question?"

      So, yes, you're right, and no, most computer science people don't give a shit. (My first response as a pedant though is "sorry, yes, I should have used theta-notation there.")

      --
      WARNING! This girl exceeds the MAXIMUM SAFE standards established by the FDA for BRATTINESS
    50. Re:What does the hell does NP Hard mean? by HapSlappy_2222 · · Score: 1

      This page is much easier to understand, yes, but the concept initially made my brain want to bash that example lady in the face with her own rocks 1,267,650,600,228,229,401,496,703,205,376 different ways. Is that problem NP-Hard too?

    51. Re:What does the hell does NP Hard mean? by HapSlappy_2222 · · Score: 1

      I'm confused by NP-Hard still. Does this mean that NP-Hard problems CANNOT be verified in polynomial time? I get that the "at least as hard as any problem in NP" bit but I don't see why they aren't a just a subset of NP (or maybe they are? Maybe that's my question; which is the superset?)

    52. Re:What does the hell does NP Hard mean? by Anonymous Coward · · Score: 0

      That's not actually an optimization problem, so it's not easily sortable into a problem class. ;)
      (It would take you O(2^N)-scale time, but that's a subtly different thing.)

    53. Re:What does the hell does NP Hard mean? by FrootLoops · · Score: 1

      Perhaps a little bit of "informal formality" will help. Suppose you have a problem A that you can solve with calls to a subroutine also named A. A is called NP-Hard if the following holds. Given any problem Z in NP, we can write a subroutine which solves Z subject to two constraints: (1) Z can call A, but *calls to A take one cycle to complete*; (2) Z must run in polynomial time.

      The runtime of A is irrelevant. The essential feature of the definition is that the NP-Hard problem A can be used to solve an arbitrary NP problem with only a polynomial number of calls to A and polynomial additional work.

      One can imagine an extremely difficult problem B whose solution cannot in general be verified in polynomial time but which is powerful enough to solve any NP problem in the above sense. B would then be NP-Hard but not NP. Alternatively, perhaps there are problems C whose solution can indeed be verified in polynomial time and which are powerful enough to solve any NP problem. C would then be both NP-Hard and NP--such a problem is called NP-complete.

      In fact, B can be the problem of halt checking and C can be the decision version of the traveling salesman problem. B, which is NP-Hard but not NP, shows that NP-Hard cannot be a subset of NP. However, perhaps NP is a subset of NP-Hard.

    54. Re:What does the hell does NP Hard mean? by HapSlappy_2222 · · Score: 1

      I think I got it... thank you, that really was helpful.

      As an aside, I'm starting to think simplifying an explanation for NP-Hard is NP-Hard, and my personal understanding of all of these explanations is NP-Complete. Hey, wait.... do I get my $1,000,000 now?

    55. Re:What does the hell does NP Hard mean? by Anonymous Coward · · Score: 0

      stolen (copy-pasted) from flabbergasted1 on reddit:

      P versus NP.
      We have problems. We want to solve them. We don't want it to take very long. We are busy people, after all.
      I. What is P?
      Here's one problem. I give you a picture, and I ask you to turn every red pixel blue. Easy! You go down the line asking every pixel, "hey man are you red?" and, if it is, you turn it blue. That wasn't so bad!
      If we had an n x n grid of pixels, it only took us n2 steps! Or, if you want to call asking and changing two different steps, it took us twice that. Fine, whatever. We're theoretical computer scientists here, we don't really care about the coefficient. Actually, we don't even care about the exponent! It took us a polynomial amount of time, and that's what matters.
      This problem â" the "turn red into blue" problem â" is solvable in polynomial time, so it is in the complexity class called P. We are very creative when it comes to naming complexity classes. P is the complexity class of all problems that can be solved in a polynomial amount of time.
      Here's another problem in P. Say we have two numbers and we want to know what their greatest common divisor is. Using Euclid's algorithm, we can actually solve this in a polynomial amount of time. (If you don't know what Euclid's algorithm is, you can check it out on Wikipedia. Or not. It's not that important to this explanation.) So if the bigger of the two numbers is n, it takes a number of steps which is a polynomial in the size (number of digits) of n.
      Here's yet another one, and it's pretty surprising. If you have a positive integer, and you want to know if it's prime, that's also in P! There's a way of checking that takes only a polynomial number of steps. If you're not convinced that this is surprising, note that this wasn't known until 2002.
      II. What is NP?
      Okay, it seems like there are a lot of problems we can solve in P. What else is there?
      Here's a problem it doesn't seem like should be in P. Let's say you want to figure out my password. I'm a very secretive person, but I'm also pretty friendly so I let you know that my password consists of eight lowercase letters, and nothing else. I also give you a place to enter as many guesses as you want, and have it tell you if it was right or not.
      [Note: For this to be a deterministic problem, you theoretically have to know everything there is to know about the setup, which is not the case if a computer is magically telling you if you were right or wrong. Ignore this for the sake of explanatory purposes; I'll tell you a real NP problem shortly.]
      How long will it take you to figure out my password? At the very most, it'll take you 268 guesses. Well hey, that's an exponentiation, right? Let's celebrate, we're in polynomial time again!
      Erâ" wait. No. The "size" of the problem was the 8, not the 26. So it took 26n steps, which is decidedly not a polynomial. Darn.
      Here's the interesting thing though: once we believe we have an answer, it only takes us a polynomial amount of time to verify it (namely, 1 step)! No matter how hard the problem was to solve, we can check the solution really quickly. And that's NP. The class of problems that are verifiable in polynomial time. (There are actually a number of equivalent definitions of NP that don't really seem equivalent but are; this is just the easiest one to understand. NP stands for non-deterministic polynomial time, which is about using a non-deterministic Turing machine to solve the problem... but you don't want to hear about that.)
      Okay, what's something else that's in NP? Do you like mazes? Because I love mazes! If I give you a maze (let's make it a 3D maze so you don't whine about the right hand rule), it could take you an awful long to find a way through it. But, once you have a solution (in the form of something like "forward, forward, right, down, down, down, ...") it would take a polynomial amount of time to check that you were right. NP!
      What else, what elseâ½ Something called "SAT" is also in

    56. Re:What does the hell does NP Hard mean? by Anonymous Coward · · Score: 0

      Hey, nice wiki link. That puts it in terms even I can understand. thanks!

  8. Re:Yeah... by jhoegl · · Score: 1

    To the Yar'eth degree

  9. No it's not by Anonymous Coward · · Score: 0

    I guess he forgot to play the actual stand-up game. There's a pattern.

    http://www.math.montana.edu/~hyde/pacman/

    I used to play from the moment my mom went into the grocery store, until she checked out.

    1. Re:No it's not by Anonymous Coward · · Score: 0

      Since you obviously don't understand what "NP-hard" means why do you bother posting?

  10. What is the ideal level of complexity? by jd · · Score: 1

    Assuming that this method of measuring complexity is actually useful, is there an ideal level of theoretical complexity in a computer game?

    (This is not necessarily the same as the complexity of play - Doom is, after all, very easy to play but PSPACE-hard problems are extremely difficult problems to solve.)

    Any retro-gamers here want to determine the theoretical complexity of Wizardry, Atic Atac, Knightlore, Citadel or Cholo?

    Is there any correlation between the complexity and how long the game stuck in people's minds?

    --
    It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    1. Re:What is the ideal level of complexity? by GoodNewsJimDotCom · · Score: 2

      Speaking as a game designer/programmer, I like it when games are too hard to solve outright, but not too hard to employ strategies based on your current state. The more possible strategies people can employ in different situations gives people the fun-factor.

  11. and Pac-Man never was by Trepidity · · Score: 1

    They use a pretty conveniently screwed up variant of Pac-Man for their proof, not the actual Pac-Man, where there's free choice and arbitrarily fast transitions between the different ghost modes, so it's even further from true here than for Tetris.

    1. Re:and Pac-Man never was by hal2814 · · Score: 5, Interesting

      They didn't actually use Pac-Man in their proof. They modeled up a close approximation which is not Pac-Man at all. For example, FTA:

      "We assume full configurability of the amount of ghosts and ghost houses, speeds, and the durations of Chase, Scatter, and Frightened modes (see [1] for definitions)."

      That's all well and good but there is no configurability with the level designs, amount of ghosts, or ghost houses.

    2. Re:and Pac-Man never was by Anonymous Coward · · Score: 0

      The "conveniently screwed up variant" was necessary because in the original Pac-Man, the ghost behavior is not random, so "perfect play" is possible by traversing the maze on each level in a specific pattern (ignoring the buggy split-screen level).

    3. Re:and Pac-Man never was by TuringTest · · Score: 4, Insightful

      "We assume full configurability of the amount of ghosts and ghost houses, speeds, and the durations of Chase, Scatter, and Frightened modes (see [1] for definitions)." That's all well and good but there is no configurability with the level designs, amount of ghosts, or ghost houses.

      There was, while they designed the game.

      The PacMan videogame is one instance of a problem class. Algorithmic complexity is calculated for classes of problems, since for any particular instance you can always design a trivial, constant time algorithm if at least one solution is known...

      --
      Singularity: a belief in the "God" idea with the "demiurge" relation inverted.
    4. Re:and Pac-Man never was by delinear · · Score: 1

      That's like me saying the small hill I go up on the way home from work is a harder climb than Everest, then piling it a mile high with junk to prove it and when someone calls me on it responding with "I have to build it up this way, otherwise it's an extremely easy climb". You can't say "Pac-Man is X" then change the nature of Pac-Man to make it X as your proof, because at that point it is definitely X but it's no longer Pac-Man.

    5. Re:and Pac-Man never was by hal2814 · · Score: 3, Insightful

      I agree, but that means that PacMan itself is not NP Hard. The class of games defined in the paper (to which PacMan belongs) is NP-Hard. That's a significantly different claim.

    6. Re:and Pac-Man never was by cpu6502 · · Score: 1

      I think Pac-man and Ms. Pac-man are quite easy, and don't comprehend anybody who uses the word "hard" in conjunction with them. Sure when you first start out, you need to develop the skills, but it doesn't take that long.

      The Atari console variants are particularly easy (read: boring). Why are all the ghosts running around randomly, instead of chasing the player? Poor programming.

      The Jr. Pac-Man port is the superior version on that old console.

      --
      My AC stalker: " I personally agree with your posts most of the time, but that won't keep me from modding you troll"
    7. Re:and Pac-Man never was by Anonymous Coward · · Score: 0

      Which is fine, because that is how these proofs generally go.

      Thm: Problem Y is NP hard

      Proof:

      1. Problem X is NP hard

      2. Problem Y is reducible to problem X

      3. Thus, problem Y is NP hard

    8. Re:and Pac-Man never was by retchdog · · Score: 1

      you mean X is reducible to Y.

      --
      "They were pure niggers." – Noam Chomsky
    9. Re:and Pac-Man never was by Anonymous Coward · · Score: 0

      You can't really say it's easy as there is no goal except for living forever and you are incapable of doing that. It just doesn't make logical sense. Sure, beating the 1st level is easy, that's the point.

  12. Pacman is NOTHING!!! by oldhack · · Score: 1

    NP-hard Pacman's got nothing on Undecidable Ms. Pacman. You don't even wanna know about sheer evil that is Mrs. Pacman.

    --
    Fuck systemd. Fuck Redhat. Fuck Soylent, too. Wait, scratch the last one.
    1. Re:Pacman is NOTHING!!! by godrik · · Score: 3, Funny

      NP-hard Pacman's got nothing on Undecidable Ms. Pacman.

      There is a known theorem that says: "As soon as you throw women in, nothing is decidable anymore!"

    2. Re:Pacman is NOTHING!!! by JoshuaZ · · Score: 1

      Actually you can use a padding argument to construct languages that are equivalent to the Halting problem but aren't NP-hard. For example, let t_n be the nth Turing machine by some reasonable ordering. Consider then the language that accepts a number k written in binary if and only if k=2^2^2^n for some n such that t_n halts on the blank tape. This is equivalent to the halting problem but the language size blows up too fast to gives answers to NP-hard problems (as long as P!=NP. Of course if P=NP then all languages are NP hard).

  13. I'm NP-Hard by Anonymous Coward · · Score: 0, Offtopic

    Thats what my wife said.

  14. Get a real job by Anonymous Coward · · Score: 0, Offtopic

    This is just why the Italian economy is failed.

  15. Where is dem pretty pictures? by Bonobo_Unknown · · Score: 1

    Holy shit I don't want to read an article, led alone a scientific, peer reviewed article. Isn't there a pretty picture of a graph somewhere?

    --
    We don't believe in radical loony monotheistic religions from the middle east -- we're Christians.
  16. NP is not hard by questhe · · Score: 0

    The problem is actually NP-Easy, you insensitive clod! And I am Handi-capable!

    --
    You don't understand: I am not locked up in here with you, you are locked up in here with ME!
  17. What I got from the comments is.. by Anonymous Coward · · Score: 4, Insightful

    ....that for a bunch of nerds nobody seems to know what NP really stands for

    1. Re:What I got from the comments is.. by Anonymous Coward · · Score: 0

      No Problem, man.

  18. How you define the problems matter by JoshuaZ · · Score: 4, Interesting

    This is a good example of how you define the problems mattering. For example he declares Starcraft to be at least NP-hard. But if one is allowed to use trigger events and some other aspects of the scenario editor one can actually fully model a Turing machine in Starcraft. You do this in a straightforward way by giving trigger based instructions to a unit (say a probe) and have it move along a line where having some other specified unit in an adjacent spot represents a 1, or one has a 0 if the unit isn't there. This is a much stronger result than the result he has. But it seems that his version of Starcraft as defined doesn't let you use event triggers (or at least he doesn't mention them). So he only gets the weaker result of Starcraft being NP hard.

    In the 1970s and 1980s, showing something was NP-hard used to be a big deal and there are a lot of papers from that time period. As the techniques improved one occasionally got some fun with someone showing that some new game was NP hard or NP complete (Tetris was done a few years ago as was Minesweeper). But these are really not considered to have any real insight. This paper is a bit more impressive because of the sheer number of games, and the systematic way he approaches the games especially his Metatheorem 1 and Metatheorem 2. Those two results are not obvious. Overall this is quite clever and makes for a fun read.

    1. Re:How you define the problems matter by ildon · · Score: 2

      It's pretty obvious he's only talking about unmodified multiplayer Starcraft. Once you get into mods (custom maps), it's hard to really still call them "Starcraft" (the game) despite them running within "Starcraft" (the piece of software).

  19. he got at least one detail wrong by PJ6 · · Score: 2
    For Load Runner -

    On the rst traversal, the avatar can safely land on top of the enemy and dig a hole on the left. The AI will make the enemy fall in the hole, so the avatar may follow it, land on its top again, and proceed through a ladder, while the enemy remains forever trapped in the hole below. The avatar cannot attempt to traverse the gadget a second time without getting stuck in the hole where the enemy previously was.

    That's just not true. Grain of skepticism += 1.

    1. Re:he got at least one detail wrong by Anonymous Coward · · Score: 0

      For Load Runner -

      On the rst traversal, the avatar can safely land on top of the enemy and dig a hole on the left.
      The AI will make the enemy fall in the hole, so the avatar may follow
      it, land on its top again, and proceed through a ladder, while the enemy
      remains forever trapped in the hole below. The avatar cannot attempt to
      traverse the gadget a second time without getting stuck in the hole where
      the enemy previously was.

      That's just not true. Grain of skepticism += 1.

      What is wrong with that? If you cannot replicate that gadget, you probably are not playing with the original Load Runner, but a remake, or a sequel, or a clone. There are levels in the original game that are based precisely on that behavior of the monsters (I'm referring to the sentence "The AI will make the enemy fall in the hole"). Just try the arcade version (MAME), look for a level that has some similar configuration, and see for yourself. Mastering the enemies' reactions and AI in Lode Runner is a key aspect for beating harder levels, so pretty much any experienced player should agree that the gadget works as described in the paper.

    2. Re:he got at least one detail wrong by Anonymous Coward · · Score: 0

      I hope the Lode/Load typo is yours. Off to check TFA...

    3. Re:he got at least one detail wrong by Anonymous Coward · · Score: 1

      Yes, it's a typo. The game is Lode Runner, and the gadget described in the paper works in the original version of the game. It does not work in some later remakes, such as Sierra's "Lode Runner: The Legend Returns," dated 1994.

    4. Re:he got at least one detail wrong by PJ6 · · Score: 1

      Yes it's a typo, one that I can never correct no matter how it nettles to see that I made it.

      Also - I never played the arcade version, so I stand corrected.

  20. Hard to believe by garaged · · Score: 1

    It is hard to believe since I played continually over 2 hours without loosing all lives, I remember I found a single path tha would allow me to continue playing with phantoms running at really fast pace, the hard part was to be constant, but doable nevertheless

    --
    I'm positive, don't belive me look at my karma
  21. Bejeweled? by Anonymous Coward · · Score: 0

    I would like an thorough analysis of how hard Bejeweled (PopCap Games) is.

    (HTML5)
    http://bejeweled.popcap.com/html5

  22. The crowd at Slashdot has really changed... by 11011001 · · Score: 0

    since only a few years ago. The comments on this story are very disappointing.

  23. Old games by White+Flame · · Score: 1

    Doom is being lumped into the same game era as Pac-Man? Why am I suddenly getting a desire to have a lawn?

    1. Re:Old games by Anonymous Coward · · Score: 0

      Doom is being lumped into the same game era as Pac-Man? Why am I suddenly getting a desire to have a lawn?

      You mean, to defend with a shotgun, and tell kids to get off of it, right?

    2. Re:Old games by 93+Escort+Wagon · · Score: 1

      Doom is being lumped into the same game era as Pac-Man? Why am I suddenly getting a desire to have a lawn?

      Bad as that is, I found the lack of ANY reference to Calvinball far more distressing.

      --
      #DeleteChrome
    3. Re:Old games by EdIII · · Score: 1

      Let's be fair.

      If you played Doom without Godmode on, it was fairly hard. You had to spend some time doing it, and learn tactics. Not to mention a fair amount of luck.

      I put Doom and Pac-Man into the class of games that are enjoyable because they are hard, and progressively harder. The first few levels of Pac-Man are easy enough, but much like a good strong Habanero sauce, the beginning is fine but you start to figure out that you may have made a mistake about it being easy.

  24. This is why religion is still popular by Powercntrl · · Score: 1

    Complex mathematical probability equations can make your brain hurt even if you are the person your non-techie friends and family call when their computer "got some viruses off the Internet". Personally, it helps me relate to why lesser folks can't understand simpler scientific principles (like fuckin' magnets) and prefer "that's how God made things" as their explanation.

    --

    ---
    DRM is like antifreeze, to the MPAA/RIAA it's sweet, to the consumers it's poison.
    1. Re:This is why religion is still popular by FrootLoops · · Score: 1

      Most /. discussions are just as bad as this. It happens that in computational complexity there really is an answer you can look up to prove someone wrong. That's not the case the vast majority of the time though, so crap that sounds good floats to the top and fails to sink back down. The same principle characterizes most political discourse (which is a tragedy, but there you have it).

    2. Re:This is why religion is still popular by TapeCutter · · Score: 2

      fucking magnets [how do they work]"

      "I'm not going to be able to give you an answer as to why magnets attract each other, except to say that they do." - Feynman.

      --
      And did you exchange a walk on part in the war for a lead role in a cage? - Pink Floyd.
    3. Re:This is why religion is still popular by FrootLoops · · Score: 1

      Watching Feynman's videos is the most "productive" use of YouTube I've seen in a while. He has personality so they hold a person's interest. On top of that his explanations are usually very clear. Maybe the nicest thing about watching Feynman is his scrupulous honesty--he doesn't want to mislead his audience in any way, even if he has to pass up simpler ideas that give partial understanding but which break down upon further examination.

    4. Re:This is why religion is still popular by TapeCutter · · Score: 1

      There are some good interviews/clips on YT with all sorts of scientific personalities both past and present. Feynman, Attenbourough, Sagan, and Julius Sumner-Miller, are some of my favourite "info-tainers".

      --
      And did you exchange a walk on part in the war for a lead role in a cage? - Pink Floyd.
  25. Ms. Pac Man by Anonymous Coward · · Score: 0

    That should please Ms. Pac Man

  26. Re:Yeah... by hairyfeet · · Score: 5, Interesting

    Hey Pac Man is only 13 years old according to TFA! That's great that means i'm only in my 30s again!...oh wait a tick this is Slashdot where editors never edit... :-(

    You wanna know what's hard? finding out your twitch skills have gone further south than a 43 year old's D cups whose nursed 3 kids. I used to be death incarnate on games like DOOM, Mechwarrior 3 & 4, SoF 1&2, bodies would be piled up like cordwood. Then over the Xmas holiday my boys were like "Hey you've got your new netbook right? Why don't we fire up some TF2 and play together!" and boy that was a rude awakening let me tell you. the heavy, the soldier, it didn't matter what i played i got the living shit slapped out of me. I got so irritated i decided to whip out my CC and buy 3 copies of HL:DM to show these kiddies a thing or two and...ooow, I ended up with so many rockets up my ass my little Freeman is probably walking funny to this very day. Didn't help the oldest was announcing a play by play for the house while my GF laughed her ass off "Oh he's dead, and he's dead again, oh look he didn't even see the death coming that time, will he make it around the corner? nope he's dead" while the youngest made smartass remarks about how he'd "get me a walker with a controller built into the handles for my birthday"

    So enjoy it while you can young ones, all of you that kick royal ass on MW or CoD just as we ruled the arcades will blink twice and the next thing you know your kids will be pimp smacking you on every game while making geriatric jokes. man it sucks getting old :-(

    --
    ACs don't waste your time replying, your posts are never seen by me.
  27. P=NP by treeves · · Score: 1

    but only for N=1, obviously.

    --
    ...the future crusty old bastards are already drinking the Kool-Aid.
    1. Re:P=NP by maxwell+demon · · Score: 1

      but only for N=1, obviously.

      Wrong. Counter example: P=0, N=2.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    2. Re:P=NP by treeves · · Score: 1

      P=NP is always true iff N=1.

      --
      ...the future crusty old bastards are already drinking the Kool-Aid.
  28. Key words: prior to 2001 by tepples · · Score: 3, Informative
    Most Tetris products prior to 2001, such as Super Tetris 3 for Super Famicom, use the old randomizer, possibly with some slight modification to ensure no immediate repeats.
    • Tetris for Game Boy has a 2/32 chance of the same piece and a 5/32 chance of each other piece.
    • Tetris for NES will reroll once if the piece matches the last piece.
    • Tetris the Grand Master will reroll three or five times if matches one of the last four pieces.
    • The New Tetris for Nintendo 64 deals from a 63-card deck with nine of each shape.
    • New games, such as Tetris Worlds, Tetris DS, and Tetris Party, all use the new randomizer that shuffles sets of all 7 shapes. Start a new game of Tetris DS and notice how the falling piece and the next 6 pieces are all different.
    1. Re:Key words: prior to 2001 by Stuarticus · · Score: 2

      As far as I'm aware super tetris 3 is truly random, the best kind of random! I am a big fan of TGM3, despite it's slightly cheating re-roll randomiser, but for some reason it there's a bug in Mame that causes me grief when I try to play it in 2 player mode that causes the blocks to fall straight down for one of the players.

      --
      If you think someone isn't free to have a different definition of "freedom" you may be a tyrant.
  29. I'm ridin' spinners, they don't stop by tepples · · Score: 4, Informative

    tetris DS does get to the point where the piece lands nearly as soon as it appears

    This behavior is called 20G, and it's also seen in "Death" mode of Tetris the Grand Master 2 and "Shirase" mode of Tetris the Grand Master 3.

    however you can keep it from fixing to the stack by rotating it and wiggling it constantly.

    This infinite spin behavior has become the standard since 2001, despite reviewers' assertions that "it actually breaks Tetris".

  30. Ms. Pac-Man by tepples · · Score: 1

    there is no configurability with the level designs

    Where you read "Pac-Man" in this article, add a "Ms." in front. Ms. Pac-Man has four boards, as an extant example of how level design may be configured.

  31. cognitive clip change by epine · · Score: 2

    like doing levels on nightmare starting with a pistol

    There was one level in particular that I struggled for hours to survive the first 5 to 15s. I think that level was about 3/4 the way through. You start in a large chamber with a double-wide set of doors that open onto a large area that is essentially a wide hallway wrapped around three sides of a large pool concealed with some modest trellis work. You're stuck in the middle of the long side with fireballs coming from every direction, several pink chicken drumsticks completely indifferent to pistol fire prowling nearby, and hordes of regulars to baste you with hot lead from all directions if you miss half a pivot. When you died, you were about -200 in health by the time your knees hit the ground. Even if you scored the instant kill out of the gate for the weapon drop, chances were slim you'd live to pick it up, much less lock and load.

    The key for me was obtaining a mental state of unsentimental aggression bordering on contempt. If you tarried to dwell on your prowess for so much as a tenth of a second, the game earned its name. After hours and hours of seemingly little progress at all, I reached the point where I could survive the first 10s a little more than half the time.

    Essentially you had to think of yourself as bringing a handgun to a knife fight: a couple of quick kills at close quarters was the only possible cover, as well as a significant boon: your adversaries were insects with guns. IFF was a million years down the road in their evolutionary future.

    Things happened too fast to consciously play the angles. I think the cognitive adaptation was learning to hash every perceptible threat into precise buckets of 1/4 second duration and treating everything past the fifth bucket (1.25 seconds) as the distant future. Some other part of your brain was running the instruction prefetch decoder on threats 1 to 3 seconds into the future.

    One had to transition from melee tactics to sniper tactics seamlessly after scoring the critical kills. How many times The Bride would be standing knee deep in corpses with heaving chest, then get pinked by a paper boy with a pen knife who ducked out from behind a column--game over. The initial mayhem was such an intense cognitive over-commit, the mind would pause to inhale after the flurry abated and some lone chump would take you down.

    It was almost like the brain had to eject an empty clip in order to reload the next cognitive frame. Dying during the cognitive clip-change was the most F**** frustrating things of all time.

    When I got past it, I never considered Doom hard again.

    1. Re:cognitive clip change by serviscope_minor · · Score: 1

      From memory, that sounds like E1M3.

      I remember that being very difficult to get started on nightmare, and the beginning you described brings back some rather vivid memories.

      --
      SJW n. One who posts facts.
  32. Hard - but not necessarily difficult by itsdapead · · Score: 1

    All fun and frolics, as long as you realize that the computational complexity of the "solution" has little to do with how difficult the game is for humans to play...

    I'm assuming that by "solution" here we mean an algorithm that will either win (or prove winning impossible) for any case, in a finite number of steps; as opposed to a heuristic or stochastic technique that could win more-often-than-not, but never prove un-winnability.

    Last time I looked, the human brain used some sort of complicated neural net-like wetware system that was most definitely not a Turing machine, and hence pretty crap at running algorithms. If, however, there's a neat non-algorithmic tactic that wins 90% of the time (especially if its based on something humans are really good at, like pattern recognition) then humans are going to do well, even if the "complete" solution is NP-hard or even uncomputable.

    Maybe humans use algorithmic approaches to some puzzles, but I'd wager money that the human Rubic Cube champions supplemented their algorithms with intuitive leaps based on pattern recognition... Likewise, something like Tetris is going to call on pattern recognition, Pong on our wetwired/learned ability to predict motion (which predated Newton by a few thousand years...)

    Then, of course, you have issues like reaction times, distractions and physical control layouts. For example - I'd surmise that 1st person shooters are easier with a keyboard and mouse, whereas tower defense games are easier on a touch screen. Dedicated arcade consoles can have custom-designed controls for the particular game, so the otherwise identical version for generic machines might be "harder".

    --
    In a survey of 100 programmers, 111111 thought that duck-typing was a good idea.
  33. Re:Yeah... by jekewa · · Score: 2

    Hey Pac Man is only 13 years old according to TFA! That's great that means i'm only in my 30s again!...oh wait a tick this is Slashdot where editors never edit... :-(

    Or more likely that Slashdotters don't read TFA. The 13 is a reference to the number of games researched, not their age. Pac-Man is noted as a game from 1980. Neither the introduction article (first link) or the research paper itself (led to by second link) suggest Pac-Man is only 13 years old.

    What does this really mean? You're old again.

    --
    End the FUD
  34. Re:Yeah... by tehcyder · · Score: 1

    When you get older, the thing to do is play Civilization style games. The youngsters with their trendy ADHD won't last more than a few minutes, You can basically bore them into losing, just by playing non stop for an hour or two and letting them know how far there may be to go before a result.

    It's a bit like watching cricket, highly recommended if you're over 40 and need to look after a child or two. After half an hour tops they fall asleep and you can get happily drunk.

    --
    To have a right to do a thing is not at all the same as to be right in doing it
  35. Re:Yeah... by Anonymous Coward · · Score: 1

    I hear you. While some of it for me is not practicing nearly as much.

    I have a wife, two kids, and (in my opinion) a great paying, challenging, but demanding 50-60 hour a week IT job. When I was in grade school, high school, then college, then single 20s, I had seemingly endless time to play and get very good at my games of choice. Mainly FPSs and strategy-RTS. Also I was lucky and got to be in modern competitive gaming at the beginning of such LAN and then online multiplayer vs. games, so the learning curve was incremental. New games built upon skills I learned from older ones. Now-a-days I usually only have time for a real gaming session (3+ hours in one block) game once maybe twice a week. That's time I have to make an effort to find and jealously defend on my weekly schedule. Not complaining- I wouldn't trade my earlier life for my current one, but it's just how it is once you are (somewhat) successful and have some responsibility. When you don't play 3-8 hours a day, you skills aren't has sharp as those that do.

    Unfortunately I also do feel my reflexes slowing down a bit now that I'm pushing 40. I'm just not as fast as I used to be. Not by a huge amount, but in twitchy FPS or RTS games, a few split seconds make all the difference. I'm no longer "death incarnate" either. I remember ruling DM servers for hours in UT 99, Quake 1,2,3, Tribes, 1, etc.

    This is somewhat compensated however by a very big bag of tricks I've built up over the years. It's always fun to use techniques/strategies to win that I learned and developed years ago against younger guys who can kick my ass in straight reaction time. Having a strong understanding of map/recourse control brings you a long way, and allows me to stay at least competitive.

    But yeah- in such games, you can definitely feel your reflexes starting to go south as you rack up the years. Just the way it is!

  36. Re:Yeah... by Creepy · · Score: 2

    People that play these games every day can school people that don't every time because they have every nuance down. I played a game of HL2 where I was dying constantly and never saw it coming. Later I watched the guy that had been sniping me and he was hitting targets that I couldn't even see because they were so faint and far away and getting head shots every time. It was insane (I learned later that he won several half life tourneys and we didn't stand a chance - he was mid-30s at the time, so age is only half the battle - practice like crazy is the other half).

    I also remember a game of Battlefield 2 where I was killed within seconds wherever I spawned on the map by either a plane of a helicopter, and I never saw either (I heard them both, but they were very far away). I switched sides and watched the helicopter and they had 3 snipers sitting in the door picking off everyone at the spawn point and a guy resupplying them from behind. I couldn't see the plane, but I'm guessing it was just bombing the spawn from high up (by that point in the game there was only one uncaptured spawn, so it was pretty easy to target).

    Note that the HL2 game was coordinated teams of people I knew in the office and the second game was random people, and one side was far more coordinated than the other (not to mention very good). The DOOM and Mechwarrior days didn't require a headset and extremely coordinated teams of players.

    I wonder if Sinistar is NP-hard... I remember that game being insanely hard... or how about Defender with the hard dips turned on? Ever see that? Defender was crazy hard to begin with and they had dip switches that made it even harder.

  37. Re:Yeah... by JTsyo · · Score: 1

    Fire up something a bit more tactical like BF3, though I would call TF2 a twitch shooter. If it was your first time playing, might just need time to learn the maps and classes.

  38. Re:Yeah... by Saint+Dharma · · Score: 1

    Yeah, I shall not soon forget the ass-whuppin I got when I tried to play Super Smash Brothers Melee on the Gamecube with my nephews. The fail was epic.

  39. Re:Yeah... by hairyfeet · · Score: 1

    But maybe its just me, but the newer games don't really seem to have much of a chance for aquiring a "bag of tricks' because everyone just runs like a chicken with their head cut off. that is what I miss about MechWarrior 3/4, i used to get accused of cheating until i would tell them my exact loadout and they were always "Uhhh...what the hell? you only got one shot!" but that was the point, i stripped down my mech and made it into a walking blunderbuss. no secondary weapons, no lasers, just one big ass shot. if i missed and my teammates didn't cover me i was toast but if i hit you...ohhh mama...even the biggest assualts would be hurting and anything medium or below was dead meat.

    Working here at my little shop though i know what you mean, between the shop, working on the new album with my new band, my GF, and spending time with the boys i just don't get to blast like I used to. hell i think more than a third of the Steam Xmas sale games i got along with the GOG Xmas sale games i picked up i haven't even gotten a chance to fire up yet and with the GF about to use her vacation time so we can have a week just the two of us before the grandbaby is born I just don't have the time to spend hours learning, although like I said from what I saw games like TF2 are more chicken with their head cut off. But you don't realize how bad time catches up until you hit the big 4.0. and you fire up a game you used to rule like HL:DM with your two college bound boys and find them handing you your ass on a platter. Man it was worse than schooling, it was bitch slapping time.

    --
    ACs don't waste your time replying, your posts are never seen by me.
  40. Re:Yeah... by Anonymous Coward · · Score: 0

    Play Smarter:

    Love your reference to mechwarrior 3 ;) I played as Buzz_Litebeer :)

    To put it in perspective, I used to play Mech3 at the best level, won money, played MOHAA at highest level (top 10 team) original call of duty (WW2) COD4 at a high level.

    The way I had to change was to move to play that emphasized knowledge of the maps I play on over twitch skill.

    You simply are not going to beat the kid that can fly around the corner, fire, and always nail you in the head.

    BUT, if you play correctly, you are already 2 -3 shots ahead of them at this point, and you win through simple manipulation of their lack of experience.

    To go against the kids with both twitch and a good head for how to play against people... well just be lucky there aren't that many.

    But to put my skill in perspective, in Call of duty 4 (I havent kept up with the new ones) I was often able to get 15 kill streaks, and many times 7-1 or better Kill Death Ratios, simply by knowing the map and playing deliberately instead of relying on pure twitch skills.

    It just takes a different way of thinking!

  41. Pac-Man vs. generalized Pac-Man by tepples · · Score: 1

    Then let me rephrase: The product called Pac-Man is one special case of the generalized Pac-Man problem, where one of the inputs is the board layout. It's still an interesting problem in mathematics to determine how much generalization is needed to push the problem into each complexity class.

  42. Re:Yeah... by metrix007 · · Score: 1

    It's not getting old. It's lack of practice.

    --
    If you ignore ACs because they are anonymous - you're an idiot.