HackerPapers

arXiv:cs/0210020cs.CC

Tetris is Hard, Even to Approximate

Erik D. Demaine, Susan Hohenberger, David Liben-Nowell

Abstract

In the popular computer game of Tetris, the player is given a sequence of tetromino pieces and must pack them into a rectangular gameboard initially occupied by a given configuration of filled squares; any completely filled row of the gameboard is cleared and all pieces above it drop by one row. We prove that in the offline version of Tetris, it is NP-complete to maximize the number of cleared rows, maximize the number of tetrises (quadruples of rows simultaneously filled and cleared), minimize the maximum height of an occupied square, or maximize the number of pieces placed before the game ends. We furthermore show the extreme inapproximability of the first and last of these objectives to within a factor of p^(1-epsilon), when given a sequence of p pieces, and the inapproximability of the third objective to within a factor of (2 - epsilon), for any epsilon>0. Our results hold under several variations on the rules of Tetris, including different models of rotation, limitations on player agility, and restricted piece sets.

arXiv comments
56 pages, 11 figures
Journal reference
DOI
Subjects
cs.CCComputational Complexity cs.CGComputational Geometry cs.DMDiscrete Mathematics

On Hacker News

Linked by 5 identifiable commenters in 5 comments across 5 threads, from Jul 2008 to Sep 2019. Found in 2 HN submissions from Nov 2007 to Mar 2019. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments5 threads

    • Yeah, it is interesting to ponder how much the game changes by a seemingly simple detail like how the pieces are generated. If they are generated uniformly then it is certain that the player will lose sooner or later (getting too many S or Z pieces in a row). It also has been…

      bjourneView on HNParent context

    • Note that results like this [0] tend to be for generalizations. '''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.''' [0]…

      croikleView on HNParent context

  1. Solving Tetris in C 1 comment
    • For those that care, a few years ago some researchers proved Tetris is NP-complete for many problems. http://arxiv.org/abs/cs.CC/0210020

      XkView on HNParent context

  2. Tetris Challenge 1 comment
    • Could prove tricky. After all, Tetris is NP-complete: http://arxiv.org/abs/cs.CC/0210020 (kind of an interesting proof -- they reduce it to the problem of partitioning multisets of numbers into groups of equal sums)

      dangroverView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.