Playing forever

The following outlines a method of playing forever given the following conditions, which apply in many Tetris products since 2001:
 * the Random Generator is used to generate piece sequences
 * the game has the Hold feature
 * at least 4 piece previews are available

Standard procedure


The general method is achieved by dividing the screen into self contained sections as shown below. Specifically, the 4 left columns, the 4 right columns, and the 2 middle columns will be treated as distinct regions, with specific pieces assigned exclusively to each region. Because the random generator provides strings of bags containing each of the 7 pieces in a random order, it is possible to construct a strategy around the relatively small variation, with looping patterns.

S, T, and Z will be placed to the left, L, J, and O will be placed to the right, and I pieces will fill the middle.

The S, T, and Z piece loop
This pattern loops after 4 bags of pieces. Depending on the order of the pieces for each bag, you may need to use Hold to force a piece to come last. Piece previews are technically not required to play this pattern.

The Z piece must drop after T, so use Hold to change the order if necessary:

The T piece must not drop first, so use Hold to change the order if necessary:

The T piece must land diagonally adjacent to the other T, so use Hold to change the order if necessary:

The T piece must drop last, so use Hold to change the order if necessary:

The L, J, and O piece loop
This pattern loops after a single bag of pieces. Depending on the order of the pieces, you will need to use a different construction. If this STZ pile needs the first tetromino of the bag to be held, four previews are required to play this pattern, because in the worst case scenario TLZSIxy, you will need to see four pieces ahead (with L as the active tetromino, you need to see x) in order to determine whether the O piece is coming last. Otherwise, the first L or J tetromino can be held and put into place once its mirror or the O shows up in the preview.

O first (OJL, OLJ):

O last (JLO, LJO):

JOL: (mirror for LOJ) Alternate method for JOL:

The I piece loop
This pattern loops every 2 bags. No use of Hold or piece previews is required. The player must simply alternate putting the I tetromino in columns 5 and 6 to reap tetrises. Notice that the alternate JOL method will work only if the first I tetromino of the loop is placed away from the JLO heap.

Balancing the Stacks
Since the loops have a cycle of 4, 1, and 2 bags respectively, after playing 4 bags they will all be flat. However, the I loop will have only placed 8 rows compared to the 12 rows placed by both the STZ and LJO loops.

In order to offset this balance, it is necessary to change strategy. Continue to do the standard STZ loop, while using the following LO and IJ loops.

The L, O piece loop
This pattern loops after 2 bags of pieces. Order is not important, and therefore neither Hold nor piece previews are strictly required for it.

The I, J piece loop
This pattern loops after 2 bags of pieces. Order is not important, and therefore neither Hold nor piece previews are strictly required for it.

JIIJ:

Because of line clears, the order is not very important. Even if you place pieces in the opposite order than what is shown, the net change in screen geometry will be the same:

Putting it all together
If you play the standard method for 12 bags, the balancing method for 4 bags, and finally the reverse balancing method (with LO on the left and STZ on the right) for 4 bags, then you will clear the entire screen allowing you to start over again and play indefinitely.

The Final Bag
The final bag requires some special consideration. Because the sides are getting low, the J piece will not necessarily clear. So I must come before J in order to follow the pattern. You can't rely on using Hold for this as a worst case scenario (eg. TJIxxxx) would also require you to Hold the T. To deal with this problem, you can follow the procedure below.

As you can see, 4 bags into the next loop and we're exactly where we expect to be:

Open questions
Adapting this method to the following situations is left as an exercise for the reader:
 * All tetris line clears
 * High gravity
 * A shorter loop than 140 pieces
 * No hold piece
 * Fewer previews, as seen in Tetris Worlds for Game Boy Advance and Tetris The Grand Master Ace and Tetris Evolution
 * 14-piece bag randomizer

It should be noted that all solutions will necessarily be a bag-multiple of pieces in length. Also, all loops must produce a net change of 0 after a complete cycle. This means that all solutions must clear as many lines as they stack, which requires pieces in a multiple of 5. Combining these 2 conditions, it can be seen that all solutions will be a multiple of 5 bags.

The STZ pattern loops every 4 bags, so all solutions that use it will necessarily be a multiple of 4-bags. Therefore with current techniques, in addition to the standard conditions above, the minimum loop size is 20 bags. As this is the size of the current solution, more efficient solutions will require a much revised approach.

Work is underway to determine whether a bravo solution in 5 bags is possible, or whether it must be a multiple of 10 bags. See Parity.