# A mix of 2048 and Match 3

I was playing a game and thought of this problem:

## Rules

1. There are 4 distinct tiles on a $$6\times6$$ grid. The game starts out with one block on the board.
2. You can shift all the tiles in one of the four cardinal directions (north, south, west, east) until they hit a wall or a tile.
3. After every move, a new tile appears on the grid.
4. After all tiles have been shifted, if three or more same tiles line up orthogonally (not diagonally), these blocks disappear. (The tiles will not continue to shift.)

This game is basically a mix of 2048 and Match 3. Here is an example screenshot. The player can shift the tiles down and the 3 green H-tiles will be removed from the game:

Question: Is it guaranteed to never lose in this game? and if yes, is there a strategy?

• Are you allowed to make a move which does not shift any of the existing tiles (because they're already up against that wall) but only generates a new one? 2048 doesn't allow this in general – dspyz Aug 6 at 1:00
• Cool game! I may try to implement it at one stage. – Dmitry Kamenetsky Aug 6 at 1:47
• @dspyz Yes - creator of the game says it is intended – u-ndefined Aug 6 at 3:58
• After the green tiles have disappeared will those above them continue to fall? – Paul Panzer Aug 6 at 9:56
• @PaulPanzer Nope – u-ndefined Aug 7 at 3:41

Not even close to a full answer but I'd like to share an "educated conjecture":

Sorry fleshbags but you are at the computer's mercy!

Heuristics:

The following broad strategy looks promising to me for the computer not to allow a single tile to evaporate: Let us assume the last vertical push was to the top and the last horizontal one was to the left. The computer's strategy would be to work $$2\times2$$ block by $$2\times2$$ block, from top left to top right and then double row by double row.

Ideally, each $$2\times2$$ block would contain all four colors (in any arrangement); it would follow trivially that the player cannot get anything done. One can easily check by hand that the computer can make sure of that for the first two blocks; afterwards small deviations must be factored in: For the first double row I think the best the computer can get is the left and the right blocks complete and the middle block having three colors, the equal tiles placed diagonally to each other. (Doing this exercise is what makes me feel that even the damage the player can do by shearing our $$2\times2$$ blocks can be controlled.) Note that this is still good enough for the human not to get a chance of scoring.

My gut feeling is that when relaxed in this or similar fashion the $$2\times2$$ blocks can be kept "colorful" enough to thwart the player. A full proof may require (fittingly) a computer to cover all cases. The $$2\times2$$ block invariant may be good enough to keep the combinatorial explosion at bay and manageable.