Upstacking

Upstack refers to the pieces dropped onto the playfield. Upstacking refers to "stacking up" pieces to score larger line clears, usually a Tetris. Aim to keep the stack open to multiple placement choices, since you won't always get the right piece.

Note: I have ignored holding and soft dropping for this article. Their use can make some ideas difficult to explain.

When pieces don't fit, you have to create holes and gaps. When you can't clear lines because of the holes, you must stack even higher. This ultimately leads to topping out. Build so that there is a good spot for any piece. Even better, build surfaces that will also maintain goods spots for any piece after receiving any piece.

Good and bad surfaces

The left surface below has no place for S-, Z-, T-, and O-pieces. The middle has no place for O-, L-, or J-pieces. The right has no place for S- and Z- places. 

By having bumps and flat areas, you can accommodate all pieces. The O-piece below needs a flat surface.

✕ 

✓ 


✕ 

✓ 


✕ 

✓ 

Creating options for S- and Z-pieces

The S- and Z-pieces need bumps and notches.

✕ 

✓ 


✕ 

✓ 

Keep a spot for both the S- and Z-pieces.



✕ 

✓ 


✕ 

✓ 


✕ 

✓ 


✕ 

✓ 


✕ 

✓ 

Smoothing things out

Aim for smooth surfaces with only enough bumps to allow for potential S- and Z-pieces.






✕ 

✓ 


✕ 

✓ 


✕ 

✓ 


✕ 

✓ 


✕ 

✓ 

Surface connectivity

Well-connected surfaces do the best job of accepting a variety of pieces. Towers and wells result in islands. You lose placements around the edges of the islands.



Deep wells also create islands and cause you to depend on certain pieces.


These islands have a slippery slope effect. Poor placement options lead to worse ones.



Connect islands together.

✕ 

✓ 


✕ 

✓ 

If you must create a tower or well, keep it off to side.

✕ 

Notice the I-piece in the below example now connects to the center island and creates more total placement options as a result.

✓ 


✕ 

✓ 

Note: as the above example is less intuitive, here's a closer look.

Avoid unnecessary 2-high surfaces.




✕ 

✓ 


✕ 

✓ 


✕ 

✓ 


✕ 

✓ 


✕ 

✓ 


✕ 

✓ 


✕ 

✓ 


✕ 

✓ 


When forced into 2-deep surfaces, move them to the sides.

✕ 

✓ 


In the below example, the Z-piece connects the left well to the left island. This creates a new option for the L-piece.



With ten columns, you can measure the difference in heights between their nine intersections. Low values suggests more connectivity.



Bringing high edges to the sides of the surface disconnects only one direction of the raised column. A high surface in the middle disconnects from both directions. Raise up surfaces against the side wall instead of in the middle.





✕ 

✓ 


✕ 

✓ 


✕ 

✓ 

Below, placing the I-piece on the right blocks the S-piece.

✕ 

✓ 

The comparison shown below explains how connected surfaces create more choices. To find a column's adjacent height difference (AHD), subtract the left column's height from its right.

AHD = (∞, 0, -2, 0, 0, 0, 0, 0, 0, 0, -∞)
L = 14
J = 15
O = 8
I = 15
T = 8
S + Z = 0
Total possible placements = 60


AHD = (∞, 0, 0, 0, 2, 0, -2, 0, 0, 0, -∞)
L = 12
J = 12
O = 7
I = 12
T = 6
S + Z = 0
Total possible placements = 49

Less pieces fit where AHD is "2" and "-2." Of course, AHD alone can't say whether a surface is good. We must also consider the quality of choices that open up. For example, surfaces with AHDs of 1 and -1 work well for S, Z, and T. Splitting surfaces reduces those choices in the same way it does for flat surfaces.

Prioritizing lower placements

Stack so that lower areas "catch up" to higher areas.



Avoid further disconnecting already high towers and deep wells.

✕ 

✓ 

Use previews to find the most flattening outcome.

✕ 

✓ 

The jagged corner

Avoid this jagged shape against the side.

✕ 

✓ 

Make sure you have a T-, Z-, or I-piece coming soon. The shape effectively blocks three columns in their absence.



The jagged shape is usually not worse than towers, wells, or piece dependencies. But exercise caution. Unless you resolve the shape, you risk creating a 3-high edge.



The Z-piece variation creates an uncomfortably bumpy surface right up against the edge.



Using another Z-piece only perpetuates the shape. Due to its self-replicating nature, it is similar to a T- or I-piece dependency.



Stacking next to it can bring us back to the initial problem again.



Resolve the shape early instead of wasting the I- or T-piece elsewhere.



If you can't resolve the shape, open it up by creating flatness to the side.



Notches in the center create more choices than those against the sides.





Avoid the "side notch" when you can.


Handling S- and Z-pieces

The S- and Z-pieces are unique in that you cannot place them on a completely flat surface without creating a gap.

The 2-wide 1-deep well is one of the stablest surfaces for S- and Z-pieces. It conserves future choices.







T-piece indentations cater well to both S- and Z-pieces. Pay attention to the order of which the pieces come to prevent overly raised surfaces.

✕ 

✓ 


✕ 

✓ 

Maintain spots for both S- and Z-pieces.

✕ 

✓ 


✕ 

✓ 

Ideally we will have spots for both horizontal choices.

✕ 

✓ 

Horizontal placements sometimes block future placements.

✕ 

✓ 


✕ 

✕ 

✓ 

Having choices for both S- and Z-pieces is usually more important than avoiding dependencies.

✕ 

✓ 

Handling the O-pieces

Avoid 2-high surfaces by fitting O-pieces next to bumps.




✕ 

✓ 

Avoid 2-wide box structures.

✕ 

✓ 

But they sometimes make sense when you see the O-piece coming.

✕ 

✓ 

Handling the L- and J-pieces

Avoid depending on an L- or J-piece.

✕ 

✓ 

✕ 

✓ 

If you must, then prefer having a choice of either.

✕ 

✓ 

In the below example, surface connectivity is more important than creating both L- and J-piece options. This is often true when L- and/or J-piece dependencies hug the sides.

✕ 

✓ 

Below, the first example allows for an L-piece option, but the second example is more stable overall. It gives more choices to place intermediate pieces while waiting for the J-piece.

✕ 

✓ 

If you need to create a 2-deep well, put it near side.






✕ 

✓ 

Prioritize wells in the center opposed to ones lining the sides.



As always, choose the option that secures the stablest outcome.

✕ 

✓ 

When the right piece is coming, a 2-deep well is no big deal.

✕ 

✓ 

Handling I-pieces

When forced into an I-piece dependency, put it to the side.

✕ 

✓ 

Avoid creating extra 2-deep wells with an I-piece.

✕ 

✓ 

Artificial wells give the I-piece a lower spot to sit, promoting flatness.

✕ 

✓ 


✕ 

✓ 


✕ 

✓ 

Avoid using an I-piece on the surface when you can clear it just as easily. You never know when you will get your next one. But when the stack is not stable, use the I-piece to fix it. Do this when there is no risk of topping out.

✕ 

✓ 


✕ 

✓ 

Surviving by clearing lines is obviously more important sometimes.

Handling T-pieces

The T-piece flattens bumpy surfaces very naturally.

✕ 

✓ 

But don't overly flatten.

✕ 

✓ 


✕ 

✓ 

Create the correct "steps" needed for either of the S- or Z-pieces.

✕ 

✓ 





✕ 

✓ 

Raise up single-cell dips on the edges.





Parity

T-pieces have a unique property. When checkered, the pieces have two dark and two light squares. The T-piece is the exception, and contains an odd number.



A Perfect Clear Tetris is only possible with an even number of T-pieces, or none at all.





Below, two T-pieces sit directly next to one another. After checkering them, they create even parity of four gray and four purple cells.


The two T-pieces' centers remain an odd number of cells apart.





Placing them where their center is an even number of cells apart results in six gray and two purple cells. This is the "castle top" surface. Seasoned players intuitively maintain even parity because they know this surface causes problems.



Bumpiness is the hallmark of uneven parity.





It stands to reason that only the T-piece is able to resolve certain shapes. In the below example, there are more dark checkers than light ones.



Any combination of pieces lacking the T-piece will fail to fully resolve the bumpiness.





Notice how there is one more dark checker than light checker in this example. A T-piece has either three dark checkers and one light checker or vice versa. A correctly placed T-piece will balance them out.


Parity and line clears

You can also flip parity with line clears. A single line clear contains/erases 5 dark cells and 5 light squares. Say that you have 3 dark and 1 light cell above the line and 3 light and 1 dark below the line. Clearing the line will bring the top cells down one row, flipping their dark/light status. This results in 6 light and 2 dark cells total, changing the parity balance.

There are two reasons why this happens:

  • An odd number of line clears will bring the filled cells above it an odd number of rows down, flipping their checker colors.
  • There are an odd number of filled cells above the line clear. If instead you had an even number of filled cells above, then it would flip all the checkers but result in no net change. (In games without garbage lines, having an odd number of filled cells above a line clear implies that there is also an odd number below the line clear. This is true because each piece adds four cells and a line removes ten, so there must always be a total even number of filled cells on the board.)
This may explain why I sometimes hear the advice of stacking a T-piece vertically. For example, say you have a 2-wide well, and you place a T-piece in it vertically, clearing only its middle row. Normally the T-piece would change the board's parity. But placing the T-piece vertically forces an empty cell below the line clear, and it adds one filled cell above and below the line clear. In many cases, this will fulfill the requirement of having an odd number of filled cells above and below an odd number of line clears. This can undo the parity change that the T-piece would normally create. Note that if there is already an odd number of filled cells above and below the line clear, the vertical T-piece would instead create an even number. In that case, there would be no cancelling effect.

Trade-offs

As shown throughout this article, there are many different "problem" patterns. For example,
  • 1-column wide "wells," causing L-, J-, and I-dependencies.
  • Surfaces that don't allow for both S- and Z-pieces, or only allow for both if it means receiving one piece will close off the other.
  • Bumpy surfaces that don't leave enough flatness for O-, J-, and L-pieces.
  • Bumpy surfaces that require a T-piece or a line clear to correct a parity imbalance.
  • Holes
  • Dangerously high stacks
As a beginner, I would greedily avoid these problems at the first opportunity. By avoiding one "problem pattern," another would pop up. You can't put a band-aid on some underlying, more deeply-rooted problems

Instead, consider taking the "less bad" pattern now opposed to waiting for the inevitable and worse pattern. This requires getting a sense of when there is a problem with the stack that has not yet emerged in an obvious way. You may need to take a temporary hole, or more often than not, allow a J- or L-piece dependency off to the side of the surface in order to escape a worse fate down the line.

Diagrams made with tage.

Popular posts from this blog

Downstacking

Building a Rating System for Competitive NES Tetris