How Tetris Randomizers Work (Bag, 7-Bag, Memoryless)

white and black checked pattern

Why does modern Tetris feel fair when NES Tetris felt like a punishment? The difference isn’t your imagination — it’s the randomizer. How Tetris randomizers work has changed dramatically since 1984, and modern Tetris guidelines define a specific algorithm (7-bag) that guarantees you’ll never go more than 12 pieces without seeing every tetromino. Older games had no such guarantee, and the drought between I-pieces could feel infinite.

Key takeaways

  • The randomizer is the algorithm that decides which tetromino comes next.
  • Early Tetris (NES, Game Boy) used memoryless or weakly history-aware RNG with long droughts possible.
  • Modern Tetris guideline games use the 7-bag randomizer: shuffle one of each piece, deal, repeat.
  • Tetris The Grand Master (Arika) uses the “history” randomizer: pull from random, reroll if a recent duplicate.
  • The randomizer determines whether the game feels like skill or like luck.

What a randomizer is

A Tetris randomizer is the function that decides which tetromino piece the player gets next. There are seven tetrominoes (I, O, T, S, Z, L, J), and the randomizer’s job is to return one each time the game asks. Different randomizers have different statistical properties, and those properties shape the game’s feel more than any other single mechanical choice.

The two questions a randomizer answers are how often each piece appears (the distribution) and how the pieces are sequenced (the order). A perfectly uniform memoryless RNG gives each piece probability 1/7 every time, with no memory of what came before. A bag-based randomizer constrains the sequence so droughts can’t happen.

Memoryless RNG (NES Tetris, Game Boy)

The original NES Tetris and Game Boy Tetris used a near-memoryless RNG. Each piece request, the game picks a random tetromino with roughly uniform probability, with a small bias correction in some implementations (the NES version, for example, has a partial reroll if the same piece would come twice in a row).

The result is that piece distributions are uniform in the long run but extremely lumpy in the short run. You can go 20 pieces without seeing an I-piece. Or you can get three I-pieces in five draws. The variance is real, and it’s why competitive NES Tetris is partly a luck contest at the highest levels — the player who got the I-piece on level 29 has a structural advantage.

This isn’t a bug. It’s exactly what a memoryless RNG produces. The expected wait between I-pieces is 7 draws, but the variance is high, and the distribution has a long tail.

The 7-bag randomizer (modern standard)

Modern Tetris — Tetris Effect, Puyo Puyo Tetris, Tetris 99, the mobile Tetris app, and any game following the Tetris Guideline — uses the 7-bag randomizer. The algorithm is simple: put one of each tetromino into a bag, shuffle the bag, deal them out in order, then refill and shuffle again.

The result is a strong guarantee: you will never wait more than 12 pieces for any specific tetromino. The maximum drought between two I-pieces is 13 pieces minus 1 minus 1 = 12 pieces apart (one I at the start of one bag, the other I at the end of the next). On average, an I-piece arrives every 7 draws, same as memoryless. The mean is the same; the variance is dramatically lower.

This makes modern Tetris feel skill-based. You can rely on getting an I-piece for line clears within a predictable window. Strategies that depend on long-term piece flow (like Tetris-stack setups for back-to-back clears) become viable.

Random Generator and the history randomizer (TGM)

Tetris The Grand Master series (Arika, starting 1998) uses the “history” randomizer. The algorithm: pick a random piece. If it matches any of the last 4 pieces drawn, reroll, up to a maximum number of attempts (typically 4 to 6). If still a duplicate after the reroll limit, accept it anyway.

This produces a distribution that’s not quite uniform — pieces are still equally likely in the long run, but the short-term sequence has fewer immediate repeats than memoryless. Droughts can still happen but are noticeably less frequent than NES Tetris. The TGM history randomizer was a major design innovation for its time and held the line until 7-bag became standard.

Tetris The Grand Master 3: Terror-Instinct introduced an enhanced version of the history randomizer with a larger history window and tighter constraints. Players have measured it extensively; the implementation specifics are documented in the TGM community.

NES rerolls and “drought RNG”

NES Tetris is famous for its “drought” mechanic — long stretches without an I-piece — that have been measured by competitive players. The game’s RNG isn’t memoryless in the strict sense; it has a one-piece lookback that rerolls duplicates once. But that’s the only constraint, so longer-distance droughts are statistically common.

Players have computed the exact drought distributions for NES Tetris. The 99th percentile drought between I-pieces is around 30 to 40 pieces. That number matters because at level 19+, an I-piece drought can mean the death of a run. NES Tetris’s high-level meta is partly about managing those droughts — choosing piece placements that survive long droughts and capitalize on the rare double-I cluster.

How the bag shuffle works

The 7-bag implementation typically uses Fisher-Yates shuffle, the standard algorithm for unbiased array shuffling. Each piece in the bag has equal probability of being at any position. The shuffle runs once per bag (every 7 pieces).

Implementations sometimes add extras for the first bag. Many games guarantee the first piece isn’t an S or Z (the two tetrominoes that can’t make a flat line with one rotation). This is a player-friendly bias — strict 7-bag would let either start your game with a bad opening. The guideline allows this exception.

Hold and previews

Modern Tetris pairs the randomizer with a preview queue (typically 5 pieces ahead) and a Hold slot (swap out the current piece for one stashed). These features amplify the value of the deterministic-ish randomizer because you can plan around the known future. Five-piece preview plus a hold gives you 6 known piece slots to work with at any time — enormous strategic depth compared to no-preview NES Tetris.

The preview queue is fundamentally a UX exposure of the randomizer. The game’s underlying piece sequence is generated up front (or in chunks); the preview just shows it to you in advance.

Less common randomizers

Some Tetris variants and clones use other algorithms:

  • Bag with replacement / pure bag: rarely used because variance is too high.
  • 14-bag or larger bag: some indie variants experiment with longer bags for different feel.
  • Weighted RNG: some puzzle-style Tetris-like games bias certain pieces for difficulty curves.
  • Custom AI-targeted randomizers: some research games use adversarial randomizers that pick the worst piece for the current board state.

None of these are mainstream. The 7-bag is the standard for any modern Tetris game targeting competitive play or guideline conformance.

Why this matters for the game’s feel

The randomizer is the difference between Tetris feeling like a skill game and Tetris feeling like a slot machine. NES Tetris is a slot machine for the first 19 levels and a skill-with-luck game after. Modern guideline Tetris is a pure skill game where the randomizer is essentially a constraint, not a variable.

This is why the modern Tetris scene supports stratospheric skill levels — players sustain 60+ pieces per minute with predictable piece flow. Under NES rules, that pace would be impossible because the drought RNG would kill runs at random.

For more on how Tetris has changed across releases, see our Tetris versions compared guide.

Source for the algorithms

The 7-bag rule is defined in the official Tetris Guideline maintained by The Tetris Company. The Tetris Wikipedia article covers the broader history and lineage of the randomizer rules in the gameplay section.

Frequently asked questions

What is the 7-bag randomizer in Tetris?

The 7-bag randomizer puts one of each tetromino into a bag, shuffles them, deals them out in order, then repeats with a fresh bag. It guarantees you’ll see all seven pieces every 7 draws and never wait more than 12 pieces for any specific piece.

Did NES Tetris use the 7-bag randomizer?

No. NES Tetris used a near-memoryless RNG with a one-piece lookback (rerolling immediate duplicates once). Long droughts between specific pieces — especially the I-piece — are a documented feature of NES Tetris and matter heavily in competitive play.

What randomizer does Tetris The Grand Master use?

TGM uses the “history” randomizer: pick a random piece, reroll if it matches any of the recent few pieces drawn, up to a reroll limit. The exact history window and reroll count vary across TGM titles, with later games using larger windows and stricter constraints.

Why does modern Tetris feel fairer than older versions?

The randomizer changed. 7-bag in modern guideline games eliminates the long droughts that plagued NES Tetris. Every piece arrives on a predictable cadence, which means your strategy depends on skill rather than waiting for the I-piece to finally show up.

What’s the longest possible drought in 7-bag?

12 pieces. The worst case is a piece at the start of one bag followed by the same piece at the end of the next bag — 7 + 6 = 13 piece slots apart, which means 12 pieces between them. No drought longer than that is possible in pure 7-bag.

The takeaway

The randomizer is the hidden engine of Tetris’s feel. Memoryless RNG gives you variance and drama; 7-bag gives you predictable flow; TGM’s history rules sit in between. Modern competitive Tetris is built on 7-bag, and that single algorithmic choice is responsible for the skill ceiling we see today. For a different kind of one-button challenge with no piece queues, the Chrome Dino game sits at the top of this site.