Tetris is NP-hard even with O(1) rows or columns (2020) [pdf]

(martindemaine.org)

88 points | by isaacfrond 3 days ago ago

19 comments

  • pretzellogician 3 days ago

    Interesting! Not really that surprising, since another dimension (rows/columns/piece size) is O(n). But pretty cool.

  • NoahZuniga 3 days ago

    But not with both O(1) rows and columns!

    • tomsmeding 3 days ago

      Well, if there are no n dimensions the problem doesn't scale and there is no complexity to be had, because it's finite. :)

  • rthnbgrredf 3 days ago

    I haven't thought that the game is actually that hard. However, Hateris actually is https://github.com/qntm/hatetris

    • Keyframe 3 days ago

      Haha, thank you for this. I will implement this in my personal version of tetris!

      • nurettin 3 days ago

        Tetris is already kind of like that. My version avoids dropping the same piece consecutively (re-roll once on duplicate) in order to get a more realistic Tetris experience.

        • blharr 3 days ago

          Huh, I always thought it was a bag randomized, but looked it up and that's how the NES Tetris worked (reroll on duplicate)

          • Keyframe 3 days ago

            I have three randomizers in my version here: https://www.susmel.com/stacky/ you can switch between them with a t on your keyboard (no phones, sorry). If you expand controls with c you will see which one is active. NES and 7-bag are in there as well as "random"/stacky one. Shift+enter in the main menu to pick a level to start with.

          • WorldMaker 2 days ago

            I wish I had bookmarked the incredible deep dive into the multiple algorithm schemes for Tetris piece picking and which families of the game used which algorithms and why. The modern standard (as now dictated by rights holder The Tetris Company) is a bag approach, but has interesting nuances. That one I believe is 7-Bag these days (7-Piece bags). I've also heard a lot of love for 35-Bag which is the approach used by Tetris: The Grand Master 3. (From what little I know about it, TGM is a fascinating "family", especially its use in both tournament and speed running cultures. But because of all the usual drama of Tetris it can be sometimes hard to play TGM in the US as the license holder is Japanese.)

  • relwin 3 days ago

    Why is the paper's copyright footer "1992 Information Processing Society of Japan" when this work is actually from around 2019?

    • ansgri 3 days ago

      Probably used an outdated LaTeX template.

      • JohnKemeny 3 days ago

        Not so much outdated as simply not filled in. This is a submitted pdf, not proofed pdf. You can see that both volume and page numbers are missing.

        These are things filled in by the journal in the proofing stage (after peer review).

    • dang 3 days ago

      Good catch! Based on https://arxiv.org/abs/2009.14336, I put 2020 in the title above.

  • dooglius 3 days ago

    Needs (1992)

    • indeed30 3 days ago

      I think it's actually (2020)

  • westurner 3 days ago

    "From Nand to Tetris (2017)" https://news.ycombinator.com/item?id=38735066 .. From https://www.nand2tetris.org/ :

    > Nand to Tetris courses are taught at 400+ universities, high schools, and bootcamps. The students who take them range from high schoolers to Ph.D. students to senior engineers. Here is an extended syllabus of a typical academic-version course.

    There's now a schema.org/Syllabus Class .

    > Similar: "Show HN: Tetris, but the blocks are ARM instructions that execute in the browser" https://news.ycombinator.com/item?id=37086102

    What is the computational complexity of Tetris with ARM instructions?

    In ASM;

    Rosetta Code > Tetris: https://rosettacode.org/wiki/Tetris :

    > tetromino.py - Python implementation of Tetris included with Raspbian