PackIt! Gamified Rectangle Packing
Thomas Garrison, Marijn J. H. Heule, Bernardo Subercaseaux
TL;DR
PackIt! studies a turn-based rectangle packing game on an $n\times n$ grid where on turn $t$ a rectangle of area $t$ or $t+1$ must be placed without overlap. The authors develop arithmetic criteria using $K(m,n) = \tau(mn)$ and the gap $\gamma(m,n) = mn - T_{\tau(mn)}$, establish small-gap and large-gap impossibility results, and conjecture conditions under which perfect packings exist. They prove NP-hardness for the solitaire variant via gadget-based reductions from 4-Restricted-3-Partition and introduce an efficient $O(n^3)$-clause SAT encoding to compute perfect packings up to $n=50$, complemented by a dynamic-programming rectangle-selection stage. The work delivers both theoretical insights and practical algorithms, with extensive computational results and open questions on the 2-player version and broader packing problems.
Abstract
We present and analyze PackIt!, a turn-based game consisting of packing rectangles on an $n \times n$ grid. PackIt! can be easily played on paper, either as a competitive two-player game or in \emph{solitaire} fashion. On the $t$-th turn, a rectangle of area $t$ or $t+1$ must be placed in the grid. In the two-player format of PackIt! whichever player places a rectangle last wins, whereas the goal in the solitaire variant is to perfectly pack the $n \times n$ grid. We analyze conditions for the existence of a perfect packing over $n \times n$, then present an automated reasoning approach that allows finding perfect games of PackIt! up to $n = 50$ which includes a novel SAT-encoding technique of independent interest, and conclude by proving an NP-hardness result.
