Playing forever

From TetrisWiki
Revision as of 13:10, 27 January 2020 by Simonlc (talk | contribs) (Reverted edits by 666 (talk) to last revision by Simonlc)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
A 140-tetromino run of this strategy.

The following outlines a method of playing forever given the following conditions, which apply in many Tetris products since 2001:

Standard procedure

The 10x56 cell tiling that this method creates

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.

 Z   I
ZZS  ILOOJ
ZTSS ILOOJ
TTTS ILLJJ


The S, T, and Z piece loop

STTT
SSTZ
SSZZ
SSZZ
TSZZ
TTZT
TZTT
ZZST
ZZSS
ZZSS
ZTSS
TTTS

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:

 Z
ZZS
ZTSS
TTTS
GGGG


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

   T
 ZTT
ZZST
ZGSS
GGGS

Option 1

T
TT
TZ
ZZS
ZGSS
GGGS

Option 2

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

S
SS Z
TSZZ
TTZG
TGGG
GGGG

Option 1 (needs
T before S)

S
SS Z
GSZZ
GGZT
GGTT
GGGT

Option 2 (needs
T before Z)

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

STTT
SSTZ
GSZZ
GGZG


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. At least 5 previews are required to choose the appropriate construction. Alternatively, it is possible to use 3 previews and clever use of Hold (that does not conflict with the STZ loop's Hold needs) to choose an approriate construction using some advanced techniques.

O first (OJL, OLJ):

      JJLL
      JOOL
      JOOL

O last (JLO, LJO):

      LOOJ
      LOOJ
      LLJJ

JOL: (mirror for LOJ)

      JJ
      J
      J

Drop J

      JJ
      J OO
      J OO

Soft-drop O

      JJ
      JOO
      JOO

Slide O

      JJLL
      JOOL
      JOOL

Drop L

Advanced techniques for when only 3 previews are available

Worst case bag distributions such as H?XX?X? and H?XXX?? deserve a special mention. The first piece 'H' denotes a piece which must be placed in Hold in order to follow the STZ loop procedure. Pieces from the LJO loop are denoted by '?', and the remaining pieces are denoted by 'X'. Using 3 previews and Hold, it is only possible to see the first 4 pieces of the bag before the second piece enters the screen. This means you only see H?XX, and only know the first piece of the LJO loop. Because H must be put in Hold, you are forced to make a decision without knowing the order of the rest of the LJO loop. If the O comes first, you can follow the procedure above without problems. The rest of the time you will run into complications like this:

Impossible O placement (eg. HLXXJXO, HLXXXJO):

      JJLL
      J  L
      J  L

Impossible J placement (eg. HLXXOXJ, HLXXXOJ):

      LOO
      LOO
      LL


When L or J come first it is impossible to determine which LJO pattern to use without knowing the order of the final 2 pieces. The solution to this problem is to wait until the first L or J piece enters the screen before making a decision. With the held piece, active piece, and 3 previews, you now see 5 pieces into the bag. This allows you to tell the LJO piece order for the case of H?XX?X?. However, in the case of H?XXX?? the order remains unknown. With this final worst case, the STZ loop is guaranteed to be finished before the second and third pieces of the LJO loop are dealt. This means Hold is available! You can start building whichever pattern you prefer, and use Hold to change the order of the final 2 pieces as necessary.

Tricky starts when only 3 previews are available

There is a worst case start that only complicates the very first bag when playing forever. With a sequence such as ?HXX?X? you can see a maximum of 4 pieces into the bag as you place the first piece. It is impossible to Hold the first piece (part of LJO) because the second piece (part of SZT) must be held. Additionally, because the second last piece is also part of the STZ loop, Hold cannot be used to change the order of the the final 2 LJO pieces as discussed above. So a decision must be made with only the first 4 pieces of the bag known. In this case, the solution is to note that the STZ pattern in the previous section requires the Z to be placed last. However, the mirror STZ pattern is equally feasible, and would require the S to be placed last. Because you have these 2 options, it is impossible that the first piece dealt for the STZ loop is required to be placed last. The worst case is now ?SZX?X?, which can be expressed as ?XHX?X?. By holding the first piece, placing the second, and holding the third, you can now see the first 6 pieces of the bag. This then allows you to choose an appropriate LJO pattern.

It should be noted that this affects only the very first bag of playing forever, which is not to be confused with the first bag of every 20-bag loop of playing forever. On subsequent loops, the first piece of the first bag is already in Hold. You can see the first 5 pieces of ?HXX?X? after you put H on Hold, which makes the first piece active, and sums to 5 with the 3 previews. It is only a problem for the first bag of the game because the player is restricted to a maximum of one use of Hold before placing a piece.

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.

    I
    I
    I
    I
    GI
    GI
    GI
    GI

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.

STTT  LOOJ
SSTZ  LOOJ
SSZZ  LLJJ
SSZZ  JJLL
TSZZIIJOOL
TTZTIIJOOL
TZTTIILOOJ
ZZSTIILOOJ
ZZSSIILLJJ
ZZSSIILOOJ
ZTSSIILOOJ
TTTSIILLJJ

The rows stacked
after 4 bags.

STTT  LOOJ
SSTZ  LOOJ
SSZZ  LLJJ
SSZZ  JJLL
----------
----------
----------
----------
----------
----------
----------
----------

Though of course,
lines have cleared.

STTT  LOOJ
SSTZ  LOOJ
SSZZ  LLJJ
SSZZ  JJLL

Leaving us with a
surplus.

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.

        L
      OOL
      OOLL
      OOLL
      OOGL
      GGGL
      GGGG

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:

GGGG  GGGG
GGGG IGGGG
GGGG IGGGG
GGGG IGGGG
GGGG IGGGG
GGGG JGGGG
GGGG JGGGG
GGGGJJGGGG
GGGGJJGGGG
GGGGJGGGGG
GGGGJGGGGG
GGGGIGGGGG
GGGGIGGGGG
GGGGIGGGGG
GGGGIGGGGG
GGGGGGGGGG

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:

GGGG  GGGG
GGGG JGGGG
GGGG JGGGG
GGGGJJGGGG
GGGG IGGGG
GGGG IGGGG
GGGG IGGGG
GGGG IGGGG
GGGG  GGGG
GGGG JGGGG
GGGG JGGGG
----------
GGGG IGGGG
GGGG IGGGG
GGGG IGGGG
GGGG IGGGG
GGGGJJGGGG
GGGGJJGGGG
GGGGJJGGGG
GGGG IGGGG
GGGG IGGGG
GGGG IGGGG
GGGG IGGGG
----------
----------
----------
GGGG IGGGG
GGGG IGGGG
GGGG IGGGG
GGGG IGGGG

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.

GGGG  GGGG
GGGG  GGGG
GGGG  GGGG
GGGG  GGGG
GGGG  GGGG
GGGG  GGGG
GGGG  GGGG
GGGG  GGGG
GGGG  GGGG
GGGG  GGGG
GGGG  GGGG
GGGG  GGGG

The net result of
12 bags stacked
the standard way.

STTT
SSTZ
SSZZ
SSZZ
TSZZ  OOLL
TTZT  OOLL
TZTT  OOLL
ZZST  OOLL
ZZSSJJOOLL
ZZSSJIOOLL
ZTSSJIOOLL
TTTSIIOOLL
GGGGIIGGGG
GGGGIJGGGG
GGGGIJGGGG
GGGGJJGGGG
GGGGJJGGGG
GGGGJIGGGG
GGGGJIGGGG
GGGGIIGGGG
GGGGIIGGGG
GGGGIJGGGG
GGGGIJGGGG
GGGGJJGGGG

The rows stacked
after 4 bags of
balanced stacking.

STTT
SSTZ
SSZZ
SSZZ
TSZZ  OOLL
TTZT  OOLL
TZTT  OOLL
ZZST  OOLL
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------

Of course,
line clears
have actually...

STTT
SSTZ
SSZZ
SSZZ
TSZZ  OOLL
TTZT  OOLL
TZTT  OOLL
ZZST  OOLL

...kept things
realistically short.

GGGG
GGGG
GGGG
GGGG
GGGG  GGGG
GGGG  GGGG
GGGG  GGGG
GGGG  GGGG

Where we left off.

OOLLJJTTTZ
OOLLJISTZZ
OOLLJISSZZ
OOLLIISSZZ
OOLLIISSZT
OOLLIJTSTT
OOLLIJTTST
OOLLJJTZSS
GGGGJJZZSS
GGGGJIZZSS
GGGGJIZZTS
GGGGIIZTTT
GGGGIIGGGG
GGGGIJGGGG
GGGGIJGGGG
GGGGJJGGGG

4 bags balancing
the other side.

----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------

Back to
square one.

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.

     I
     I
     I
     I
    JJ
  G JG
GGG JG   G
GGGG GG GG
GGGG GGGGG
GGGG GGGGG
GGGG GGGGG
GGGGGGGGGG

Stack the I on
top of the J.

     I
     I
     I
     I
OOLLJJTTTZ
OOGLJGSTZZ
GGGLJGSSZG
GGGG GGSGG
GGGG GGGGG
GGGG GGGGG
GGGG GGGGG
GGGGGGGGGG

Play the
remainder.

     I
     I
     I
     I
----------
----------
----------
GGGG GGSGG
GGGG GGGGG
GGGG GGGGG
GGGG GGGGG
----------
     I
     I
     I
     I
GGGG GGSGG
GGGG GGGGG
GGGG GGGGG
GGGG GGGGG

The end of the
20-bag loop.

But after the first bag of the next loop, we're exactly where we expect to be:

     G
     G
     G
     G
GGGG GGGGG
GGGG GGGGG
GGGG GGGGG
GGGG GGGGG
 Z   G
ZZS  GJJLL
ZTSS GJOOL
TTTS GJOOL
GGGGIGGGGG
GGGGIGGGGG
GGGGIGGGGG
GGGGIGGGGG
 Z   G
ZZS  GJJLL
ZTSS GJOOL
TTTS GJOOL
----------
----------
----------
----------
 Z   G
ZZS  GJJLL
ZTSS GJOOL
TTTS GJOOL


5 Bag Solution

A shorter but far more complicated algorithm for Playing Forever in 5 bags was discovered by QM in 2014. It requires 4 piece previews to guarantee success.

This is the minimum possible Playing Forever loop, as a Perfect Clear must use 35 pieces (as the well is 10x10). To avoid parity issues with 5 T pieces, the Bag 2 T is used to clear a single and skim.

First Bag

Build this structure whenever possible.

 Z  IIII
ZZS JJLL
ZTSSJOOL
TTTSJOOL

If necessary, the JILO square can be built in a different order as long as it remains a 4x4 square.

If this structure was impossible (this is rare), place the I to the right.

 Z       I
ZZS JJLL I
ZTSSJOOL I
TTTSJOOL I

Second Bag

The second bag is built differently based on whether the JILO square was completed successfully or not. In either case, the J, L, O, S, and Z pieces are placed identically, like this:

    LOOJ
 Z  LOOJ
ZZS LLJJ
ZZSSIIII
ZZSSJJLL
ZTSSJOOL
TTTSJOOL

Again, the J, L, and O can be flipped if necessary.

The I and T pieces will be placed differently based on the completion of the JILO square in Bag 1.

Case A: The JILO square in Bag 1 was completed.

The T and I pieces should be used to line clear, in this order:

    LOOJ
 Z  LOOJ
ZZS LLJJ
ZZSSIIII
ZZSSJJLLT
ZTSSJOOLTT
TTTSJOOLT


    LOOJ
 Z  LOOJ
ZZS LLJJ I
ZZSSIIII I
ZZSSJJLLTI
TTTSJOOLTI


Leaving the end result of the second bag as this:

    LOOJ
 Z  LOOJ
ZZS LLJJ I
ZZSSIIII I


The T and I pieces can be placed at any time as long as Hold is used to ensure that the T is placed before the I.

Case B: The I piece in Bag 1 was placed to the right.

The I piece should be placed first using Hold to perform a Tetris line clear.

 Z  LOOJ
ZZS LOOJ
ZZSSLLJJII
ZZSSJJLLII
ZTSSJOOLII
TTTSJOOLII


Then, the T piece should be placed in one of these two ways, dependent on the order of Bag 3:

T facing to the left

         T
 Z  LOOJTT
ZZS LOOJ T


T facing to the right

        T
 Z  LOOJTT
ZZS LOOJT


The T and I pieces can be placed at any time as long as Hold is used to ensure that the I is placed before the T.

Determining the direction of the T

With Hold and 4 piece previews, you can see the first 5 pieces of the third bag when placing the T. Based on the order of STZ in the third bag, decide which direction the T should be placed in using the first rule that applies:

1) If TZ comes first in {STZ}, the first two pieces of {IJLO} are OI, and Z comes before I, place facing left.

2) If T comes first, place facing right.

3) If Z comes first, place facing left.

4) If S comes first and is the only STZ piece in all 5 visible pieces, place facing right.

5) If S comes first and T comes second, place facing right.

6) If none of the previous rules apply, place facing left.

Bag 3

This bag is highly situational based on the order of the pieces.

Case A: The JILO square in Bag 1 was successfully completed.

If this is the case, place the pieces like this. Make sure to use Hold on Z to be sure it is possible.

    JJLL
ZZ  JOOL
TZZ JOOL
TTS GGGGI
TGSSGGGGI
GGGSGGGGIG
GGGGGGGGIG


Case B: The JILO square in Bag 1 was not successfully completed.

If this is the case, the S, T, and Z pieces should be placed in one of these two ways:

ZZ
TZZ
TTS     T
TGSSGGGGTT
GGGSGGGGT
T
TT
TZ
ZZS      T
ZGSSGGGGTT
GGGSGGGG T


Decide which one to build based on the T placement from Bag 2.

The I, J, L, and O pieces should be assembled to form a 4x4 square. Note that based on the order, this square can be assembled in whatever arrangement is necessary, including sideways, as long as it forms a square. These are just a few examples of how it could be built.

    JJLL
ZZ  JOOL
TZZ JOOL
TTS IIIIG
TGSSGGGGGG
GGGSGGGGG
    IIII
ZZ  JOOL
TZZ JOOL
TTS JJLLG
TGSSGGGGGG
GGGSGGGGG
    IJJJ
ZZ  IJOO
TZZ ILOO
TTS ILLLG
TGSSGGGGGG
GGGSGGGGG


This can be done without hold unless the order is OIJL or OILJ. In these cases Hold should be used either to modify the piece order to IO{JL} or to O{JL}I. Decide which of these is necessary based on when in the bag Hold is used for the S, T, and Z pieces. This will rarely happen, though.

Bag 4

The I, J, L, and O pieces in Bag 4 are placed into the holes left from the previous bags.

JJJIGGGGOO
GGJIGGGGOO
GGGIGGGGLL
GGGIGGGGGL
GGGGGGGGGL
GLLIGGGGOO
GGLIGGGGOO
GGLIGGGGJJ
GGGIGGGGJG
GGGGGGGGJG


Occasionally, the O piece may be placed in before the J or L on the corresponding side, as long as the I and J/L piece are already in.

In some cases, an I-spin may be necessary if the I shows up late in the sequence.

Placing the S, T, and Z

The first of S/Z and T should be placed like this:

    T
    TT
    TSS
    SS
     T
    TT
   ZZT
    ZZ


The last S/Z piece should be held to the end. 5 pieces of Bag 5 can then be seen in Hold + 4 piece previews. If T comes first in Bag 5's S, T, and Z, then place the S/Z piece like this:

    T
    TT
    TSSZZ
    SS  ZZ
     T
    TT
 SSZZT
SS  ZZ


If S or Z come first in Bag 5's S, T, and Z, place the S/Z piece like this:

    TZZ
    TTZZ
    TSS
    SS
   SST
  SSTT
   ZZT
    ZZ


Bag 5

The T piece and one of the S/Z pieces are placed like this:

    TZZ  T
    TTZZTT
    TSSZZT
    SS  ZZ

The other STZ piece is held until the end.

The 4x4 square on the side is filled with the I, J, L, and O pieces (This can be done in any way as long as the area is filled)

IIIITZZ  T
JJLLTTZZTT
JOOLTSSZZT
JOOLSS  ZZ
IIIITZZ  T
JOOLSS  ZZ


The final piece is placed in with an S/Z spin.

IIIITZZSST
JOOLSSSSZZ


Open questions

Adapting this method to the following situations is left as an exercise for the reader:


See also

  • ST stacking, a method of making back-to-back T-spin doubles

External links