Tetris Analysis ft. Tetrisfish

Tetris Analysis ft. Tetrisfish

by Javantea July 10, 2022

Tetrisfish-javantea

I’m playing a lot of NES Tetris recently and I won my first match. What happened? Well, I played well and my strategy turned out to work in this case. I learned about Tetrisfish, which uses the tetris engine StackRabbit to analyze games from video and I ran it on the first game. Since it was fairly slow and didn’t give me anything but tips on how to improve my stacking (thanks by the way), I wrote a simple modification to make it possible to avoid those analysis calls. Instead with my version, I can just output a file that showed what happened during the game: piece sequence, drought for each piece, and tetris rate. Tetris rate ignores pushdown points so the value is not accurate to the actual score, but is good enough since most games are won on scoring points with lines not pushdown.

I’m sure you’re curious what the output looks like for my 5 games:

Game 1

JLTTIOZTOZILSLIJOTTOLTLIIZTLIOSZTSLISOIIIZJZOZJSOIZTZLZOJTIOZOJIOZTZJOSOZTOIJOJSZISJLZSLJZIJZSTOSIJTJTLLTTSTISZOSZIJTJIOILTTITSTITOJOTSIOJIOZLOTOZSJOSJOZISOLISTIOTTIOSTITITSOZLILJSOSZLTSOJOJSLTLJJTISLOJISSTSOOIJTISSZLJIOOILZOJSZJZSIZSTZJSJTJITJZTLILJLIJLIZTISZSLIOLZOLOSOLOSOSOIISTSTLJTSITSLITJLJLOJZLS
Drought durations: max [sequence]
L-PIECE 30 [1, 9, 1, 6, 1, 4, 6, 18, 30, 2, 14, 0, 17, 19, 14, 18, 1, 5, 7, 1, 5, 16, 5, 23, 1, 1, 2, 7, 2, 2, 3, 11, 6, 3, 1, 3]
J-PIECE 31 [0, 14, 26, 3, 9, 5, 5, 7, 1, 4, 4, 2, 6, 1, 14, 1, 13, 5, 9, 2, 27, 8, 1, 4, 0, 5, 8, 6, 7, 2, 7, 1, 1, 2, 5, 2, 31, 8, 1, 2]
S-PIECE 22 [12, 17, 2, 2, 10, 22, 8, 2, 3, 6, 2, 9, 2, 2, 13, 7, 11, 2, 4, 3, 7, 5, 6, 1, 3, 4, 7, 4, 0, 1, 6, 0, 11, 3, 2, 3, 20, 1, 8, 3, 1, 3, 1, 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, 4, 6, 3, 1, 11, 13, 2, 9, 6, 6, 2, 2, 1, 8]
Clears:
[1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 2, 4, 2, 1, 4, 1, 1, 4, 1, 2, 2, 3, 2, 1, 1, 1, 1, 4, 1, 2, 1, 1, 2, 4, 2, 1, 1, 1, 2, 4, 1, 4, 4, 1, 1, 4, 1, 1, 2, 4, 1, 2, 1, 1, 4, 1, 1, 1, 1]
TRT: 84% 231600 / 277280
12 tetrises, 1 triples, 11 doubles, 36 singles

Game 3

TOJSISTJIOLTZOZOITSZZIOIZSJITZOIOLSZSTZJLSTOTLSZTTJSTLZSOJOLOZTIJZISJLJ
Drought durations: max [sequence]
L-PIECE 22 [10, 22, 6, 4, 7, 5, 9]
J-PIECE 18 [2, 4, 18, 12, 10, 6, 6, 3, 1]
S-PIECE 12 [3, 1, 12, 6, 8, 1, 4, 4, 4, 3, 11]
Z-PIECE 12 [12, 1, 4, 0, 3, 4, 5, 2, 8, 6, 6, 3]
T-PIECE 10 [0, 5, 4, 5, 10, 8, 4, 1, 3, 0, 2, 9]
LONGBAR 31 [4, 3, 7, 4, 1, 3, 3, 31, 2]
O-PIECE 12 [1, 7, 3, 1, 6, 7, 1, 10, 12, 1, 1]
Clears:
[4, 1, 4, 1, 1, 2, 1, 4, 2, 4]
TRT: 93% 62400 / 67080
4 tetrises, 0 triples, 2 doubles, 4 singles

Game 4

JLTLTJOZTIJIOJTZTLTLIZJZITZJLZZOTZJSZIOSIOSLIJLSTSISOSTJIOJZILSTSITLJZIZOTOZLITSOLTLLIOIJTOSITOJLJTOILIJIZLLJTTSISJOZOISLJITZLOIOSTLSLOZIZJISLZJSLTOOLZJZITLZIJOSOZJZSZOJTLZOTLTZLOJOLTISZLSITJOJTLTSSOLJLZLZTOZSTZTSZSOSZLJZJZIOITOJOTOZJSISZIJZLZTSZOZTOTLIOZTIZIOZLOZISJOSTIOTLSISLSOSIOLJZOJLOIIJIOTISZTSSJOSTIJTOLTLISTOZ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, 5, 3, 4, 8, 2, 13, 3, 25, 4, 34, 1, 9, 2, 13, 3, 1, 5, 5, 4, 5, 8, 0, 1, 2, 9, 6, 8, 10, 2, 9, 0, 13, 8]
O-PIECE 23 [6, 5, 18, 6, 2, 10, 4, 14, 1, 5, 5, 3, 3, 4, 15, 1, 8, 1, 5, 12, 0, 10, 1, 5, 4, 5, 1, 10, 6, 7, 8, 8, 2, 1, 1, 14, 2, 3, 5, 2, 4, 3, 7, 2, 3, 2, 4, 8, 5, 6, 2, 10, 23, 12, 3, 1, 10]
Clears:
[4, 2, 2, 1, 1, 1, 1, 4, 1, 1, 1, 1, 2, 4, 2, 1, 1, 1, 1, 1, 1, 4, 4, 1, 1, 2, 1, 4, 4, 4, 1, 1, 2, 3, 4, 4, 2, 3, 4, 4, 2, 4, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 1, 4, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
TRT: 79% 271200 / 345280
14 tetrises, 3 triples, 12 doubles, 55 singles

Game 5

TITLISTZOILZSTSISOLJTSLOZTZSOIOOZLIOTILJTLIZJIOJZTLZSSZISLSZSJIJLZLOJZJIJLISLTOSJOTSLJISLZLZLTTJLZTSJTTSLIJSTJOTOZJTSTOTSOSTSITZISZTJSIOSTOZIJIOIJITILZOSIOJTSISZZSJOTITIZJOTJOTLZLILTOJLJTZOOSJLZSITSIJLTZTOIOIJSITZILISZILJSTIOIOTOLJJTZSOTOJIOISTZTI
Drought durations: max [sequence]
L-PIECE 44 [3, 6, 7, 3, 10, 4, 2, 8, 6, 6, 1, 6, 2, 7, 3, 1, 1, 3, 7, 44, 26, 1, 1, 3, 7, 7, 13, 4, 9]
J-PIECE 19 [19, 19, 4, 2, 13, 1, 4, 1, 1, 7, 4, 9, 4, 5, 2, 4, 17, 8, 3, 9, 7, 6, 2, 9, 1, 5, 7, 8, 11, 9, 0, 6]
S-PIECE 27 [5, 6, 1, 1, 4, 5, 24, 0, 2, 1, 1, 14, 3, 3, 3, 11, 3, 3, 8, 3, 1, 1, 4, 3, 2, 15, 4, 1, 2, 27, 3, 2, 11, 6, 4, 12, 7]
Z-PIECE 19 [7, 3, 12, 1, 5, 10, 4, 2, 2, 4, 5, 3, 19, 1, 5, 15, 13, 2, 8, 10, 9, 0, 7, 7, 9, 5, 8, 9, 4, 15, 10]
T-PIECE 27 [0, 1, 3, 6, 6, 4, 10, 3, 8, 27, 4, 10, 0, 3, 2, 0, 5, 2, 3, 1, 1, 3, 2, 4, 5, 9, 8, 8, 1, 4, 2, 5, 4, 9, 4, 1, 7, 10, 4, 4, 3, 6, 1]
LONGBAR 19 [1, 2, 4, 5, 13, 4, 2, 4, 2, 9, 6, 8, 2, 11, 18, 19, 2, 5, 5, 1, 1, 1, 1, 4, 4, 7, 1, 10, 15, 2, 6, 1, 2, 2, 1, 2, 4, 1, 13, 1, 4]
O-PIECE 28 [8, 8, 5, 4, 1, 0, 3, 10, 20, 10, 2, 28, 1, 5, 2, 13, 2, 4, 7, 2, 9, 6, 2, 7, 5, 0, 14, 1, 17, 1, 1, 6, 1, 2]
Clears:
[4, 1, 3, 1, 1, 2, 3, 1, 1, 2, 1, 4, 4, 1, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 3, 1, 4, 4, 2, 4, 3, 1, 4, 4]
TRT: 84% 187200 / 222820
12 tetrises, 5 triples, 4 doubles, 21 singles

If you’re curious about the analysis that Stackrabbit did on game 1, I have the file and a screenshot.

TetrisFish of Game 1

Scores and lines:

Javantea                 Coal
202173 12-13 108 lines - 250672 12     90 lines
277411 15-16 109 lines - 288600 15-16 104 lines
67216  12     24 lines - 1560   12      3 lines Early top out
345427 15-20 144 lines - 249040 15-18 124 lines
223120 12     92 lines - 117780 12     60 lines Early top out

Permalink

Comments: 0

Leave a reply »

 
  • Leave a Reply
    Your gravatar
    Your Name