Slashdot Mirror


Tetris Is Hard: NP-Hard

bughunter writes "Analysts at MIT Laboratory for Computer Science, who have been busy translating, rotating and dropping, have demonstrated what the rest of us suspected: Tetris is hard. Technically, it's 'NP-hard,' meaning that there is no efficient way to calculate the necessary moves to "win," even if you know in advance the complete order of pieces, and are given all the time you need to make each move. At least there's one geek classic that refuses to fall to the scrutiny of mathematicians."

343 comments

  1. Winning by scotch · · Score: 3, Interesting

    How the hell do you win at tetris? I remember it getting faster and faster but never ending. Maybe I just sucked at the game, or was playing a clone.

    --
    XML causes global warming.
    1. Re:Winning by agurkan · · Score: 5, Informative

      I think what is meant is, if the number of pieces is finite then finding a configuration for putting them without gaps is not polinomial in number of pieces.

      --
      ato
    2. Re:Winning by kjd · · Score: 3, Interesting

      In the Game Boy version (1989), you got little audiovisual rewards for breaking certain point barriers. If you broke 50,000, you'd get to see a little rocket launch. 100,000 lines (I think this is the right number) would net you a takeoff of the Space Shuttle.

    3. Re:Winning by targo · · Score: 3, Informative

      How the hell do you win at tetris?

      The best Tetris game that I remember playing was Super Tetris. It had a bunch of extra features compared to classic Tetris, and 10 different levels that you could complete. The best feature was the ability to save/reload the game, so in higher levels I would just reload the game every time I made a bad move, and completed the game this way.
      You may be able to find it on some abandonware site, it is lots of fun.

    4. Re:Winning by Kong+the+Medium · · Score: 5, Informative

      It isn't the Space Shuttle, it's the Buran, the russian Version of the space shuttle. AIIRC you needed 250000 points for it to launch, or 25 PERFECTS in game B. After getting a Buran, i quit tetris cold turkey.

      --
      ... whenever a text is transmitted, variation occurs. This is because human beings are careless, fallible, and occasiona
    5. Re:Winning by silvaran · · Score: 2

      The Playstation one is pretty sweet. The pieces are rendered (though it's still 2D-looking most of the time). When you play multiplayer, and you're kicking ass, the other player's boart twists and spins making it harder to play.

      The only drawback is, as long as you keep rotating the piece, it will appear to "bounce" on the other pieces below. You could keep quickly rotating the pieces back and forth until you found a place to fit. In essence, you could bounce a piece around for a limitless amount of time until you got it just right...

    6. Re:Winning by Anonymous Coward · · Score: 0

      Your game is weak! It's all about Level 28, baby! Only got their once though :(

    7. Re:Winning by stevey · · Score: 3, Interesting

      You also win if all your opponents are dead in the multiplayer games, like Tetrinet. (There's a good client out for Linux too - gTetrinet).

      Unfortuntately there is a limit of six players to the game; but it's still been taking my workplace by storm for the past two weeks.

    8. Re:Winning by Lars+Arvestad · · Score: 5, Informative
      Read the paper. One does not need to understand it to see what the actual questions are.

      The authors carefully defines that a Tetris problem is a starting board and a series of Tetrominoes. Several computational objectives are then defined, such as "can a game be played wherein k rows are collapsed?" or "can the board after the last tetrominoe have at most height k?".

      So it is really a mathematical version of Tetris, but it applies to regular Tetris in that there are certainly games that simply are too hard for you.

      --
      Reality or nothing.
    9. Re:Winning by RovingSlug · · Score: 2
      I imagine "winning" in Tetris would be defined as "not-losing". I'd guess the goal of a winning algorithm would be for an initially empty board to calculate a strategy to never stack-out (lose) for any arbitrary inifite sequence of Tetris pieces.

      Probably to help prove that, the tool you'd want is an algorithm to determine if an arbitrary board is winable or losable for any given N-finite sequence of pieces; where N is the number of remaining empty grids divided by four. You'd want to use that algorithm to determine a large set of initial board configurations that you'll never leave for any given sequence of pieces. That first algorithm is probably the one they say is NP-hard.

    10. Re:Winning by Anonymous Coward · · Score: 0

      Rockets launching?

      Obvious sexual symbolism...

    11. Re:Winning by krepta · · Score: 1

      There is a newer version of TetriNET as well. Unsurprisingly titled 'TetriNET 2'. It adds many features along with essentially eliminating cheating (prominent in TetriNET 1.xx) by making all piece generation server-side. Connection is based to a main server, and distributed between many other regional servers, so you can find games all the time, but still connect to one in your area.

      TetriNET 2.0 official site

    12. Re:Winning by Anonymous Coward · · Score: 0

      I didn't, I just played tetris-with-heart (hold DOWN while booting the gameboy with the tetris cart in).

      It's pretty much impossible to get a Buran, at least unless you rewired the control pad electronics to your brain instea of having to take the time to mechanically move your finger to move the control pad...

    13. Re:Winning by travd · · Score: 5, Informative
      More particularly, they show that given an arbitrary size game board, and prior knowledge of the sequence of pieces, the problem of computing the optimal solution to four problems is NP-Hard:

      (1) Eliminating all blocks on the playfield in a minumum number of moves.

      (2) Maximising the possible number of tetrises obtained.

      (3) Maximising the number of lines cleared.

      (4) Minimizing the height of the block configuration.

      Note that they prove (1) essentially by starting from a very particular arrangement of blocks on the playing field, such that the reduction to 3-Partition is "easy" to prove (I use the word "easy" in the loosest sense). They then go on to prove (2),(3), and (4) using small modifications to the basic setup.

      The admit that the "empty initial field" problem is an open one, but I would imagine that that problem can also be proven NP-Hard.

    14. Re:Winning by jericho4.0 · · Score: 1, Offtopic

      Mod Parent up. Some of us might knopw what an NP problen is, but this guy laid down the hard facts.

      --
      "A language that doesn't affect the way you think about programming, is not worth knowing" - Alan Perlis
    15. Re:Winning by Gubble · · Score: 2, Informative

      Not-losing tetris is impossible in the long term. All you need to loose is a very long sequence of Z and S pieces. These pieces don't tile the plane. Even if a normal tetris game program may forbid such sequences, your "any arbitrary sequence" definition clearly includes such seq.s

    16. Re:Winning by Anonymous Coward · · Score: 1, Interesting

      NP-hard maybe, but damn these players make tetris look easy!

      These are from Tetris the Grandmasters 2 Plus arcade machine playing on Death mode.

      At least there's an end to Death mode. :p

      http://homepage2.nifty.com/arika_download/mpeg/dea th_800.mpg http://homepage2.nifty.com/arika_download/mpeg/Dea th-Gm02.mpg http://homepage2.nifty.com/arika_download/mpeg/Dea th-Gm05.mpg

    17. Re:Winning by Anonymous Coward · · Score: 0

      Mechanically move? Why, you some kind of robot? You meant motorically, didn't you.

    18. Re:Winning by Lev_Arris · · Score: 2, Informative

      As far I as remember you only had to beat game mode B with speed 9 and high 5 (half the screen filled at start) to win. (or get that high score in mode A)

    19. Re:Winning by Anonymous Coward · · Score: 0

      You wanna know how to win at Tetris? Study this movie: http://www.nem3d.net/download/movies/fun/tetris_ja pan_finals.mpeg

    20. Re:Winning by Anonymous Coward · · Score: 0

      The Z and S pieces cannot tile a finite rectangle but you can still fill rows using them. If you knew you were going to get nothing but those pieces, the game would be trivial.

    21. Re:Winning by stu-pendous · · Score: 1

      doesn't that depend on whether or not the number of columns are even or odd? (I don't feel like going through the rigor to check)

    22. Re:Winning by clarkcox3 · · Score: 1
      No, it doesn't. Take these simple examples for instance: 9 columns:
      4 's' pieces, one 'z':
      _Z_______
      ZZ_______
      ZSSSSSSSS <--- row
      SSSSSSSS_
      123456789

      10 columns:
      5 's' pieces, one 'z':
      _Z______S_
      ZZ______SS
      ZSSSSSSSSS
      SSSSSSSS__
      1234567890

      Of course, there are probably many better strategies, I just can't think of them when I'm not playing :)

      --
      There are no tiger attacks in my area and it's all because this rock I'm holding keeps the tigers away.
    23. Re:Winning by Anonymous Coward · · Score: 0

      You mean, probably not polynomial.

    24. Re:Winning by Dimensio · · Score: 2

      Clearing Level 9 Height 5 in Type B earned a space shuttle takeoff.

      Type A gave you various rockets based upon your score. I don't remember the best rocket that I saw, but the best level I reached (starting from 9) was either 20 or 21 (I cleared enough lines to get to level 21, but I don't recall if the game actually went to it).

    25. Re:Winning by zsmooth · · Score: 1

      What if you're sent a sequence of 100 Z pieces?

    26. Re:Winning by Jus+ad+Bellum · · Score: 1

      Then you probably need to get a better random # generator....

      (To geek out for a second with 4 different pieces there is a P0.25 of getting a Z piece => For 100 Z's in a row P0.25^100, or some really small #)

    27. Re:Winning by zsmooth · · Score: 1

      "So you're saying there's a chance!!!"

      (Name that movie...)

    28. Re:Winning by AnyoneEB · · Score: 1
      You may be able to find it on some abandonware site
      I thought it would be another 10 years before I heard that about any programs that I own. I do own (read: paid for) Super Tetris, and it's a good Tetris game with some weird Tetris-variants.
      --
      Centralization breaks the internet.
    29. Re:Winning by RovingSlug · · Score: 2
      "Dumb and Dumber."

      Funny.

    30. Re:Winning by RovingSlug · · Score: 2

      That's good, though. That's the way academia works. You make an assertion, of course what you assert isn't quite right, and though the process you find more interesting things to say. In this case, that not only do you need to constain the board configuration, but that you also need to constrain the sequence of tiles in some way. Excellent! Hell, you could even get a second paper out of it! :)

    31. Re:Winning by Anonymous Coward · · Score: 0

      You're dumb and dumber yourself.

    32. Re:Winning by Anonymous Coward · · Score: 0

      You can do something like a machine without being a machine. Weird huh?

    33. Re:Winning by clarkcox3 · · Score: 1

      Well, here's 5 z pieces, just repeat this pattern over an over again:

      Z_Z_Z_Z_Z
      ZZZZZZZZZZ <--- row
      _Z_Z_Z_Z_Z

      --
      There are no tiger attacks in my area and it's all because this rock I'm holding keeps the tigers away.
  2. Tetris is NP-hard! by DeadMoose · · Score: 5, Funny

    Yeah, that's it; I'm not bad at it, it's just too hard. Just like, um, most every other video game I've played...

    1. Re:Tetris is NP-hard! by Anonymous Coward · · Score: 0

      To be more specific, tetris is NP-Butt Hard.

    2. Re:Tetris is NP-hard! by Anonymous Coward · · Score: 0

      Now all you need to prove is all games can be derived from Tetris or Nethack.

  3. Are you goofing off playing tetris... by aero6dof · · Score: 5, Funny

    No, I'm empirically testing some NP theories...

    1. Re:Are you goofing off playing tetris... by Sparr0 · · Score: 1

      But since they have already been proved, you would be better off 'testing' BlockOut, arguably the best 3D tetris game ever.

  4. They used math to figure this out? by Uhh_Duh · · Score: 5, Funny


    I don't get it. They used math to figure out that tetris is hard, but math is hard too. :(

    --
    -- People who hate Windows use Linux. People who love UNIX use BSD.
    1. Re:They used math to figure this out? by the.jedi · · Score: 5, Funny

      Yeah well we mit people are crazy like that.
      Instead of studing for my Linear Algebra exam,
      I've been busy proving tecmobowl is NP-Fun!

      --
      ThunderBird. Nuff said.
    2. Re:They used math to figure this out? by Anonymous Coward · · Score: 1, Funny

      Sounds like a talking Barbie:

      "Math is hard!"

      "Pink is pretty!"

      "Ken is hard, and I am easy!"

    3. Re:They used math to figure this out? by Anonymous Coward · · Score: 0

      I think this article is misleading. In order to be NP hard you need an unbounded non-polynomial problem. Tetris has a fixed playing space so the number of possible starting configurations is fairly small (500) and since you only know the next block, the possible moves you can make does in no way reach polynomial space.

    4. Re:They used math to figure this out? by Anonymous Coward · · Score: 0

      Why would you, when we already know that linear algebra is nondeterministic polynomial fun, too? :)

    5. Re:They used math to figure this out? by Open_The_Box · · Score: 1

      Nah. Tetris has to be harder than math. It's made of lots of bricks.

      --
      If you can't think of something nice to say then don't say anything at all. No, REALLY.
    6. Re:They used math to figure this out? by Anonymous Coward · · Score: 0

      Some things never change. Linear algebra here, hither, or anywhither - someone should tell them that linear algebra is way too easy.

    7. Re:They used math to figure this out? by stu-pendous · · Score: 1

      Gilbert Strang did just that.

    8. Re:They used math to figure this out? by doug363 · · Score: 2
      But they don't place any limit on how many pieces must be placed to optimally satisfy their criteria --- there may be an arbitrarily large number of pieces that must be places. So the problem is unbounded: the number of pieces given to you is unbounded. Further, they say that even if you know all the pieces that you'll get, you still can't solve the problem in less than polynomial time (with respect to the number of pieces). They also show that their proof holds even when the gameboard is extended to be arbitrarily tall, so the player can never "lose". So, yes, the problem that they propose is unbounded.

      However, note that they propose a specific board from which they want to optimize the placement of pieces in the "best" way (they look at 4 different ways of defining "best"). They don't start from an empty game board.

    9. Re:They used math to figure this out? by wirelessbuzzers · · Score: 1

      ...math is hard too. :(

      Yes, I think it is pretty well established that math is NP-complete. :-)

      --
      I hereby place the above post in the public domain.
    10. Re:They used math to figure this out? by SubCypher · · Score: 1

      MATH???? How'd that happen anyway? How can math actually apply to the game tetris. I've been playing since I was a kid and I haven't "finished" the game yet! Grrrrrr... How in the world can I solve that problem? =,

    11. Re:They used math to figure this out? by Randatola · · Score: 1
      People are still playing Tecmo Bowl at college? That's amazing. I remember not studying for exams too numerous to mention because it was my turn at Tecmo. This was on the Genesis back in '94-'96ish, with the Iron City Tecmo league. Maybe there are still some references to us out there on the web- we had the very first Tecmo web site.

      We proved conclusively that Tecmo could be NP-Addictive.

  5. Hey... by bluemilker · · Score: 5, Funny

    those guys are dumb. Everyone knows you just leave a single block wide path in the center... you're _sure_ to get a 4-long column before you hit the... ARGH! ... this would be so much easier if I had a version of tetris that told me all the pieces in advance, like theirs does...

    1. Re:Hey... by tbspit · · Score: 3, Informative

      In the center? That gives you two narrow columns to build. I always leave the single block wide path at the extreme left or right.

    2. Re:Hey... by athmanb · · Score: 4, Interesting

      If you leve the open column in the center, you have an even count of blocks on the left side, and an odd count on the right side. This means you have more possibilities to stack different classes of blocks.

      Plus, you can use both right- and left-handed L blocks as a makeshift solution if your stack gets too high.

    3. Re:Hey... by Anonymous Coward · · Score: 0

      At a stage I actually became quite convinced that the tetrises I've played were all designed to check whenever you "needed" a 4-long block, and deliberately lower the chances of assigning one :/

  6. ending of tetris by eleven357 · · Score: 0

    I don't think that tetris ever ends until you screw up. I remember playing tetris on my game boy when I was 13. I averaged around 250 lines before I would lose and my mother got anywhere from 300-500 lines until she would screw up.

    I also remember playing a 3D tetris game on the pc about 12 years ago. It was alot more difficult that the normal 2d tetris , but to me it was a bugger challenge.

    1. Re:ending of tetris by \\ · · Score: 2

      you know, my gameboy tetris record for lines was 227. that's 27 lines at level 20, which was basically the devil.. and youre claiming you averaged 250, and your mother 300-500.

      i'm not saying you're a liar, but i really, really doubt anyone can maintain level 20 on gameboy tetris for 200+ lines. maybe you're remembering something wrong, but.. no. it hurts just to think about.

    2. Re:ending of tetris by silvaran · · Score: 3, Funny

      Your mother could beat you at Tetris? Boy, were you in the wrong generation.

    3. Re:ending of tetris by Babbster · · Score: 2

      Moms beating their gamer kids at Tetris is no surprise (I'm in the same boat). I've played hundreds [upon hundreds] of different games over the years, while my mom has spent months at a time just playing Tetris. I do wonder if there was ever a Gameboy-like device that ONLY played Tetris. It would have saved me quite a few bucks over the years replacing her Gameboy over and over again when she would wear it out. :)

    4. Re:ending of tetris by feceus · · Score: 2, Funny

      I believe the game you're referring to is Blockout.

      My father brought it home from work one day, and I played it for the next few months. Took me a while to finally see the 3D blocks. =\

      It's scary watching Tetris blocks fill up to the screen TOWARDS you. :O

    5. Re:ending of tetris by Kierthos · · Score: 1

      Well, I remember a "3-D" version of Tetris called Quatris. I mean, it was still on the computer, and not in a holographic tank or anything, but the blocks could be shaped in x, y, and/or z directions. You could have a 2x2x2 cube, for instance.

      Kierthos

      --
      Mr. Hu is not a ninja.
    6. Re:ending of tetris by joss · · Score: 2

      > to me it was a bugger challenge.

      Really ? Wow, that would be some incentive. I sure wouldnt want to play tetris knowing that would happen to me if I screwed up.

      --
      http://rareformnewmedia.com/
  7. In Other News by GroovBird · · Score: 5, Funny

    Ron Rivest of RSA Security (NASDAQ: RSAS) announced that are releasing a new assymetric encryption algorithm based on Tetris. Since Tetris has been under the scrutiny of millions of people, experts say that it is much more secure than current outdated algorithms such as RSA and Elliptic Curve. This will bring a new era in computer security, Ron says.

    1. Re:In Other News by Urox · · Score: 1

      They'd better not put it on two player mode or the second computer connected will be able to generate the exact same encryption algorithm!

      --
      "Would you rather have a playstation addicted dork wearing a star wars t-shirt?"
    2. Re:In Other News by Alari · · Score: 0

      Does this mean to hack something you'd have to beat a game of Tetris?

      --
      I use Windows... like a two dollar wh.. why don't I just go ahead and not finish that sentence.
  8. The only way to win at Tetris... by gpinzone · · Score: 5, Funny

    Is to prove the P = NP challenge. I think I'll play Quake 3 instead.

    1. Re:The only way to win at Tetris... by SpaceLifeForm · · Score: 5, Funny

      ...is not to play.

      --
      You are being MICROattacked, from various angles, in a SOFT manner.
    2. Re:The only way to win at Tetris... by IIRCAFAIKIANAL · · Score: 2

      ...is not to play.

      That's like playing MMORPGs - the only way to win is to walk away. Sounds like a koan or something.

      --
      Robots are everywhere, and they eat old people's medicine for fuel.
    3. Re:The only way to win at Tetris... by Isle · · Score: 2

      In case some new generations of nerds doesnt know. That is a reference to the movie "Wargames", where they try to teach a computer exactly that by letting it play tic-tac-toe ad infinitum, and that way saves the world. (Dont ask)

  9. Further studies... by Ravenn · · Score: 2, Funny

    Next we'll see occultists studying Pacman.

    Then NASA will use Moon Buggy as a simulator for the next Mars mission.

    And eventually the Army will use Quake to train... ummm... too late on that one. Hey, at least they build their own!

    Ravenn

    --
    Of all the things you can accomplish by screwing up your face and swearing into a dark room, sleep is not one of them.
    1. Re:Further studies... by Flakeloaf · · Score: 5, Interesting

      Next we'll see occultists studying Pacman.

      At least Pacman has a perfect solution. No fancy math required, just a good hot meal beforehand and a little patience.

      --

      Am I the only one who heard Roxette to sing "I'm gonna get blitzed for some sex"?

    2. Re:Further studies... by orasio · · Score: 1

      Moon Patrol rulz!!
      The greatest game on my Ami IIe!!

    3. Re:Further studies... by theperplepigg · · Score: 1
      no, no, no...the greatest game is Round 42! moon patrol rules still, though. both contained the tweaked low-res CGA graphics (16 colors!!), and thus were much more special than those other CGA games that only had three colors.

      --paul

      --
      -- Every time you kill a kitten, God masturbates.
    4. Re:Further studies... by coso · · Score: 1

      Judging by the photo for Mr. Mitchell, a whole lot of meth of also required!

  10. It's not that Tetris is HARD... by Steve+Cowan · · Score: 5, Funny

    Mathematicians simply can't concentrate on the movement of the pieces, even given all the time they need, because it's too easy to get distracted by that wacky Russian folk music.

    1. Re:It's not that Tetris is HARD... by wossName · · Score: 1

      If you just can't get enough of it, try this version.

      --
      Someone is wrong on the Internet!
    2. Re:It's not that Tetris is HARD... by Lord+Javac · · Score: 1

      I remember playing Tetris on the Mac way back when. Is there a list somewhere of all the songs in the original game (not the gameboy version that came later). I recognized a couple, like the Nutcracker Suite, but not most of the others.

      --

      End of Line
  11. I always sucked at tetris... by Cyno01 · · Score: 4, Funny

    the game would be a whole lot easier if every piece was only one block instead of four, but then i guess they'd have to call it monris or something

    --
    "Sic Semper Tyrannosaurus Rex."
    1. Re:I always sucked at tetris... by Anonymous Coward · · Score: 0

      Actually its called Quayle Tetris. You can play it on a Mac or Unix. Google is your friend.

  12. Poll by SexyKellyOsbourne · · Score: 2

    The highest level you got on Tetris?

    23 for me, on the SNES version.

    I used to be really, really good at it.

    But Tetris is nearly impossible when they're dropping at breakneck speed -- in fact, it falls so fast that even a computer controlled bot operating in microseconds could not rotate it to keep it perpetuating, even if the speed weren't increasing after 20 (or even 15).

    I didn't think the non-speed aspect would be so difficult: Pazhatiniov (sp?) is truly a genius.

    1. Re:Poll by MrMetlHed · · Score: 2, Interesting
      Level 30 on Tetris DX for the Gameboy color. But only because it stops getting faster at level 30. All told I had over a thousand lines, something like 2.2 million points. At that speed you basically end up playing the game in the Next Piece window and hoping you tap the buttons fast enough to make it fall properly.

      Charlie

    2. Re:Poll by robertchin · · Score: 3, Informative

      Alexey Pajitnov.

    3. Re:Poll by Anonymous Coward · · Score: 0
      Great sig. Haven't seen that one before. You just made my day!

      Long live bad physics jokes!

    4. Re:Poll by Limynali · · Score: 5, Funny

      Last weekend I was priviliged enough to hear Alexey Pajitnov, the creator of Tetris, give a talk on how he came up with tetris, the design process of games, etc... The best part was at the end somene asked him about the dificulty of Tetris and he replied that even though he knew that each piece had the same probabilty (because he coded it) there must be some little guy inside the computer purposefully giving him the 'wrong' pieces and witholding the one he needed, "that Son-of-a-bitch!" (yes, he actually said that)

      It's reasurring to know that even HE thinks it's rigged.

  13. Re:The answer you seek by papasui · · Score: 2

    err that should say "flask", I've been studying my Tetris too hard...

  14. the NP-complete version is easier?? by fat32 · · Score: 0

    The paper says this:

    We study the offline version because its hardness captures much of the difficulty of playing tetris; intuitively, it is only easier to play Tetris with complete knowledge of the future, so the difficulty of playing the offline version suggests the difficulty of playing the online version.

    Really, having knowledge of the whole piece list is *easier* than winging it one piece at a time? I'll stick with regular Tetris, thanks!

  15. So that's why... by Ghoser777 · · Score: 3, Funny
    there's a security bug in kadmind4, as mentioned in the previous slashdot story! Instead of focusing on checking for buffer overflow errors, they were busy playing Tetris ;)

    [self duck];

    F-bacher

    --
    James Tiberius Kirk: "Spock, the women on your planet are logical. No other planet in the galaxy can make that claim."
  16. Tetris "ends"? by mcubed · · Score: 1

    Will someone please tell me what happens when Tetris ends? Is it like the end of the rainbow ... pots of gold and all that good stuff? I always thought it just kept going until you lost (or, in the old days, spent another quarter), which show you how far I've gotten.

    Michael
    --
    "No live organism can continue for long to exist sanely under conditions of absolute reality;..."
    1. Re:Tetris "ends"? by fireboy1919 · · Score: 5, Interesting

      Depends on the version. For the original gameboy version, in the count up mode (starting at level 1 and going up), you got to see images of a spaceship every 10 levels (if I remember right).

      It launched when you reached the final level, I think. I did it once, and was very happy, but it sure wasn't as much fun as the game itself.

      If you play the countdown mode (start with 40 pieces at a constant level and eliminate all of them) at the highest level (9, I think, or maybe 10), then when you finish you got to hear all of the instruments playing together (each of the other levels had instruments playing).

      The ending of Dr. Mario was a lot more interesting.

      --
      Mod me down and I will become more powerful than you can possibly imagine!
    2. Re:Tetris "ends"? by DEBEDb · · Score: 2
      Will someone please tell me what happens when Tetris ends?


      We are actually living in a section of a
      Tetris figure falling down in a cosmic
      Tetris game played by the great Pajitnasana.
      When it falls, our universe ends. When the
      entire game ends... Oh, I shudder to think
      of that...

      --

      Considered harmful.
    3. Re:Tetris "ends"? by Jugalator · · Score: 2

      Will someone please tell me what happens when Tetris ends? Is it like the end of the rainbow ... pots of gold and all that good stuff?

      Yeah, I think it's like the end of the rainbow, but not as you describe it. Rather "you never get there". :-)

      --
      Beware: In C++, your friends can see your privates!
    4. Re:Tetris "ends"? by mcubed · · Score: 1

      For the original gameboy version,

      Oh, I never played the Gameboy version. Most of my Tetrising was playing in the old Time Square arcades (usually before or after a double-bill of Euro-slasher flicks in one of the grindhouses ... theatres where you didn't want to use the bathrooms). This was before Times Square morphed into McDisNeYCworld, of course.

      I don't think the arcade versions ever ended, since the goal was to keep you feeding the machines. I was just happy when I found one that had been recently reset so I had a chance to get my name immortalized on the high scores list until the rightful masters of the arcade returned to blow me off the screen.

      Michael

      --
      "No live organism can continue for long to exist sanely under conditions of absolute reality;..."
    5. Re:Tetris "ends"? by Anonymous Coward · · Score: 0

      Tetris ends when the screen fills up with blocks and you can no longer fit more in. You can't avoid eventually running into that...

      Sorry, couldn't resist.

    6. Re:Tetris "ends"? by Anonymous Coward · · Score: 0

      In the old PC-version (like in the 80's for the original IBM PC) the score would go from +32000 something (don't remember my signed 16 bit integers, aaargh!!) to -32000 somthing. So the way was to come as close to that number as possible (to be able to get into the high score)

    7. Re:Tetris "ends"? by Bill+Currie · · Score: 2

      32767

      --

      Bill - aka taniwha
      --
      Leave others their otherness. -- Aratak

    8. Re:Tetris "ends"? by SubCypher · · Score: 1

      What? Is that serious? If I finished the game, what will show on the screen? Shall it show messages like this: YIPPPPPPPPPEEEEEEEEEE!!!!!!!!! YIIIIPPPPPPPPPPPEEEEEEEEE!!!!!!!!! YOU WON! YOU WON!!? ;-)

  17. I wonder... by SparkyTWP · · Score: 2, Funny

    I wonder if the computer got the rocket ship to launch. I only managed to do it once when I was young.

    1. Re:I wonder... by MrMetlHed · · Score: 1
      The best was in the NES version when they carted out a small ship for a ton of points. Suddenly the whole Russian City takes off into space... Now that was worth all the tension in staring at a TV of falling pieces for far too long.

      Charlie

  18. and yet by madsenj37 · · Score: 1

    there is no cure for most cancer

    --
    Choosing the lesser of two evils is a choice for evil.
    1. Re:and yet by Anonymous Coward · · Score: 1, Funny

      "Only one cure for cancer in nearly 6 years!"

    2. Re:and yet by DeadMoose · · Score: 1
      there is no cure for most cancer

      Wait, if I get an L-shaped block, and rotate it into place at just the right moment............THERE! He's gone into remission!

    3. Re:and yet by archeopterix · · Score: 1
      there is no cure for most cancer
      1. Encode 'Cure cancer' problem as a list of tetris blocks.
      2. Distribute among a bazillion of geeks.
      3. ?
      4. Profit!!!
    4. Re:and yet by Waffle+Iron · · Score: 1
      there is no cure for most cancer

      That's right, there's still no cure for cancer. And you have the gall to sit there wasting time reading blogs. You, sir, are wasting precious seconds that should be devoted to finding a cure. One person dies on this planet every second, many of those from cancer! There is no time to read about Tetris!

      Now, get up off your ass, get into the lab, and start researching. I don't want you to come out of there until every cancer cell on this planet has been stamped out.

      And don't think your work is done when you've finished with cancer. People are still going to die of something else. We've got to figure out a way to totally prevent death, before it's too late. This ongoing crisis -- MILLIONS dead every month -- just has to be stopped!

  19. Brain Strain in the Ukraine by vaguelyamused · · Score: 1, Funny

    Tetris match of the century Kasparov vs. Deep Blue!! I think Gary can take him this time.

    --
    STOP ROCK VIDEO
  20. man... that is so not fair by lingqi · · Score: 4, Funny

    What the heck huh, I goto a "less glorified school" compared to MIT, and study / do research in semiconductor electron migrations, efficiency in cryptograhy systems, implementation of computer based voice and image recognition.

    MIT kids do research in TETRIS.

    wtf? tell me again why MIT is one of the best engineering school again?

    oh wait... i just got it.

    --

    My life in the land of the rising sun.

    1. Re:man... that is so not fair by Anonymous Coward · · Score: 1, Insightful

      this is what we do in our spare time. but seriously, the lcs has declined much since i've come to mit. i think they got too complacent with too much money during the internet boom and started putting huge capital in go nowhere projects like project oxygen. and now things like this. i shake my head. and now they have so little money, they can't support grad kids like me anymore who are the ones who really drive the research in my opinion. sigh. i remember being awed before coming here at the things this place used to research and churn out. how sad.

    2. Re:man... that is so not fair by imr · · Score: 2

      they probably will sell it to the US army wrapped in a comic magazine and tons of buzzwords.
      "The mega computing suit of the future complete with accessorized time shuffling device for long duty scheludes with heavy guards".
      a pillow and a tetris game..

    3. Re:man... that is so not fair by Anonymous Coward · · Score: 0

      You mouth-breathing pinhead, MIT people do research in those other things too. One of the authors on the paper is Erik Demaine, a professor (actually, a 21 year old prof, but that's another story) whose research includes "computational origami." It's an exciting area of discrete math. A lot of papers in math seem trivial or pointless if you're used to thinking about "efficiency" and "electron migrations"... but discrete math can be deep and beautiful (and sometimes, ultimately useful) and fun at the same time.

      MIT is a great engineering school because of _other_ people who aren't in the theory group. There are people doing research in "voice and image recognition" at MIT too. But it's a great school for theory too, precisely because of people like Demaine.

      Get a clue, before you claim something isn't "fair."

  21. Re:What? by mizhi · · Score: 5, Informative

    Because games can provide real world analogues. Yeah, I'm going to invoke Nash and his game theory. When he was studying at princeton, a large portion of the mathematicians there played games, some of which were invented at princeton based on some mathematical notion of some sort. Lots of those dumb little puzzles that you see in hobby shops have rigorous mathematical treatments. Moreover, a classic problem in computer science is to reduce one problem to another, so imagine taking a real world problem and modeling it as a simpler problem with the same characteristics. Say, a game. If you can analyze the game, then you've got at least a suitable starting point for analyzing the real world problem that you're actually interested in. Now, I don't know what practical application that knowing the approximation characteristics of optimizing parts of a tetris game are, but of the cuff I could see it having applications in packing problems or flow control (particles through a pipe?).

    So, to answer your assertion that these studies are getting dumber and dumber by the day, I'd counter that while it may not produce immediate practical results, I could see this analysis being used elsewhere.

    --
    Humorless sig goes here.
  22. Online Tetris tournaments by wilbrod · · Score: 4, Informative

    If you are good at tetris you can play online tournaments at Worldwinner.com against an or some opponents.

    The nice part: you bet real money. If you are somewhat good you can make some cash. I really made 25$,around 37$CDN. I stopped since it was too hard to win when I was classified as "intermediate" and I was loosing all my earnings I won "newbie".

    Try it at your own risk.. Very addictive. You get 5$ free when you join. Everything is VeriSign Certified.

    1. Re:Online Tetris tournaments by Cheese+Cracker · · Score: 3, Funny

      "If you are good at tetris you can play online tournaments at Worldwinner.com [worldwinner.com] against an or some opponents.

      The nice part: you bet real money. If you are somewhat good you can make some cash."


      Maybe the MIT dudes should have known about this...
      They could have made their Tetris simulator pay for
      their research project and more.

    2. Re:Online Tetris tournaments by hfastedge · · Score: 1, Informative

      Just analyzing and categorizing the problem is usually far from formulating a solution.

      --

      -- -- --

      Help my mini cause: My journal

  23. They would've figured it out by Anonymous Coward · · Score: 0

    If they hadn't kept playing the game! Bad scientists!

  24. I was doing home-work the whole time. by DougJohnson · · Score: 3, Funny
    Now I can get my Computer Science Theory mark reviewed under the grounds that I put hours of research into attempting to find a solution to an NP Hard problem.

    You'd be amazed at some of the Heuristics you have to use at Level 10!

  25. Because the game is hard, or... by Guppy06 · · Score: 0, Insightful

    ... because object recognition is hard for computers? Tetris is all about putting things where they fit, not some grand master strategy. And us biological constructs have an advantage, where we can more or less decide on the fly if X piece will fit decently enough in Y hole without having to go through a bajillion IF-THEN logic loops.

    1. Re:Because the game is hard, or... by The+Trix+Rabbit · · Score: 0

      It has nothing to do with that. They reduced Tetris to a NP-Complete problem called 3-Partition.

      NP Completeness implies that there is no polynomial time algorithm to compute the solution. This is not proof, though, since it's not been proven that P != NP.

    2. Re:Because the game is hard, or... by McBeth · · Score: 3, Informative

      Read the article, it is amazingly accessible.

      Humans and NP problems
      There are two things people look at when they find a new NP problem. First is reducing a currently known NP problem to the new problem. In this case, they reduced the 3 bucket problem. Second is the difficulty of approximation. Apparently Tetris also happens to be difficult to approximate. Humans happen to be _really_ good at approximation, while sucking at exact calculations. That is the whole reason we designed computers in the first place.

      Note for those who don't read the article. Their proof is _not_ for a basic tetris game. They assume a prebuilt structure that you are trying to fit pieces into. This structure is designed to allow the mapping from the 3-bucket problem to Tetris. They specifically mention the starting point of an empty board as an open problem.

    3. Re:Because the game is hard, or... by Anonymous Coward · · Score: 0

      ..us biological constructs have an advantage, where we can more or less decide on the fly if X piece will fit decently enough in Y hole..

      No surprise really, evolution has selected for those with this specific ability.

    4. Re:Because the game is hard, or... by sahala · · Score: 5, Informative
      ... because object recognition is hard for computers? Tetris is all about putting things where they fit, not some grand master strategy. And us biological constructs have an advantage, where we can more or less decide on the fly if X piece will fit decently enough in Y hole without having to go through a bajillion IF-THEN logic loops.

      How is this modded up as insightful??? Object recognition has nothing to do with this being hard. Read what it says on the bottom of page 2:

      Our results. We introduce the natural full-information (offline) version of Tetris: we have a deterministic, finite piece sequence, and the player knows the identity and order of all pieces that will be presented. We study the offine version because its hardness captures much of the difficulty of playing Tetris; intuitively, it is only easier to play Tetris with complete knowledge of the future, so the difficulty of playing the offine version suggests the diffculty of playing the online version. It also naturally generalizes the one-piece lookahead of implemented versions of Tetris.

    5. Re:Because the game is hard, or... by Anonymous Coward · · Score: 0

      Wow, I knew evolution was good but I never thought it would evolve humans to play Tetris well.

    6. Re:Because the game is hard, or... by Anonymous Coward · · Score: 0
      Wow, I knew evolution was good but I never thought it would evolve humans to play Tetris well.

      Think about it: how would you reproduce (much less evolve...) without the ability of fitting an X piece into a Y hole?

    7. Re:Because the game is hard, or... by Anonymous Coward · · Score: 0

      I don't know about you but my piece X is not shaped like an L... or a T... or a Z. Maybe you should have a doctor look at that.

  26. Everybody's a Loser by The+Rolling+Blackout · · Score: 1
    Tetris is a game in which seemingly random no-win situations are introduced as part of the game. Certain pieces (e.g. the infamous S) simply are not compatible with what the player needs to 'score'. (+5 funny, thankyouverymuch)

    In Tetris, the player and opponent are on completely unequal grounds. All the 'opponent' has to do is throw enough shitty pieces at you to prevent you from reaching the next level, or scoring enough points. No intelligence can triumph against a random number generator given such a disadvantage.

    All I really have to offer to these researchers is a well-enunciated 'DUHH'.

    --
    sig-free as of 28 July 02!
    1. Re:Everybody's a Loser by Terralthra · · Score: 1

      They showed it was NP-complete to solve even when pieces were known in advance from start to finish, with the goals of maximum lines, maximum tetrises, minimum height of any column, and a couple others.

      In short, RTFA.

      --
      -Terralthra...
  27. NOW I'VE GOT MY EXCUSE! by fireboy1919 · · Score: 5, Interesting

    Now whenever I lose the latest new game I can just say, "I have just determined that this game is very hard. Its NP-Hard, in fact." I'm sure that'll impress all the lady-geeks around that would otherwise have thought me intellectually inferior for losing the game.

    Interesting thing about NP-hard stuff, though, especially when it comes to things like video games. There are a group of techniques that work to solve NP-hard problems SOME of the time based around searching. Because there are multiple winning solutions for Tetris, and there is are several quite obvious heuristics to aid in the search (such as planning so that you leave indentations that will fit the next piece(s), and attempting to fill lower lines before higher ones), it's probably still solvable in polynomial time MOST of the time.

    Of course, solvable is relative. The optimal solution (highest score) for a finite number of moves cannot be proven without trying all combinations of states, but to simply finish, there are lots of solutions.

    --
    Mod me down and I will become more powerful than you can possibly imagine!
  28. Re:Hrm. by Anonymous Coward · · Score: 3, Funny

    Are there any other NP-hard games which were invented by dead Russians?

    Can't you be satisfied with one? I mean do you have any idea how hard it is to get dead Russions to invent anything?

  29. My theory by Jugalator · · Score: 5, Funny

    Tetris wouldn't be NP-hard if it just released that damn 1x4 brick when you need it!

    --
    Beware: In C++, your friends can see your privates!
    1. Re:My theory by Yottabyte84 · · Score: 1

      Internet Irony: www.noads.com

      Konqueror blocked 8 onloads, and 1 onclose

    2. Re:My theory by Anonymous Coward · · Score: 0
      Internet Irony: www.noads.com

      Konqueror blocked 8 onloads, and 1 onclose

      Hence the word before the colon.

    3. Re:My theory by dimator · · Score: 2

      if it just released that damn 1x4 brick when you need it

      3 buddies of mine and I spent many hours playing tetris, especially the Versus mode on the SNES version. When we needed a piece, we would say "why don't they give me what I need!" or "they know they are screwing me over, i need a line!" The point being we assumed there was some committee ("they") inside the game, or possibly we were referring to the group that made the game, that was not giving the right pieces at the right time. The "they" became a running joke...

      God what a pointless story.... I guess you had to be there.

      --
      python -c "x='python -c %sx=%s; print x%%(chr(34),repr(x),chr(34))%s'; print x%(chr(34),repr(x),chr(34))"
    4. Re:My theory by Jugalator · · Score: 3, Funny

      Hehe... Yeah, I'm personally convinced that Tetris and all its clones have a highly sophisticated masochistic AI.

      --
      Beware: In C++, your friends can see your privates!
    5. Re:My theory by Anonymous Coward · · Score: 0

      Yes, I know that.

      -Yottabyte84 posting AC to protect his presoius karma

    6. Re:My theory by AnyoneEB · · Score: 1

      I thought that too, until I wrote my own tetris-clone (Requires Java Runtime) and I still can't get a 1x4 when I need one and then get two or three in a row!

      --
      Centralization breaks the internet.
    7. Re:My theory by MoogMan · · Score: 1

      I hate it when you *really* need a 1x4, but it gives you a 4x1. Damn, thats really teasing...

  30. Interesting Reduction by The+Trix+Rabbit · · Score: 0

    I'd like to see them reduce Tetris to Mindsweeper, another NP complete problem. That'd be slick.

    1. Re:Interesting Reduction by pyrote · · Score: 2

      Minesweeper is math..it is solvable, and I have yet to find a version to challange me. 6 sided blocks too. it's all math that can be calculated logically.

      --
      THE WORLD IS GOING TO END!!!! eventually.
    2. Re:Interesting Reduction by gazbo · · Score: 2, Informative
      No it is not.

      You are partly right; it is never NP-complete. It is also often solvable. However, in the general case it is not solvable - sometimes you just have to guess.

      In fact, take the first move you have to make and tell me with 100% certainty that you're not clicking on a mine. You can't - the problem is not solveable.

    3. Re:Interesting Reduction by travd · · Score: 1

      When minesweeper was shown to be NP-complete, it was likely shown that determining whether puzzle was solvable without guessing is in NP, rather than simply finding a solution, since obviously situations exist when this is not possible.

    4. Re:Interesting Reduction by pyrote · · Score: 1

      I can tell you with 101% certianty that I'm not clicking on a mine. The program allows for 1 true move. you will NEVER hit a mine on the first try. it's written into the code.

      Try and set it to 9x9 with 64 bombs. You WILL miss every mine.

      --
      THE WORLD IS GOING TO END!!!! eventually.
  31. Oh come on.. by The+Creator · · Score: 1

    Everyone knows that Tetris solves by matrix inversion...

    --

    FRA: STFU GTFO
  32. P = NP solved? by Anonymous Coward · · Score: 0

    Did somebody crack this while I had my back turned? Last I heard, NP-hard meant (among other things) that no known polynomial-time solution exists, but that doesn't rule out the possibility that one might exist.

  33. memory optimization by fat32 · · Score: 2, Interesting


    It seems to me that this would have some applicability to memory stacks. After all, Tetris is a stack that doesn't need to be emptied in order for the rows above it to be used efficiently.

    First I was thinking that Tetris is just a recursive problem; if a certain subset of pieces can be used to achieve a Tetris (4-row removal) then they can be removed from consideration. But then I realized that this would affect one's options for clearing rows below that, or pieces to come. It sounds like the only way to do this is by considering all (n_pieces*rotation)! possible plays.

    Is this perhaps proof that memory usage cannot be optimized beyond a certain point?

  34. researchers by clockwise_music · · Score: 1

    .. can't these guys find something slightly more practical to work on? Finding out if Tetris is NP-Hard... honestly.. do something useful with your existence.

    1. Re:researchers by Anonymous Coward · · Score: 0

      Serendipity can not come about unless there is some sort of activity to stir up the interesting things that lie beyond the immediate reach of our perceptions. Many discoveries through serendipity have been earthshaking for the simple reason that as thinking entities, we're not really as smart as we'd like to believe.

      Look at it this way: A person with an intelligence level 1 cannot create a thing that requires an intelligence level 2, unless he does so accidentally. He simply does not have the capabilites to formulate the experiment, anticipate the outcomes, and any number of other shortcomings. But an level 1 experimenter that does a lot of things, can eventually, and unwittingly, draw together a combination that spawns level 2 results.

  35. Wait a second... by Chemical · · Score: 5, Interesting
    A lot of Tetris and Tetris type games had a two player mode that had the option for CPU controlled player two if you didn't have any friends. If you set the AI to the maximum level, you would be instantly crushed no matter how good you were. The CPU could instantly decide where to place the blocks, and never made a bad move. Try setting Tetris Attack for the SNES to play against itself for a while. It's kind of impressive.

    My question is this: How is it Nintendo et. al. can program an incredibly skilled Tetris AI, but scientists at MIT cannot?

    1. Re:Wait a second... by Crispin+Cowan · · Score: 1, Informative
      How is it Nintendo et. al. can program an incredibly skilled Tetris AI, but scientists at MIT cannot?
      "NP-hard" means that they have a proof that the computational complexity of tetris is exponential in the number of blocks to be placed. But since there are only 4 blocks in each piece, "exponential" is not that big, so the computer can easily compute an optimal placement without breaking a sweat. "NP-hard" does not mean that that the problem is unsolvable, or even particularly difficult to solve, just that you can't scale it up to a zillion blocks without having approximately 2^zillion compute cycles.

      Crispin
      ----
      Crispin Cowan, Ph.D.
      Chief Scientist, WireX Communications, Inc.
      Immunix: Security Hardened Linux Distribution
      Available for purchase

    2. Re:Wait a second... by Yottabyte84 · · Score: 0

      I can play tetris attack endlessly with zsnes running at half speed. at full speed it's just too fast

    3. Re:Wait a second... by cosyne · · Score: 5, Insightful

      My question is this: How is it Nintendo et. al. can program an incredibly skilled Tetris AI, but scientists at MIT cannot?

      First, a disclaimer- IHNRTFA. But still, my guess is that the optimal solution is NP-hard. That is, given the exact sequence of blocks, give the sequence of moves which will get rid of them all as fast as possible and/or with the highest score possible. If you just know the current piece, you have about 48 moves to evaluate (assuming it's like 12 blocks wide and there are 4 possible rotations). If you know the next you have 48^2, but even an NES could probably evaluate those faster than you could given some simple cost function. A lot of computer science is coming up with approximations which are close to optimal (ie they beat humans or at least don't pile up and die) while remaining computationally feasible.

    4. Re:Wait a second... by travd · · Score: 5, Informative
      But since there are only 4 blocks in each piece, "exponential" is not that big, the computer can easily compute an optimal placement without breaking a sweat.

      That's just wrong.

      If you read the article, you would see that the fact that tetrominos (that's what they call 'em) are four block combinations does not define the magnitude of the (likely, assuming P != NP) exponential relationship. In fact, they show that the problem scales in an NP fashion with the number of pieces - the number four doesn't come into it.

      What the Nintendo version shows is that a simple AI (with perfect movement abilities) and so on can come close enough to optimal in a usual situation (the article presenet an extremely contrived worse case scenario) to beat a human player. This has no bearing on the NP completeness of the problem.

      On another note, the authors admit that the Tetris problem is NOT NP-Complete except for arbitrarily large game fields.

    5. Re:Wait a second... by Crispin+Cowan · · Score: 1
      Hmmm ... ok. I do remember seeing a proof that packing arbitrary shapes of blocks optimally (the Tetris problem) was NP-hard many, many years ago, so this didn't look like news to me. But I've long since lost the reference.

      In any case, NP-hard for Tetris still isn't that hard, because the N remains very small, no matter how you look at it.

      Crispin

    6. Re:Wait a second... by travd · · Score: 2, Insightful

      I don't think the "N remains small, no matter how you look at it" - consider the case where many hundreds of pieces are played - certainly not unusual among higher level players. A number of this magnitude is certainly enough to make many NP problem intractable.

    7. Re:Wait a second... by Anonymous Coward · · Score: 0

      No. Wrong. Unless you've proven (NP != P) it is not known that the most efficient solution for an NP-Complete problem is exponential.

      Although all NP-Complete problems can be solved in exponential time, it is still possible that someone could find a solution to the problem which can be solved in polynomial time (n^k where k is *constant*). If so, then he will be able to solve all other NP-complete problems in polynomial time as well.

    8. Re:Wait a second... by Crispin+Cowan · · Score: 1
      But because Tetris collapses complete levels, the state space stays small, even after many hundreds of pieces have been played. The state space to be considered when playing a piece is limited to:
      • the set of pieces on the board
      • the piece in play
      • the piece after that (if the game you're using displays that
      The number of pieces you've previously played has no discernable impact, other than the state space of pieces left on the board.

      Crispin

    9. Re:Wait a second... by travd · · Score: 3, Insightful
      > if the state space stays small...

      True, but the state space of go (or chess) also stays small, yet this does not prevent the optimal play problem from being intractable (on today's hardware, with today's algorithms). The difference is that to analyse possible future moves beginning from the current (small) state space, a program (traditionally) must investigate a huge, typically exponential, number of possible future state spaces, based on possible future moves, etc.

      Note that the version of tetris considered in the paper is the offline version, where the sequence of pieces is known in advance, rather than just the next piece - certainly if they considered the model of the game where only the next piece was known, then deterministically optimal play would be impossible, rather than simply intractable, and the question would be a probablistic one instead. For example it has been shown that the optimal solution for the Mastermind style of game is calculable in a probabalistic sense, yet is intractable (due to the size of the payoff matrix).

    10. Re:Wait a second... by Iainuki · · Score: 1

      All NP-hard problems require that some of their components be able to go to arbitrarily large values, because if the problem is finite, it can always be solved in constant (much less polynomial) time.

    11. Re:Wait a second... by Anonymous Coward · · Score: 0

      When I played Tetris and Tetris Attack seriously, I could manhandle the hardest AI in Tetris Attack and the hardest AI in Tetris/Dr. Mario (SNES) with ease. I still play Tetris occasionally, and still take way more than 50% from even the strongest computers.

      This, however, is irrelevant.

      All that has been proven is that, using modern computer algorithms, we cannot say "this is the best move in this position with this piece and these followings pieces." Yes, it's interesting. Yes, it's mathematical masturbation. No, it's not related to the fact that modern tetris AIs are very, very good.

    12. Re:Wait a second... by Patrick · · Score: 4, Insightful
      How is it Nintendo et. al. can program an incredibly skilled Tetris AI, but scientists at MIT cannot?

      1) The Nintendo AI doesn't have to be optimal. It just has to be better than a human.

      2) Being better than a human at Tetris is less about placement than it is about agility. You may be better at figuring out where pieces should go, but the Nintendo will always be better at actually getting them into place.

      3) The problem Nintendo solved is much more tractible because it only deals with two pieces at once. The problem MIT posed deals with the entire sequence, potentially hundreds of pieces. The problem is (probably) exponential, so each additional piece that must be considered makes the problem about 20x harder.

    13. Re:Wait a second... by kisrael · · Score: 2

      Tetris Attack, while THE best head to head "action puzzle" game out there (along with its clone Pokemon Puzzle League) is definately not Tetris...in fact, the Tetris theme is just a marketing gimmick. (It's a lot better than most head to head games, like Kirby's Avalenche et al, because when you send pieces to make your opponent's life more difficult, you might also be giving them the keys to massive chain reactions, so the game has a nice see-saw feel.)

      Anyway, I would guess that Tetris Attack is easier to optimise than Tetris anyway. Maybe not, since there is a variety of combos that can be used. And as someone pointed out, despite the formal "difficulty" of the game, relative to the processor power we have, playing a "good enough" game isn't that much of a feat.

      --
      SO YOU'RE GOING TO DIE: The Comic for Dealing with Death
    14. Re:Wait a second... by Anonymous Coward · · Score: 0

      Well we know approximate branching factors for chess (said to be ~35) and go (said to be ~100 I think).. what would Tetris be? Let's keep the assumption that every piece is known for the whole length of the game. So if the Tetris field is N columns wide, there are (n-1)*4 ways to place a piece. This is actually (n-1)*2 with the line and the "s-piece", and just (n-1) with the square. I seem to recall Tetris being 10 columns wide. So there is an average branching factor (by this method) of 20. It seems like it would be easy to start pruning moves out though.. eliminate moves which "trap air" or leave overhangs, etc.

      Of course if you don't know the piece order (beyond next piece) the game is not deterministic and none of this matters.

    15. Re:Wait a second... by David+Eppstein · · Score: 1

      Some problems can be approximated nearly optimally, yes, but the paper proves that Tetris isn't one of them, it's NP-hard even to approximate well.

    16. Re:Wait a second... by alexandre · · Score: 2

      There are more than just 48 moves because some times you have to move the piece at the last moment to make it fit under another one :-) (But they probably just ignore that possibility! :)

    17. Re:Wait a second... by djmcmath · · Score: 1

      I can agree with this. As a freshman intending to major in CS, I wrote a program in my spare time that would play an incredible game of tetris. My model only looked at one piece ahead, however, and did not analyze the entire (finite) game.

      The real question in my mind is that if an NP problem can be adequately solved by some snot-nosed kid who doesn't realize that he's trying to solve an impossible problem, how many other NP problems have easy solutions that are simply being overlooked?

      ...just my $.02

    18. Re:Wait a second... by RackinFrackin · · Score: 1

      The real question in my mind is that if an NP problem can be adequately solved by some snot-nosed kid who doesn't realize that he's trying to solve an impossible problem, how many other NP problems have easy solutions that are simply being overlooked?

      Your program didn't solve the NP problem - it impemented a heuristic for playing a good game. This is the approach taken everyday to get approximations of solutions to NP and NP-complete problems.

    19. Re:Wait a second... by Anonymous Coward · · Score: 0

      First, a disclaimer- IHNRTFA.

      Gesundheit.

  36. Thoughts... by superdan2k · · Score: 2

    I don't see how this is an issue -- I haven't got a math degree, in fact, I suck at it. (Hence, my English degree.) But with a finite playing field and finite set of shapes, one would think that a computer would be much better at it than a human if it knew the order of the pieces.

    You could probably create a genetic algorithm that would look at the order of groups of N and figure out macro-structures, and how those macro-structures best interacted with one another.

    Whatever the case, I'm still of the opinion that Tetris is a Soviet Meme Weapon that was released too early. If they'd waited until the Internet was in every office and home, Western Civilization would have ground to a halt, and we'd all be drinking vodka and wearing furry hats by now.

    --
    blog |
    1. Re:Thoughts... by Anonymous Coward · · Score: 0

      >But with a finite playing field and finite set of >shapes, one would think that a computer would be >much better at it than a human if it knew the order >of the pieces.

      Hmm....kind of like Brute Force , ie . non deterministic

  37. There. by Anonymous Coward · · Score: 0

    "Only got there once though."

    1. Re:There. by Anonymous Coward · · Score: 0

      Doh! I prided myself on never making that mistake. How the mighty have fallen.

  38. the second I read the article by ferrocene · · Score: 1

    I began to hum one of the theme songs. I'm sure creating that infectious tune wasn't NP-hard.

    --
    Most folk'll never lose a toe, and then again some folk'll...
    1. Re:the second I read the article by Jugalator · · Score: 3, Funny

      I'm sure creating that infectious tune wasn't NP-hard.

      No, but, from own experiences, it's an NP-hard problem to get it out of your head once you've heard it, so please don't give me a link to where it can be downloaded. :-)

      --
      Beware: In C++, your friends can see your privates!
    2. Re:the second I read the article by Anonymous Coward · · Score: 0

      Thanks a lot, now I'm humming it too. I believe it's Song B from the Gameboy original edition.

  39. Amazing by Evil+Adrian · · Score: 0

    Amazing the kind of shit people get paid for.

    --
    evil adrian
  40. Historical value by Dexter77 · · Score: 2

    What are your opinions dear slashdotters, now that Tetris has proven itself in the eyes of mathematicians should we place it on the same line with Chess and Go or maybe rubik's cube?

    Computer world has not yet produced any historical classics, but I think if there should be one the Tetris might be the best candidate. Tetris is a game that can't be produced without computers, but it holds the same gaming value as Chess or Go, it can be played infinitely which in my opinion is the most important feature of a classic game.

    Please share your thoughts?

    1. Re:Historical value by ProfessorPuke · · Score: 2

      From the point of view of computer terminolgy, and also heavy game players, Tetris is not a game at all. Both the Game Theory branch of mathematics and any big playing group will tell you that games are all about opposition- two competitors pitting their skills against each other using a set of rules. Pure tetris has only one player, and (like things called Solitare) isn't really a game.

      (The mathematicians go even further, and only classify problems as a game if there is are no elements unknown to the players- so no facedown cards, and no rolling of dice)

    2. Re:Historical value by PsychoFraculator · · Score: 1

      And on the flipside, Chess, Go and Rubik's cube couldn't possibly be as hard as Tetris... they are all finite problems and so can be solved in constant time. Admittedly, a constant time that is enormous, but constant nonetheless. You need an infinite family of problems before you can get an NP-hard problem.

      As it turns out, you can define infinite problems based on Go (play it on an n x n board instead of 19 x 19) or for the Rubik's (give an arbitrary configuration for an n x n cube instead of 3 x 3)
      but there's no natural way to do this for chess.

      --
      "I don't want to get fraculated!"
  41. Maybe a human can disprove it? by Jeppe+Salvesen · · Score: 0

    If we created a tetris that moves really slowly, with no speed increase and full look-ahead, I bet you could keep that game going for days.

    I am extremely skeptical to their final result, and suspect they simply have not understood the game and algorithms required well enough.

    --

    Stop the brainwash

  42. Duh by Crispin+Cowan · · Score: 3, Informative
    Well, duh. Tetris is based on bin packing, a classic NP-hard optimization problem. That's what makes it such a compelling game: you have to solve a really hard problem in real time.

    Crispin
    ----
    Crispin Cowan, Ph.D.
    Chief Scientist, WireX Communications, Inc.
    Immunix: Security Hardened Linux Distribution
    Available for purchase

    1. Re:Duh by donutello · · Score: 3, Informative

      Nope. Tetris has nothing to do with bin packing. Bin packing is about putting numbers in buckets such that no bucket has a total more than so much. Tetris looks like a bin you're packing but there is no similarity between tetris and the bin packing they are refering to.

      --
      Mmmm.. Donuts
    2. Re:Duh by Anonymous Coward · · Score: 0

      Change your sig asshole. You've been slapped down twice now by other posters. You look like an idiot, Mr. Crispin Cowan, Ph.D. Chief Scientist, WireX Communications, Inc.

    3. Re:Duh by Anonymous Coward · · Score: 0

      Yeah, no kidding... at least put it in the .sig area so I can filter out that fucking five line monstrosity.

    4. Re:Duh by Anonymous Coward · · Score: 0

      Crispin, you're such a know-nothing loudmouth fool.

      Perhaps you should shut the fuck up from now on.

    5. Re:Duh by Anonymous Coward · · Score: 0

      d00d, he got his CS PhD at the University of Western Ontario, one of the finest MBA schools in Canada. 'nuff said.

    6. Re:Duh by Anonymous Coward · · Score: 0

      Hey stupid...no one cares. Kill yourself. You were wrong, and your .sig is obnoxious. You're a waste of precious resources, and no one likes you.

  43. Re:Hrm. by Wrexen · · Score: 5, Informative

    The inventor of Tetris is alive and well. In fact, I just saw him give a talk while visitng UIUC at their Reflections and Projections conference.

  44. Remember what WOPR said... by jonblaze · · Score: 2, Insightful

    "The only way to win is not to play."

  45. Not your father's tetris... by travd · · Score: 5, Informative
    The top of the third page, the authors reveal a major change to the definition of Tetris they made in order to prove NP-Completeness:
    It is natural to generalize the Tetris gameboard to m-by-n, since a relatively simple dynamic program solves the case of a constant-size gameboard in time polynomial in the number of pieces.
    Of course every version of Tetris that I have played has been on a "constant-size game board" - and so the real result is that Tetris, as the rest of the world knows it, is NOT NP-Complete, and is solvable in P(n) time - I find that the generalization to m x n gameboards breaks the problem, while the other simplifications or generalizations they introduce are reasonable.
    1. Re:Not your father's tetris... by Anonymous Coward · · Score: 1, Insightful
      I should also probably point out that even the general case is not NP-complete in the sense that complexity scales in NP with number of pieces considered in the offline analysis, as one might assume, but rather with the number columns of the game field (the number of rows being chosen arbitrarily to suit the proof).


      That is, the tetris problem scales intractably with column size, not necessarily with piece count. My impression is, if I say, for example, that checkers is NP-complete, then I am talking about the complexity involved in looking n moves into the future, or computing an optimal solution for the next n moves, rather than the complexity of increasing the board size to n * n.


      Furthermore, I'm unsure that the dynamic algorithm that allows the piece size dependency to be polynomial is really so simple - they leave it as an excercise for the reader I suppose!

    2. Re:Not your father's tetris... by Plutor · · Score: 3, Informative

      Not really. All NP-hard problems are relatively "easy" if you use a constant-size (and small) set. By the Minesweeper analogy: If the board is 5x5, it's easy to solve. Only by generalizing the problem to an arbitrarily large set, can they show that it actually is NP-complete.

      x^n doesnt look like much when n is 'small'.

    3. Re:Not your father's tetris... by travd · · Score: 1

      The question here surrounds what defines the size of the problem - one would think that it is the number of pieces that must be placed optimally, regardless of the size of the grid - however, they talk about the scaling as the size of the board increases, which isn't the intuition notion of hardness in this case.

    4. Re:Not your father's tetris... by travd · · Score: 1

      oops, that should read "...which isn't the intuitive notion..."

  46. Tetrisphere? by Ziviyr · · Score: 2

    Is Tetrisphere also NP-hard?

    --

    Someone set us up the bomb, so shine we are!
  47. Minesweeper too? by sahala · · Score: 1
    Interestingly enough, the paper also notes that Minesweeper is NP-hard...

    Related work: other games and puzzles. A number of other popular one-player com- puter games have been shown to be NP-hard, most notably Minesweeper, or more precisely, the Minesweeper \consistency" problem [6]. See the survey of the first author [3] for a summary of other games and puzzles that have been studied from the perspective of computational complexity. These results form the emerging area of algorithmic combinatorial game theory, in which many new results have been established in the past few years.
    1. Re:Minesweeper too? by Anonymous Coward · · Score: 0

      You can see the proof for minesweeper being NP at:
      http://sed.free.fr/complex/mines.html
      (includes really pretty diagrams :)

  48. Tetris NP-hardness results by po8 · · Score: 5, Insightful

    Technically, it's 'NP-hard,' meaning that there is no efficient way to calculate the necessary moves to "win"

    It is more correct to say that "there is no known efficient way to calculate the necessary moves to win, and it is unlikely that one will be discovered." Technically, there is no efficient method unless P = NP. See Garey and Johnson for details.

    At least there's one geek classic that refuses to fall to the scrutiny of mathematicians.

    Actually, even the (surprising, novel, and cool) approximation results only tell us about the asymptotic complexity of the game, and then only of the "offline" game in which you know the sequence of pieces that will be coming. Note that optimal restacking of blocks is also asymptotically NP-hard and inapproximable [Gupta and Nau], but quite tractable for humans and machines even for very large stacks in practice. Short version: in spite of these results, a good AI programmer can easily build a Tetris-playing program that will kick your sorry human behind :-).

    One assumption in the paper that I disagree with is that "intuitively" the offline version (full knowledge of piece sequence) should be easier than the version in which the piece sequence is not known. My intuition says the opposite: in the online version, the most one can do is optimize one's probability of a win. This more modest goal should be easier to attain than the loftier goal of "prove a win if one exists".

  49. Moderidiots! by Anonymous Coward · · Score: 0
    How about -5 Non sequitur instead of +5 Insightful. If at least it was +5 Funny, I'd understand, but insightful?

    For those who still don't get it: this is about the abstract problem of fitting tetris pieces together, not about pointing a videocamera at the screen, and have a second computer recognize the pieces. The second computer (the one "playing") already has all the information it needs in a suitable form, the only things it needs to do is decide how to place it. That's the problem that's NP hard, the problem is not figuring out that we this blue piece falling down is indeed L-shaped...

  50. technically, that is wrong by g4dget · · Score: 2
    Technically, it's 'NP-hard,' meaning that there is no efficient way to calculate the necessary moves to "win," even if you know in advance the complete order of pieces, and are given all the time you need to make each move.

    Even if we stick with the traditional meaning of "efficient" as "solvable in polynomial time", that is wrong: we simply don't know whether NP-hard problems can be solved in polynomial time or not.

    Of course, the whole definition of "efficiency" used in the theory of NP completeness is bogus. Just because something runs in polynomial time doesn't mean it can be solved "efficiently" or even that it "scales well", and just because something is NP-hard doesn't mean that it's not solvable efficiently in most or all cases you would be interested in.

    NP completeness is a cute theory, but the misleading use of the term "efficient" it has brought into vogue in some computer science circles has really done a lot of harm and caused a lot of confusion.

    1. Re:technically, that is wrong by Corporate+Troll · · Score: 2, Insightful
      we simply don't know whether NP-hard problems can be solved in polynomial time or not.

      And that is wrong too.... Because NP means "Non-Deterministically in Polynomial time". This means you *can* solve the problem in polynomial time, but that you need to approach the problem by attacking it in a parallel way. Look at it this way: if you have a problem that needs 2^1000 different calculation and each of those calculations lasts 1 day. Given you have 2^1000 computers, you can solve the problem in 1 day, which is *definately* polynomial (it's constant!)

    2. Re:technically, that is wrong by g4dget · · Score: 2
      And that is wrong too....

      No, it isn't. When people talk about "solvable in polynomial time" without further qualification, they mean the deterministic case.

      Look at it this way: if you have a problem that needs 2^1000 different calculation and each of those calculations lasts 1 day. Given you have 2^1000 computers, you can solve the problem in 1 day, which is *definately* polynomial (it's constant!)

      That's neither an accurate statement about non-determinism nor about parallelism.

    3. Re:technically, that is wrong by Corporate+Troll · · Score: 2, Insightful
      I'm pretty sure that my computer theory professor would have deducted points if I said "NP problems cannot be solved in polynomial time". It's some years ago I had that course, so times might have changed.

      Now, please explain *why* those statement are wrong for parallelism and non-determinism (I know that non-determinism != parallelism, but it's a way to *illustrate*). That's the way I used to remember the difference between P and NP, worked fine you know. Of course, I'm willing to learn if you know so much better.

    4. Re:technically, that is wrong by g4dget · · Score: 2
      my computer theory professor would have deducted points if I said "NP problems cannot be solved in polynomial time"

      As well he should: that statement is wrong. All we can say is that it isn't known whether NP-complete problems can be solved in (deterministic, sequential) polynomial time. Which is what I said.

      Now, please explain *why* those statement are wrong for parallelism and non-determinism

      Because you are not guaranteed that a problem consisting of "2^1000 computations" can be carried out by "2^1000 computers" in parallel. For example, if "encrypt" is a strong encryption algorithm that takes a day to run, how would you parallelize this:

      s = "hello"
      for i=1 to 2**1000 do s = encrypt(msg=s,key=i) end
      print(s)

      And for parallelizing an NP-complete problem by removing non-determinism, you can only parallelize as you encounter choice points--afterwards, you are still left with a problem in P (i.e., worse than constant time in general).

    5. Re:technically, that is wrong by Corporate+Troll · · Score: 2, Insightful
      Well it is after all you that said "we simply don't know whether NP-hard problems can be solved in polynomial time or not.", which in my eyes is completely equivalent to saying "NP problems cannot be solved in polynomial time". As you said, you implied determinism, but to someone who didn't have computer theory classes this non-obvious. Not everyone around here has a computer science degree.

      You are right that not every problem is parallelizable. Your example doesn't really "solve" anything, it just displays a list of "hello" encrypted with 2**1000 different keys. But even then it is synchronizable, let each of your computer start the encryption 1ms apart and send it to a queue: the results will come in nicely sequential and you have your result. This would take very very very long (since 1ms * 2**^1000 seconds = very very long), but it would be Polynomial time. Polynomial time does not imply "in our lifetime". Note also that you would only need 86400000 computers, since after 86400000ms the first one is done and can start the next calculation.

      A better example would have been this:

      String unencryptedMessage="Hello World";
      String encryptedMessgae="fqwdwezufzd";
      for( verylong key=0; key < 2^1000; key++ ) {
      if ( encrypt( key, unencryptedMesage).equals( encryptedMessgae ) ) { System.out.println( "The encryption key is: " + key ); }
      }

      This is solving a problem: namely finding the key of a known encrypted message. And very easy to solve when computing non-deterministically. Just let each of your nodes do exactly one calculation. Things like DNA-Computing and Quantum computing are based on this philosophy: try everything at the same time and filter out the result.
      I have to admit that my thinking was more in the lines of the classics like Travelling Salesman, or the one with the boolean expression where you have to fill in booleans in order to get it true with a give set of operators.
      Finally, since all NP-hard problems can be reformulated as another NP-hard problem, it is should be possible to transform any non-synchronizable (ahem!) NP-hard problem into a synchronizable NP-problem. Not sure about that, as said... long time ago I had that course.

    6. Re:technically, that is wrong by Anonymous Coward · · Score: 0

      "we simply don't know whether NP-hard problems can be solved in polynomial time or not.", which in my eyes is completely equivalent to saying "NP problems cannot be solved in polynomial time".

      How can these be equal. One says we MAY be able to do NP-hard in P, the other says we CANNOT do it. You are saying NP!=P where the commonly held belief is NP=?P

    7. Re:technically, that is wrong by Corporate+Troll · · Score: 2, Insightful
      No, that is not what I say... The missing word in BOTH statements is "deterministic".
      Is this that hard to comprehend? It's one word that is missing that makes the statement false, and that is it.
      The point is: We KNOW that NP-hard problems are solvable in polynomial time, just NOT in a deterministic way.

      The question here is not at all if NP=P, since NP is defined as "Solvable non-deterministically in Polynomial time" and P is defined as "Solvable deterministically in polynomial time". *sigh* Hence: both techniques solve in Polynomial time only the way of processing is drastically different in order to archieve a solution.

    8. Re:technically, that is wrong by g4dget · · Score: 2
      You know, I was going to respond to the half-dozen or so errors in your posting, but when I came to this, I decided it just isn't worth it:

      since all NP-hard problems can be reformulated as another NP-hard problem

      You obviously don't have the slightest clue of what you are talking about. Get yourself a good book on computational complexity.

    9. Re:technically, that is wrong by Corporate+Troll · · Score: 2, Insightful
      How many times exactly do I have to tell you that I took that course years ago? So, okay, I'm wrong (yes, I did some googling), buy hey, let's talk about your knowlegde about this subject as soon as you are out of University and had years of mind-numbing Corpoate environments to endure.

      You know, you forget stuff while aging....

  51. Then you haven't seen this guy play by Anonymous Coward · · Score: 0

    http://penguinppc.org/~olaf/tetris_japan_finals.mp eg

    or just do a search for filename in GOOGLE.

    JAPAN Finals??? for Tetris The Absolute Plus -The Grandmaster2- DEATH MODE.
    I Think he makes it look easy. 12.8MB Video. 5 minutes plus.

  52. "classic" games and computability by sahala · · Score: 1
    After reading this page on complexity of games and puzzles, it almost seems like all the games that have stood the test of time have a very NP-complete aspect to it. I guess this is pretty obvious, since it's intuitively easy to observe that easy games get boring after awhile.

    I'm curious whether people hundreds of years from now will still be playing Tetris (I would bet that they will be). I've been playing Tetris on the game boy for over 10 years now and it's still fun.

  53. 0-1 Knapsack Problem by Citizen+of+Earth · · Score: 2

    Technically, it's 'NP-hard,'

    To me, Tetris seems to be analogous to the 0-1 Knapsack problem, which is also NP-complete. Except maybe Tetris moves the problem into the second dimension. OTOH, we know that P=NP [1], so this problem can be solved readily.

    [1] The Simpsons, "Treehouse of Horror VI", #3F04, 1995.

  54. Use Quake? by stackdump · · Score: 0, Troll

    What are you talking about, what did the army use quake to do? Either you are way off base or you didn't link to the story where the army uses Quake. Basically I am saying, WTF?

    1. Re:Use Quake? by Anonymous Coward · · Score: 0

      Their own computer games to train. Didn't you read where he said "Hey, at least they build their own!"

  55. Win at Tetris - the world depends on YOU! ;-) by Anonymous Coward · · Score: 0

    What these guys have proven is that the mathematical concept behind the game is similar to a very important class of problems, a class that includes such gems as "finding the optimal stacking order of packages in a truck" and "finding the shortest route between points".

    As you are no doubt aware, these are really tough problems, which no doubt explains why packages always arrive late and damaged (slamming the packages into the truck, while not a proper mathematical solution, appears to be UPS' favorite way of optimizing their stacking order).

    The good news is this: if one of the problems in the class is solved, solutions for all the others can also be derived from that one solution.

    Corrolary: if you win at Tetris UPS will start to deliver on time, without damaging your package!

    GET PLAYING! THE WORLD DEPENDS ON YOU! ;-)

  56. Hey! by Anonymous Coward · · Score: 0

    You forgot to include goatse link! Here it is: Click here!

  57. All this talk of tetris by danny256 · · Score: 1

    makes me want to play.

  58. This must be... by Sean+Trembath · · Score: 0

    MIT's "Game Theory" division we heard about in A Beautiful Mind

    I'm sorry.

  59. Thats sweet by Binarybrain · · Score: 1

    Now somebody just needs to find a way to solve Tetris in polynomial time and they will be rich.

    1. Re:Thats sweet by Anonymous Coward · · Score: 0

      Surely it's true. Who wants to watch the paltry NP-hard algorithm flounder about when we can watch a polynomial time algorithm!!

  60. If Tetris is NP-hard.. by Anonymous Coward · · Score: 0

    This guy is a quantum computer.

  61. Tetris is hard? by TekReggard · · Score: 1

    This reminds me of when the Air Force funded research to proove that the bumblebee couldnt fly. In the end, they were still wrong... PS2 version Maxed out the points, the system crashed. w00t. :) I loooovvvveeee Tetris, and no, MIT, it isnt hard, I could show you how to create perfect combinations with any pieces. And its even easier if you know ahead of time. So, yes, Tetris is hard, and bumblebees can't fly. ;) Oh wait you used MATH to figure out tetris? Well when they randomized the irregular pieces and patterns that follow different rule sets of COURSE you figured out that it wasnt possible to predict any ending. Chess doesnt have random pieces in random placements random combinations etc... same with checkers, connect 4, and many other games that can be predicted and WON. [I use connect 4 as an example because while it can be called similar to tetris you still have a limited number of spaces, and moves to play.] Tetris isnt a game about winning, its a game about individual skill. If you wanted to figure out how to predict scores for tetris, base it on user skill. Someone might be able to get 200, another person 500, another could keep it going forever... And if you really know how to play Tetris, you can see your faults and prepare for possible shortcomings, many many many turns ahead. "Always keep a spot waiting for those long 4 x 1 pieces."

  62. Actualy, it's NP-complete. by Find+love+Online · · Score: 1

    Solving a game of Tetris always requires O(infinity) time, because there are an infinite number of pieces :P

    Anyway, I doubt this will really have much 'theoretically practical' (I say that because obviously there is no practical practicality in any of this :P) value to playing Tetris, since you actually don't know what pieces you're going to get. A computer will always be able to beat a human due to the fact that they can react faster. A computer playing the most conservative game will still kill a person, due to the fact that can probably go 'forever', while the person will top out at a certain speed as the game gets faster.

    If you coded in a 'reaction time' into a computer program it might get interesting.

    Ultimately, Tetris is really about risk taking. By building up, and keeping 'clean' structures to get tetrises, you're taking a lot of risk. The higher up on the screen you are, the more risk you're taking.

    The other risk you take is in 'sealing off' a hole for a long piece that would get you a Tetris in order to clear off some blocks or whatever.

    I would suspect that a computer program designed to calculate those probabilities and risk factors, even with just a simple engine for figuring out where to put the blocks would be able to beat a human player, perhaps even with the same restrictions on response times. In fact, I'd be willing to bet on it :P

    (btw, I had one of the highest scores in my high school on ztetris, a version of tetris for the ti-8x calculators (written in z80 assembler.) I got up to level 17, and over 49k points for anyone out there who played that version of the game :)

    1. Re:Actualy, it's NP-complete. by shaldannon · · Score: 2

      Your comments gave me an idea that started me wondering....

      what happens if you write a reverse tetris program? That is, write a program where the human tries to pick the right combination of pieces and the computer tries to achieve tetrises using the pieces...

      Of course, my not being an AI expert, it would be pointless for me to try, but maybe someone else out there might find it interesting...

      --


      What is your Slash Rating?
  63. Only proven hard if started screwed up enough... by po8 · · Score: 5, Insightful

    Uh, I was just reading the full paper and came to this comment which summarizes an important fact omitted in the abstract:

    An essential part of our reduction is a complicated initial gameboard from which the player must start. A major open question is whether Tetris can be played efficiently with an empty initial configuration: What is the complexity of Tetris when the initial gameboard is empty?
    In other words, "normal offline Tetris" (whatever that means) may still be in P. (And, BTW, when they say "complicated", they really mean it: check out the full paper for details.) Sigh.
  64. Too much math nowadays by MalleusEBHC · · Score: 1, Troll

    What is it with all these bastards relating simple, enjoyable, time-wasting games with math? First I heard Minesweeper was NP-Hard. No problem, I don't use Windows so my goofing off wasn't affected. Now Tetris is NP-Hard. No big deal, I haven't played Gameboy snce I was 8 probably. (I can see it now... "When I was a kid, we played Gameboy in black and white after walking 15 miles in the snow, uphill, with no shoes on...") But I swear on my geekhood that if someone dares to ever apply math to Snood I will have their head.

    1. Re:Too much math nowadays by danny256 · · Score: 1

      Clearly windows and gameboy are out. If they ever find frozen bubble NP-Hard where will we have left to turn?

  65. Tetiris / Eyeball RSI Warning by Boss,+Pointy+Haired · · Score: 5, Interesting

    Just a warning to those becoming or already hooked on Tetris.

    I used to be a serious Tetris junkie, and played on many different versions on different platforms.

    Playing so much, I became "quite good", and this meant that blocks were falling extremely rapidly.

    To play tetris at high speed, you glance very quickly at the arriving piece, then move your gaze back to the pile to asses the position - moving the piece without looking at it. Repeat until bored.

    Then my eyes packed up. I basically developed something like "RSI" in both eyes - my eyes would twitch repeatedly up and down in the exact movements used in high speed tetris. This whilst not even playing tetris.

    I diagnosed the problem myself and quit playing, but it took a few months to clear up.

    Just a warning. I still play it on and off.

    1. Re:Tetiris / Eyeball RSI Warning by isorox · · Score: 5, Funny

      Just a warning. I still play it on and off.

      Thanks, if I ever meet you I'll be sure not to be freaked out

    2. Re:Tetiris / Eyeball RSI Warning by machine+of+god · · Score: 1, Funny

      I can quit any time I want to.

    3. Re:Tetiris / Eyeball RSI Warning by tswinzig · · Score: 2, Funny

      I diagnosed the problem myself and quit playing, but it took a few months to clear up.

      Just a warning. I still play it on and off.


      It's probably more fun when it's on, right?

      --

      "And like that ... he's gone."
    4. Re:Tetiris / Eyeball RSI Warning by Gulik · · Score: 1

      I saw an interview with Jackie Chan wherein someone asked him if he played any video games. He mentioned that he used to play Tetris all the time, until he started having nightmares about trying to choreograph fight scenes and discovering that his head didn't fit into any of the openings in gates, ladders, etc. that he wanted to use in the scene. He stopped playing right after that.

      I, myself, had only one marathon Tetris session. Afterwards, I tried to read a book -- and the words kept sliding over to the right margin of the page, flipping around, and dropping. Seriously. I never played the game again, and still have a minor dread of it.

    5. Re:Tetiris / Eyeball RSI Warning by mrsmalkav · · Score: 1

      OH SHIT. So now I have to worry about getting eyeball RSI from playing too much DDR??

      Damn. I had no idea that that game would be such a work out on *all* my body, including my eyes!

    6. Re:Tetiris / Eyeball RSI Warning by Jester99 · · Score: 2

      Hm. When I play DDR, I typically just look at the top few rows of arrows... my eyes don't flit around much at all.

    7. Re:Tetiris / Eyeball RSI Warning by mrsmalkav · · Score: 1

      what, you don't look at the arrows and then down to your feet and then back up the arrows for every move?

      am i doing something wrong?!?!?

      man, i thought the dizziness was a feature!!

  66. Re:Only proven hard if started screwed up enough.. by po8 · · Score: 2

    And wait, there's still more. The proof fails if you fix the number of columns in the game board! In other words, this is not just offline Tetris on a normal-width Tetris board: the complexity is a function of the fact that as the piece sequence gets longer, the board width also increases.

    I was excited about this paper half an hour ago: now, not so much.

  67. Tetris@home will solve the puzzle by flowerp · · Score: 1


    I hereby propose the use of 300.000 home computers
    to solve the NP-Problem.

    Join the Tetris@Home distributed computing effort!

    --
    --- Eat my sig.
  68. A good new view into women... by Ektanoor · · Score: 4, Funny

    Some have noted that women have always had a peculiar taste to play Tetris. It is interesting to note that the most fanatic players are usually women... Well, I am completely of a different mind and always considered this game as too boring. I wondered how could people play such thing for long hours. No more. I consider the game an excellent testing system. The next time I see a girl dealing with NP-hard algorithms and crying she can't hold up, I'll play the dirty trick:

    New fresh roast student - "Excuse me, but this task it's too hard for me. It deals with a NP-hard task and I don't have the brains for it... Couldn't you give a more simple task for me?.."

    Me - "Well go and play some Tetris while I think how we can ease your work..."

    After a few hours - "Well what's the score? And you say NP-hard algorithms are too hard for you? You trying to solve a NP-hard algorithm for more than an hour! Cool, go and try to do the same with that task you don't have brains for..."

    1. Re:A good new view into women... by tswinzig · · Score: 5, Funny

      The next time I see a girl dealing with NP-hard algorithms and crying she can't hold up, I'll play the dirty trick...

      And here I thought the rest of your story would involve the use of the pickup line, "Hey baby, wanna play with something that is very NP-Hard?!"

      --

      "And like that ... he's gone."
    2. Re:A good new view into women... by Anonymous Coward · · Score: 0


      You have never been laid.

  69. Semantics Nazi by gazbo · · Score: 0
    is not polinomial in number of pieces.

    You're making something of a large, unproven assumption there.

    The fact it's clearly right doesn't matter...

  70. You don't know much about CS or Tetris, actualy. by Find+love+Online · · Score: 4, Interesting

    Tetris is all about putting things where they fit, not some grand master strategy.

    Actually, Tetris is all about risk management. See my other post on the subject. Once you get good at fitting the pieces together, the game becomes a question of figuring how risky building (and destroying) certain structures is, based on the probability of getting a long, or L shape.

    And us biological constructs have an advantage, where we can more or less decide on the fly if X piece will fit decently enough in Y hole without having to go through a bajillion IF-THEN logic loops.

    Hrm... What is an "if-then" loop?

    Seriously though, in this case it shouldn't take more then a handful of loops and conditionals to figure out if a piece fits somewhere.

    Playing Tetris is not actually a hard problem for a computer. NP-Hard and 'hard for a computer' are totally different things.

    In general, the only reason human brains are better at some kinds of problems then computers is because computers are simply more limited in processing power. It would take thousands upon thousands of PCs hooked together to equal one human brain in terms of raw processing power.

    (I've heard estimates that PCs will equal the human mind in 20 years, figuring with Moore's law, that would mean the human brain is about 2^13 times more powerful then a PC, or 8192 times)

    Computational theory applies to all computing devices, including brains and other neural networks.

    If something is NP-hard for a circuit, its NP hard for a brain too.

  71. It's been known for a long time by M3wThr33 · · Score: 1

    Heck, Tetris has been a part of distributed computing for the last decade. It's being ran on school calculators, Diablo II, keychain devices, cell phones, sides of buildings. EVERYBODY is helping to compile this complex riddle. Eat your heart out Seti!

  72. Wha...? by Find+love+Online · · Score: 1

    What you just said makes no sense. Memory 'optimization'? optimization on what vector? (size, speed of access, what?)

    The only thing I can think of is like garbage collection or fragmentation... but memory is linear not 2dimensional. You don't need to 'rotate' anything.

  73. Obvious reason (thanks to Harry Hill) by gazbo · · Score: 1

    "I went into a Cancer Research and there was no research going on at all! Just a bunch of old women selling clothes. No wonder we haven't found a cure."

  74. Not Impressed by domcamus · · Score: 1

    Never mind if Tetris is in some sense NP Hard. This is hardly relevant in light of the fact that classical Tetris games have a finite expected length even for an angelic player (that is, one who magically plays the best possible move without need for an algorithm). I thought the proof was well known ? Just involves considering a sequence consisting only of 'S' and 'Z' pieces and showing that certain sequences cause a monotonic increase in the amount of cruft at the edges of the board... To put it informally, who cares that it probably takes exponential time to find the best move given that the best move won't save you anyway ?

  75. You can't ever win at tetris. by Find+love+Online · · Score: 0, Redundant

    It just gets harder and faster untill you die.

    Just. Like. Life.

    /ernie cline. :P

  76. Re:You don't know much about CS or Tetris, actualy by gazbo · · Score: 1
    If something is NP-hard for a circuit, its NP hard for a brain too.

    This is clearly true if taken at face value, however if you consider your implications, you are making a large implicit (though IMHO true) assumption: that the human brain is computationally equivalent to a Turing machine.

    Until we understand the function of a brain completely (no, we can't just assume it is perfectly modeled as an ANN), we can't make that sort of assumption.

  77. Tetris unwinnable against malevolent machine by Stephen · · Score: 4, Interesting

    It's also the case that Tetris is unwinnable against a malevolent machine, which chooses a nasty sequence of pieces. In the sense that even if you know the pieces in advance, you will eventually fill any tower of finite height.

    I've seen two independent proofs of this (and other people have surely done it too) but I can't find an online proof. But I think that one way for the machine to win is to drop S and Z pieces in any irrational proportion.

    --
    11.00100100001111110110101010001000100001011010001 1000010001101001100010011
    1. Re:Tetris unwinnable against malevolent machine by GregWebb · · Score: 2

      Surely as long as you know it's going to do that, you can peg your level at pretty close to what you've got at the moment with a constant supply of _any_ piece, alternating S and Zs included? You'll lose one line to the initial gaps but that's it.

      Tetris can ultimately defeat you I suspect, but that doesn't seem to be the way.

      --

      Greg

      (Inside a nuclear plant)
      Aaaarrrggh! Run! The canary has mutated!

  78. Uh... by Find+love+Online · · Score: 1

    We don't know the mind works, no. But what we do know is the mechanism by which it works. There is absolutly no reason to think that the brain can't be modeled on a turing machine.

    1. Re:Uh... by gazbo · · Score: 2, Insightful
      We don't know the mind works, no

      we do know...the mechanism by which it works

      Which is it? Either we know how it works or we don't. If we know how it works (same as ANNs?) then fine, go ahead and make assumptions based on that. If we don't, then don't make those assumptions. Just because people have evidence to support theories doesn't mean they can be stated as fact. We do not know how the brain works.

  79. Tetris is very easy on a Hercules - I should know by delphi125 · · Score: 3, Funny
    A long time ago, Tetris for the PC printed different coloured spaces for the blocks. Unfortunately, a Hercules monochrome card pretending to be able to deal with colour would display them all the same. So I could see the score etc, but not the pieces themselves. Since that would be a little too hard, I wrote a TSR which hooked into INT 10 which would change spaces to other characters. This depended on the colour, so for example the Blue 2x2 would print as 4 'O's.

    How can this be easy, you ask? Well, I put a delay in there too, it was adjustable from the command line of the TSR. When my score went past -32768 at the highest level, I decided enough was enough, and I didn't play Tetris for many years after.

  80. Earlier Tetris Papers on 'Loseability' by Keev · · Score: 5, Interesting

    Some little-known related references: A CS student at Univ of BC, John Brzustowski, did his Master's thesis on the problem of winning at Tetris if the computer is aware of your moves and reacting to them. He apparently proved that there is a finite sequence of tetrominos, which, if the machine selects them, you must lose. His work is cited in this later paper by H. Burgiel called "How to Lose at Tetris", which proves more generally that the computer can always produce a sequence of lose-forcing tetrominos, whether or not it's aware of your moves: paper is here.

    --
    A man, a plan, a canal: Suez!
  81. Good, now let's move on to more important things.. by Anonymous Coward · · Score: 0

    ... like is Defender NP-Hard? All those buttons and the left-handed controls... you had to be a twitchy psychotic to score well on that game!

  82. Oh by LS · · Score: 2

    I thought NP meant Not Particularly. duh

    --
    There is a fine line between being a cultivated citizen and being someone else's crop. - A. J. Patrick Liszkie
  83. This is not about tetris as you know it by olethrosdc · · Score: 3, Insightful

    Pay attention to page three: It is natural to generalize the Tetris gameboard to m-by-n, since a relatively simple dynamic program solves the case of a constant-size gameboard in time polynomial in the number of pieces

    I guess this means that hey, they are talking about something else that the normal constant-size gameboard!

    Also, page 25, gives a subtle hint that this is not about standard Tetris:

    What is the complexity of Tetris for a gameboard with a constant number of rows?

    What can we say about the difficulty of playing online Tetris if pieces are generated independently at random according to the uniform distribution?..

    Also, the authors concentrate on playing optimal with respect to the number of lines cleared and the number of tetrises achived (either objective, not both) - and do not concentrate on, say, not losing (They give references to the hardness of not losing in the first chapter)

    --

    I miss my rubber keyboard.(Homepage)

    1. Re:This is not about tetris as you know it by Sandmann · · Score: 2, Informative
      > ... a relatively simple dynamic program solves
      > the case of a constant-size gameboard in time
      > polynomial in the number of pieces

      Here is one relatively simple dynamic programming solution.

      Suppose the game board has size k. Each cell in the game board can be either on or off, so we can represent the state of the board in a bit vector with k bits. Now define a recursive procedure that takes a sequence of n blocks and a state of the game board as input:
      def solve (c, B_1, ..., B_n):
      if n == 1:
      (given c):
      find best placement of B_1;
      find the score you get with
      that placement
      return ([B_1], score)

      best_so_far = ([], 0)
      for each possible placement p of B_1:
      c' = c with p applied
      s = solve (c, B_2, ..., B_n);

      if (s is better than best_so_far)
      best_so_far = s

      return best_so_far
      This will calculate the optimal solution, but unfortunately the program runs in exponential time. To fix that, observer that solve will only be called with 2^k * n different sets of parameters. This means that since the function only does constant work when we disregard the recursive calls, caching the results of calls to the procedure in a table of size 2^k * n, we can make it run in time O(n).

      Note however that the O here is hiding a constant of size 2^k, where k is the size of the game board. This means that this algorithm, while nominally O(n), is not practical when the gameboard gets even moderately big.
  84. Encryption by minkwe · · Score: 1

    Could this be used in encryption somehow?

    --
    "Fighting terrorists with millitary might is like killing a mosquitor on your Dad's forehead with a rifle."
  85. Tetris Crypto by rjh · · Score: 2

    Not only that, but you could use Tetris as the foundation of a public-key cryptosystem. Knapsack algorithms are cool. :)

    Not that I'm suggesting anyone do this for anything other than geek points, mind you. Knapsack algorithms are in disfavor (several kinds of knapsacks lend themselves well to cryptanalysis). But still, you could do it. :)

  86. Tetris with physics: Triptych by Plug · · Score: 4, Interesting

    Chronic Logic, the people who brought you the cool Pontifex bridge builder game, have a game called Triptych, which can loosely be defined as 'Tetris meets Columns with physics'.

    When you drop blocks, gravity affects them, and you can move blocks around with other blocks. (If your blocks aren't placed square, they don't land square! V shaped blocks tend to sit upside down etc) You get rid of blocks not by making lines, but by getting 3 of the same colour in a row, which then 'energize' and let you eat other blocks of the same colour.

    And the best part - it's written in the Simple DirectMedia Layer, so it runs on Windows, Mac or Linux. Check it out. (The main site is in Flash; this site takes you straight to it.

    (Disclaimer - I am nothing to do with Chronic Logic - I just like the game.)

  87. Actually... by gazbo · · Score: 1
    I retract my previous statement about it not being NP-complete. Thinking about it, I believe it reduces fairly trivially to a satisfiability problem.

    I just wasn't thinking very hard about what problems one comes up against during a game - sorry.

  88. Re:Hrm. by SkulkCU · · Score: 3, Insightful


    These kids think that if it was made before they were born, the inventor must be dead.
    Hmmph.

    --
    .sig last updated Jan. 14, 2000
  89. Re:Hrm. by 6Yankee · · Score: 5, Funny

    Are there any other NP-hard games which were invented by dead Russians?

    Is Russian Roulette NP-hard?

  90. Their intuition is letting them down by Anonymous Coward · · Score: 0

    """We study the offine version because its hardness captures much of the difficulty of playing Tetris; intuitively, it is only easier to play Tetris with complete knowledge of the future, so the difficulty of playing the offine version suggests the diffculty of playing the online version."""

    The assumption here is that the complexity of the offline version gives a lower bound for the complexitity of the online version (without look-ahead). This may seem intuitive, but it does not hold. The reason is that without lookahead, the computer player is not restricted to a fixed sequence of pieces that it presents. In that scenario it can give you all the bad pieces.

    Consider it a 2-player game. Say the player builds this 4-layer hole with the expectation to complete 4 layers with the next 4-long piece. In their game, the player knows when this piece arrives. In online tetris, the 'giver' can observe this setup and decide not to give any 4-longs at all.

  91. Uggghh by Anonymous Coward · · Score: 0

    That article reads like something straight out of The Onion:

    "He even wore a red, white and blue, Star-Star Spangled Banner tie to emphasize the patriotic sentiments behind his efforts."

    "Its like Neil Armstrong walking on the moon. No matter how many people accomplish the feat afterwards, it will always be Armstrong who will be remembered for doing it first."

  92. NP-Hard? by chickenmonger · · Score: 2, Funny

    Is it just me, or did somebody else think of NP-transistors when they read "NP-Hard"?
    (Zap! Kapow! Kersplat!)

    ....I think my geek factor just increased by 1 x 10^2...ouch...

  93. Re:Hrm. by Anonymous Coward · · Score: 0

    No, Russian Roulette can be solved in O(N) time.

    At worst, you only drink N/2 glasses (if not, you're already dead from a previous glass...)

  94. What about Bust-A-Move?!? by natron+2.0 · · Score: 0, Troll

    So if Tetris is NP-Hard does that mean that Bust-A-Move is NP-Crap? It sure feels that way...

    1. Re:What about Bust-A-Move?!? by ndogg · · Score: 2

      Sorry, I hate to break this to you, but Bust-A-Move wouldn't be that hard of a problem to solve polynomially, especially if you knew ahead of time all the pieces you would get. However, there is a small possibility that you could have a game that is impossible to solve (via the order of colors, and the colors you already have.)

      --
      // file: mice.h
      #include "frickin_lasers.h"
    2. Re:What about Bust-A-Move?!? by natron+2.0 · · Score: 1

      I am not sure what versions of tetris everyone else is playing, but nearly every offshoot or replica of tetris I have played has shown the proceding tetris pieces before they are played.

    3. Re:What about Bust-A-Move?!? by ndogg · · Score: 2

      But Bust-A-Move isn't really at all anything like Tetris. I can see how it could have gotten its inspiration from Tetris, but that's where the similarities end.

      --
      // file: mice.h
      #include "frickin_lasers.h"
  95. Whoever downmodded me don't know science by Jeppe+Salvesen · · Score: 1, Offtopic

    I am quite shocked to see someone downmodded my suggestion we experimentally test the conclusion of the paper. They have created a theory that can be tested. Let's test it, folks.

    The knowledge we have today comes from a careful interplay between theory and experiment. They have set forth theories that can be tested and verified. What appears to be solid logic may also have loopholes in it - maybe even hidden deep into the assumptions. Experimentation can at least sometimes expose incorrect theories.

    So - get a grip, and lose the awe of what appears to be definite proof for the NP-completeness of the game you've struggeled with for so long.

    --

    Stop the brainwash

  96. bastion strategy by Animaether · · Score: 3, Interesting

    The reason you'd leave it open in the center is because.. if a beam block appears, you...

    1. Won't die immediately, when the block is vertical and Your stacks are high, as it'll slot into the gap.
    2a. can drop it immediately, making a tetris.
    2b. have to only rotate once to make it vertical, followed by 2a.

  97. Computer != Human by Anonymous Coward · · Score: 0

    Computers might have difficulties playing Tetris, some humans definitely do not. Check out this unbelievable movie if you want to know what I mean:
    http://www.nem3d.net/download/movies/fun/te tris_ja pan_finals.mpeg

  98. Look, I know they're from MIT and all... by MattRog · · Score: 5, Funny

    but that doesn't give them the right to flat-out make up words. "Inapproximability" indeed!

    --

    Thanks,
    --
    Matt
    1. Re:Look, I know they're from MIT and all... by terraformer · · Score: 0

      Yeah, that's the boys and girls from Haarrvaarrd...

      --
      Who are you? The new #2 Who is #1? You are #617565. I am not a number, I am a free man! Muhahaha.
    2. Re:Look, I know they're from MIT and all... by Xaroth · · Score: 1, Offtopic

      Me fail English? That's unpossible!

    3. Re:Look, I know they're from MIT and all... by mrsmalkav · · Score: 2, Funny

      That's a perfectly cromulent word. How dare you challenge MIT analysts.

    4. Re:Look, I know they're from MIT and all... by Crag · · Score: 1

      Whoever marked this 'offtopic' isn't a Simpsons fan. What a waste of a moderation point.

    5. Re:Look, I know they're from MIT and all... by AyeRoxor! · · Score: 1

      "'Inapproximability' indeed!"

      As you should know, not all forms of words are in the dictionary. This word makes perfect sense to anyone who wishes to have a knowledge of their language even the slightest bit better than the average person/streetwalker/rapper.

      The name for the the property of the ability to approximate an item is that item's approximability. The "In-" prefix means not, as seen in words like insufferable and incomplete. So, if there is no ability of a value to be approximated, that value is inapproximable, and, if quantifiable, the value that refers to exactly how inapproximable is a value is referred to as that value's inapproximability.

      It's fun, really, it is :-P

  99. Another version of the tetris song on mp3.com by yerricde · · Score: 3, Interesting

    Here's a Europop version of "Korobeyniki", which many players think of as "the Tetris song".

    --
    Will I retire or break 10K?
    1. Re:Another version of the tetris song on mp3.com by Joey7F · · Score: 2

      Reel Big Fish has a good version of that song

      --Joey

  100. Same piece sequence for both players by yerricde · · Score: 2

    Consider it a 2-player game. Say the player builds this 4-layer hole with the expectation to complete 4 layers with the next 4-long piece. In their game, the player knows when this piece arrives. In online tetris, the 'giver' can observe this setup and decide not to give any 4-longs at all.

    In most official TETRIS® products, each player has an independent PRNG seeded from the same value at the start; thus, the game gives the same pieces in the same order to both players. Thus, if you're not getting any sticks, the other player is just as screwed as you are.

    --
    Will I retire or break 10K?
  101. Not entirely true - co-author dead by Animaether · · Score: 1

    Actually, the author (Alexey Pajitnov) may still be alive - but one of the co-authors [not sure to what degree - credit amongst authors is vague] of Tetris (Vladimir Pokhilko - see also: Dmitry Pavlovsky and Vadim Gerasimov) is indeed dead; murder/suicide.

    http://www.kinox.org/articles/tetris.html

    I learned about this through his last venture, AnimaTek, which created the excellent Animatek World Builder virtual worlds renderer.

    http://www.digi-element.com/awb3_overview.shtml

  102. There's no sadistic AI in Tetris by yerricde · · Score: 2

    I'm personally convinced that Tetris and all its clones have a highly sophisticated masochistic AI.

    I don't know about most Tetris clones, but I do know that Tetanus On Drugs has only a simple linear congruential PRNG, not some sadistic AI.

    --
    Will I retire or break 10K?
  103. Actually, Tetris is impossible by watanabe · · Score: 4, Informative
    Actually, Tetris is impossible.

    http://www.math.uic.edu/~burgiel/Tetris/explanatio n.html Has a great article about this. Essentially, in a truly random Tetris game, getting a long sequence of alternating Z and S pieces will make it impossible to complete the board; they're thicker in the middle than the sides, meaning you'll build up a little tower in the middle, no matter how good you are.

    The page has links to a version of Tetris with only those pieces, if you want to try your luck on it.

  104. P vs. NP and why should I care? by rtos · · Score: 5, Informative
    [I posted this before, but I thought it was apropos to this story as well.]

    Perhaps you are wondering what an NP-complete problem is or what this P vs. NP stuff is all about. You might want to check out the comp.theory FAQ and scroll down to 7. P vs NP. It gives a bit of history and a decent description.

    Or check out The P versus NP Problem at Clay for a really good description (unfortunately too long to quote here). And lastly, you might want to check out Tutorial: Does P = NP? at VB Helper for a little more info.

    Ok, but what is it good for? The Compendium of NP Optimization Problems is a great place to look for real world examples of NP problems. Including everything from flower shop scheduling [nada.kth.se] to multiprocessor scheduling.

    Hopefully that helps. I was very clueless when it came to P vs. NP stuff that always seems to be mentioned on Slashdot. So I took the time to look it up. Now I'm clueless but I have links to share. :)

    --
    -- null
    1. Re:P vs. NP and why should I care? by grouchomarxist · · Score: 1

      The FAQ has moved to here.

  105. You win all MP games if your opponent is dead by Anonymous Coward · · Score: 0

    Just for accuracy's sake ;)

    You also win if all your opponents are dead in the multiplayer games, like Tetrinet [tetrinet.org]. (There's a good client out for Linux too - gTetrinet [sourceforge.net]).

  106. Tetris by Anonymous Coward · · Score: 0

    I had Tetris from Windows Entertainment Pack, and finally reached a score so high (>~30000 something) so that it went negative and I ended up with -19000.

    I also remember a 3D tetris clone probably called Helltris or something. Can't remember and I can't find it :(

  107. Tetris is only NP-hard when you try to maximize! by frleong · · Score: 4, Interesting

    There is a difference between a solution and an optimal solution. The fact that you don't lose doesn't mean that you're getting the best score. Finding the best way to fit a "T" block, for example, is simply much harder than just finding a place to place it.

    --
    ¦ ©® ±
  108. NP Hard/Complete by bwalling · · Score: 1

    Can someone simply explain the meaning of NP Hard and NP Complete?

  109. Kirby's Avalanche by Anonymous+Custard · · Score: 2, Funny

    I played tetris lightly, but never owned it or played too much. Although, it (and some other games) a few times had me dreaming about playing (like, literally had me arranging blocks in a dream).

    However, when I was about 14, I played a match of Kirby's avalanche against my friend's au pair (mom was divorced and he had a little bro). We had been lpaying all summer, so we were pretty good, but this match lasted well over an hour. The game speed got ridiculous, where the pieces seemed to fall as fast as the graphics processor could display them :-) We even had to take bathroom breaks. We were just so into the game that we were TOTALLY in the kirby zone. Kind of like when you're typing and you just hit exactly the right keys more quickly than usual, we were just placing the globs so perfectly and makin so many pumpkin combos :-)

    Ahhhhh, those were the days!

  110. AI: Tetris vs Dr. Mario by Vegan+Pagan · · Score: 3, Interesting

    If Nintendo is to be believed, Tetris is hard for computers and Dr. Mario is hard for humans.

    They published a SNES game with both Tetris and Dr. Mario on one cartrige. I'm assuming both were programmed by the same team, since it let both games run simultaneously.

    In either game you could play against the AI. You could choose the AI player's smarts, piece drop speed, and starting clutter. When I played against the smartest AI in Tetris, and made all else equal for it and me, I could just beat it, especially when starting with a clear field where I guess the player must be most "creative". But in Dr. Mario the AI was nearly perfect! As fast as possible and the best possible moves! Even on top speed and max clutter the AI almost never caved in! And to me, Dr. Mario is a more complicated game than Tetris.

    How could this be?

  111. Time Out! by kiwifr00t · · Score: 3, Interesting

    I'm either missing something or the boys at the MIT lab are thinking too hard.
    Years ago I wrote a program to play tetris and it did just fine! I know because it played directly against the tetris I had on my computer.
    I'll explain how it worked:
    In 1989 I lived in England and had lots of spare time to tinker with my computer (it was an old PC running at 4.77Mhz).
    I thought DOS Tetris was the coolest thing since mini skirts and was also dabbling with TSR programs at the time (TSR = Terminate and Stay Resident). These would let you run one program in the background while another program runs.
    So, naturally, I wrote a TSR program to play Tetris.
    I would start the TSR and then start the game. The TSR would look in the video buffer and analyze tetris as it ran. It would look at the layout of the board and look at the next piece. With some relatively simple logic and a series of rules it weighed the merits of various positions for the piece. To make the move it would stuff keystrokes in the keyboard buffer, such as Rotate, Rotate, Left, Left, Left, Drop. Then it simply waited till the keyboard buffer was empty (the piece had been moved) and look for the next piece.
    I could just sit back and watch...
    At first it wasn't very good but with some tweaking of rules it improved drastically.
    It would do much better than I could do manually, with pieces spinning, moving and dropping like crazy until the game really sped up. Then, with the limitations of a slow computer it couldn't analyze the best move and get the keystrokes in the buffer in time. Once it hit this threshold the pieces would start to stack up and it would be 'game over'.
    I think at the time and the version I had I personally could get a score of around 8000. The TSR could get scores up to around 15000.

    Just something to think about.....
    --
    Geoff

    1. Re:Time Out! by cpeikert · · Score: 2

      I'm either missing something or the boys at the MIT lab are thinking too hard.

      You are missing something... one of the authors is a woman. :)

  112. But this doesn't explain why... by diogenes57 · · Score: 2, Funny

    It's so hard to win on Tetrinet. I always thought the winners cheated using bots, but now this tells me that isn't possible.

    1. Re:But this doesn't explain why... by z4ce · · Score: 2

      Tetrinet isn't that hard. I can normally win like 1/2 of the time when not playing with cheaters. Personally, now I'm into TetriFAST it's like tetrinet.. only well.. fast (no block delay). The best players can drop like 140ppm(peices per minute) at SNS (Sticks 'n' Squares). I can only do like 80-90 at SNS but I can still win like 1/4th of the time.

      IF you want to play tetriNET/FAST on linux see the CVS version of gtetrinet if you want to play on windows check out the original. I normally play on downstack.com

      Ian

  113. Japan Tetris champoionships - mpeg by Anonymous Coward · · Score: 0

    This guy is amazing. I think he might have solved this tetris problem in O time, but isnt telling anyone.

    http://www.vulnerable.org/pics/video/tetris_japa n_ finals.mpeg

  114. Soko [AI vs human enjoyment] by Derwen · · Score: 2
    Analysts at MIT Laboratory for Computer Science, who have been busy translating, rotating and dropping, have demonstrated what the rest of us suspected: Tetris is hard. Technically, it's 'NP-hard,'
    Mybe they should be studying the correlation between how challenging problems are to AI, and how enjoyable they are for the human brain.
    Obviously loads of people love Tetris. My favourite game is Sokoban, which is beloved of AI researchers as it is P Space complete.
    Oh, and it's available for sed, as well as emacs :-)

    - Derwen

    --
    http://fsfeurope.org/
  115. Go by Anonymous Coward · · Score: 0

    At least there's one geek classic that refuses to fall to the scrutiny of mathematicians.

    'Go' is another.

  116. Dr. Mario by Anonymous Coward · · Score: 0

    But is Dr. Mario NP-Hard?

  117. Tetris is for wussies by Reziac · · Score: 2

    REAL geeks play Welltris and Blockout!!

    --
    ~REZ~ #43301. Who'd fake being me anyway?
  118. where's the hole? by boarder · · Score: 2

    I've been playing Tetris seriously for a long time, and I've always put the hole on the right side...
    Because of the width of the board and where the long piece is initially placed, it takes one extra translation move to get it to the left side of the screen.
    I've tested putting the hole in the center and in various other locations, but I found it is much simpler to control one wide stack with various places for different blocks, instead on two stacks with only a small number of places for blocks.
    When you get up to level 19 and above, things are moving so fast that the controller doesn't handle moving back and forth very quickly... you need to move pieces in a general direction (like all of them to the right, then slowly building to the left).
    All of this is on the NES Nintendo brand of Tetris. I have played other versions, but none as extensively. I would love to know the optimal strategy, but I think each player chooses which one works best for them (so even though the center may be optimal, I like the left better). My best score was 470,000... The guys at TwinGalaxies have the top score at 999,999 which seems impossible to me.

    --
    IANAL, but I play one on /.
    1. Re:where's the hole? by Anonymous Coward · · Score: 0

      watch the death mode movies linked above.

      Insane.

      I'm quite good at tetris, but I can't even comprehend what these guys are doing

    2. Re:where's the hole? by boarder · · Score: 2

      yeah, I watched them (these vids)... they're pretty good, but nothing like what you'd have to be in order to score 470,000 in original NES tetris. There are some differences you have to watch for in the video:
      1) pieces can be slid 2 or 3 spaces after they hit (at that speed, 1 is optimistic in the original)
      2) pieces can be rotated 2 or 3 times after they hit (once at any speed is optimistic in the original)
      3) pieces move right and left A LOT faster... in level 19, a long piece drops about 4 places for every move left or right; in this game, you can move the piece all the way to the wall by the time it drops 4 places

      Don't get me wrong, that guy is insanely good, but the original is more difficult and I can easily comprehend what they're doing.

      --
      IANAL, but I play one on /.
  119. New Deep Fritz competition? by phorm · · Score: 2

    So next time around, is Deep Fritz going to compete in the world Tetris competition? From what I gathered, the big machine had a stored set of the chess moves and their optimal countermoves.

    Tetris, it seems, could not even be pre-stored in such a way?
    Not counting how the blocks will speed up, does this mean that humans have a better chance of winning at tetris than at chess?

  120. Tetris? by Anonymous Coward · · Score: 0

    What is this game tetris I've been hearing a lot about? Any good? How much does it cost?

  121. Heh... by Find+love+Online · · Score: 1

    Just keep giving it those *
    **
    *
    Peices. You'll never get a tetris that way :P

  122. Proving by brute force by vee-dub.net · · Score: 1

    Wow, and to think all these years I've been playing Tetris ever so diligently, trying to come up with all the combinations and permutations of the game just so I can prove the same thing by brute force.

    I'm not sure I know what to do with my life anymore.

  123. NP-hardness is ubiquitous by rew2 · · Score: 1

    It is hardly news when yet another game is shown to be NP-hard. Consider that mindless solitaire game played with Mah Jong tiles called "Shang hai", where you can remove pairs of tiles that match and have exposed left or right edges. Even if there's only one layer of tiles, so you can see the entire state of the game at the start, determining whether it is possible to remove all the tiles is NP-complete.

    An easy exercise for the bored nerd.

    1. Re:NP-hardness is ubiquitous by Wavicle · · Score: 2

      Even if there's only one layer of tiles, so you can see the entire state of the game at the start, determining whether it is possible to remove all the tiles is NP-complete.

      Given that there will be very many solutions to the problem (removing all tiles) and each solution will be equally as good as all other solutions - thus not all pairing possibilities would have to be considered - are you sure the problem is NP-complete?

      --
      Education is a better safeguard of liberty than a standing army.
      Edward Everett (1794 - 1865)
  124. NP-Hard vs. NP-Complete... by LambSpam · · Score: 1

    Is it just me, or is NP-Hard different from NP-Complete. I thought NP-Hard was unsolvable (i.e., the halting problem), whereas NP-Complete was intractable.

    Do I really need to break out my computation books again?

  125. 128-bit Tetris encryption by c64cryptoboy · · Score: 4, Funny

    Now that we know it's NP hard, lets see if anyone can come up with a Tetris-based encryption scheme. Lets see, with just one shape (7 tetrominoes with rotations) there are 19 possibilities, so that's at least 4 bits of entropy right there.
    This could make the Bovine distributed cracking clients a lot more fun to watch.

    --
    I put the 'fun' in fundamentalism
  126. Similar to Go? by Suppafly · · Score: 2

    Technically, it's 'NP-hard,' meaning that there is no efficient way to calculate the necessary moves to "win," even if you know in advance the complete order of pieces, and are given all the time you need to make each move. At least there's one geek classic that refuses to fall to the scrutiny of mathematicians."

    I suspect it's similar to Go in that respect. People have been trying to make a computer good at Go for quite a while with limited success.

    Although with Tetris, I'd assume that even though there isn't a good way to guess the quickest way to win, it is probably trivial to make a computer halfway decent at playing tetris.

  127. Re:frost pist by Anonymous Coward · · Score: 0

    that's no necessarily true. I always make gay comments when talking about Bill Gates or his underlying commercial product dick sucking.

  128. From the Too-many-other-newsites department by moc.tfosorcimgllib · · Score: 1

    > How is this modded up as insightful??? Object recognition has nothing to do with this being hard. Read what it says on the bottom of page 2:

    I don't know what slashdot you're thinking about, but I'm reading the version where no one reads the article.
    Hell he mentioned X and Y in his post somewhere, so it MUST be insightful. I didn't even bother reading his whole post, I'm too busy playing flash adventure to care.

    1. Re:From the Too-many-other-newsites department by sahala · · Score: 2
      I don't know what slashdot you're thinking about, but I'm reading the version where no one reads the article. Hell he mentioned X and Y in his post somewhere, so it MUST be insightful. I didn't even bother reading his whole post, I'm too busy playing flash adventure to care.

      Someone mod this guy up for Realistic :)

  129. Harder and More Fun! - Triptych! by teamhasnoi · · Score: 2
    http://www.chroniclogic.com/

    Triptych is like tetris with real physics. Blocks bounce and rotate a *full* 360 degrees;. It's addictive as hell - Works on Linux, Mac and Windows too!

    Be sure to check out Pontifex - build bridges...One of the most addictive games I have ever played!

  130. Try level 19 on Nintendo by Anonymous Coward · · Score: 0

    The controller won't let you place a piece off to the side fast enough. Even if you spot where it should be, the piece drops so fast that its only feasable to play the bottom 4 or 5 lines. Now thats hard.

  131. I am good at Tetris, what does that mean? by Perception · · Score: 1

    I once won a Nintendo championship here in WA state back in 85. The game consisted of mario, rad racer, and of course, Tetris. However, the game wheighted the points the heaviest on Tetris. I love that game! Still do! It's a classic, like Metroid and Zelda.

  132. Duh by Anonymous Coward · · Score: 0

    Tetris is basically bin-packing...I don't see how this was a surprise. Guess what? Arranging your inventory in Diablo is just as difficult...

  133. I can't believe it's not Tetris by terrab0t · · Score: 2, Interesting
  134. The nintendo version was Cool! Re:Tetris "ends"? by Joey7F · · Score: 2

    Back on Nintendo after you scored a certain amount of points (like 25000 or so) you would see a rocket take off. The rockets got progressively larger and more complicated looking as your score increased.

    After an hour and a half of my fingers going crazy, I reached my highest score ever. I could not wait to see this! To my shock there was the dinkiest little rocket (it is the first one they show you) and while I was screaming ripoff at the tv, the kremlin, which is always next to the pad, ends up blasting off!

    It was the single coolest video game surprise of my childhood.

    --Joey

  135. ouch... my head by emilami · · Score: 1

    Don't get me wrong... I love mathematics and I love tetris... but ouch. Who honestly cares that much to dedicate so much time to something like that?

    --
    http://www.accountkiller.com/removal-requested
  136. You can't win with just the wrong pieces! by Doug+Merritt · · Score: 3, Insightful
    Ages ago I modified Xtetris to play automatically. I figured I had succeeded when it continued to play at top speed for a full week without losing.

    But interestingly enough, then I decided to see whether the game was deterministically winnable, or only statistically winnable -- so I used the same strategy algorithm to "cheat" by always picking the piece that was hardest to fit, and then presenting that piece as the next one for the human player to deal with.

    Both when I played, and when my autoplayer algorithm played, we always lost immediately without being able to remove even one row. It is truly maddening to get absolutely nothing but the "wrong" pieces. Even in slow motion, they just don't fit.

    The way to interpret this is that tetris is unplayable in the absolute worst case of bad luck, but that it is strangely nicely tuned so that it is winnable in a statistical sense -- for a while .

    But even if it doesn't speed up too much, eventually you'll run into a statistical streak of bad luck with just the wrong pieces, and you will lose! Guaranteed.

    Alexey was a friend of a friend at the time, and I mentioned this result to him. He said he was not at all surprised, but didn't say much else about it.

    --
    Professional Wild-Eyed Visionary
    1. Re:You can't win with just the wrong pieces! by wirelessbuzzers · · Score: 1

      There was a math olympiad problem about that a while back. I think it was something like, prove you can't win with only left-handed S blocks.

      --
      I hereby place the above post in the public domain.
  137. Quarter Eaters by I+kan+Spl · · Score: 1

    That would be why they used them for arcade games.... you cant win. That was the point, you need not prove it.

    --
    My UID is prime and so is this number: 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0.
  138. What this proof is really about by vlad_petric · · Score: 3, Informative
    Dear slashdotters who either never took or just completely ignored an algorithms/complexity class,

    They have shown, by reducing one NP-Complete problem to Tetris with full-lookahead, that optimal Tetris with full-lookahead is NP-hard.

    Now, the reducing works by taking any instance (i.e. input) of the original problem and converting it into an instance of the tetris problem, not the other way around. So the conversion won't produce all possible Tetris games, in fact only a very restricted class of them.

    This ignores two important aspects of Tetris playing:

    The game is not bound by the number of pieces (so suboptimal behaviour is not really a problem)

    The game is played with *random* input sets

    But, as always, it's very easy to discuss something that you have no idea what it means. And, btw, being NP-complete or NP-hard doesn't mean necessarily exponential complexity (neither P=NP nor PNP have been shown).

    The Raven

    --

    The Raven

  139. winning tetris aside, by Anonymous Coward · · Score: 0

    wouldn't you like to have a job like this - play a game and state the obvious: "it's hard"

    how about playing with counter-strike all day, 365 days a week and declare it as R&D effort related to co-opetition...

  140. 3d Tetris? by rajendran · · Score: 1

    Have any of you played a DOS game called BlockOut! I used to get real kicks playing that. It was like looking down from above, into the Tetris Well. I wonder what the difficulty levels of such a game could probably be! (I presume Maths won't get simpler, 2d to 3d!)

  141. Re:You don't know much about CS or Tetris, actualy by AnyoneEB · · Score: 1
    What is an "if-then" loop?
    Very good question, most of my if-then's don't loop, that's the job of for's and while's...
    --
    Centralization breaks the internet.
  142. baduk, dammit by strombrg · · Score: 1
    Why do so many geeks fail to realize that the ultimate geek challenge, go/baduk/weichi, hasn't really been dented by mathematicians, or even computer scientists?

    Yes, there's been some productive analysis of the endgame, but that's So Vastly Simpler than the opening or middle game.

    More here. .

    I understand go is EXPTIME-complete or EXPSPACE-complete depending on the ko rule (which isn't that central to the flow of the game).