Submission #6964: Masterjun's Arcade Tetris the Absolute: The Grand Master 2 Plus "T.A. Death" in 03:20.02

Arcade
T.A. Death
(Submitted: T.A. Death)
(Submitted: tgm2p.zip JPN)
MAME-rr 0.139 v0.1 beta
12001
60
0
Unknown
Submitted by Masterjun on 12/17/2020 4:00 PM
Submission Comments
If you would play Tetris near black hole, you would die.
Welcome to this Tool-Assisted Superplay where gravity is very high yet the blocks still magically float on nothing. Luckily we're not playing Tetris for the realism, but instead for the graphics.

Game objectives

  • Complete the hardest game mode "T.A. Death" by reaching level 999 as fast as possible
  • Get awarded some cool medals on the way
  • Achieve all the Grand Masters

Comments

This run is an improvement of 2.23 seconds or 134 frames over the previous movie. It reaches an in game time of 02:40.40.
In terms of optimization this game is very limited. No hold piece feature or RNG manipulation means you're stuck with a sequence of 725 pieces from the very beginning. I delayed the start to get a sequence which allows me to get the final 6th medal missing from the previous movie without losing frames. My initial run only saved 20 frames, and the next saved 30 frames, so I adjusted my program, tested a few days, and then let it run hours at a time. All in all I'm very pleased with 134 frames of improvement.
I initially started working on this exactly because of the limited placement. It meant that I could reprogram the game myself and then try out some optimization techniques not possible in regular emulators. Most inputs of this run were generated by that program, and then assembled by myself, around 20 pieces at a time. Of course, the limitation rules (e.g. maximum of 4 overhangs) and the overall route were made by me, so this run is definitely not the brute forced best Tetris run that can exist. I also plan to release the reprogrammed game code, so that people planning to improve this submission have the option to work with it as well.

Terminology

Pieces

For easier communication, each of the 7 tetrominoes are assigned their own letter based on their shape. These are I, T, L, J, S, Z, O.

20G

20G means that pieces fall 20 tiles per frame. Since that's basically the height of the entire field, it effectively means pieces drop to the ground immediately. This limits where you can move pieces depending on the field. You usually see people building a peak in the middle where the pieces spawn, so pieces can slide down both ways.
The game mode "T.A. Death" has this enabled from the start until the end.

Level

A level is the current progress. It starts at 0 and increases per line clear and after a piece was placed. However a piece placement will not increase the level counter beyond a section border. They need to be passed with a line clear. So the counter will stop at 099, 199, 299, ..., 799, 899, 998 (<- note the one off), until you clear a line.

Single/Double/Triple/Tetris

These are terms for clearing 1/2/3/4 lines with a single piece.

Game features

Rotation

Rotations are always done first. They are even applied before the gravity in the first frame a piece spawns. You have button A and C to rotate counterclockwise and button B to rotate clockwise. This means counterclockwise rotations can happen every frame, where clockwise ones can only happen every other frame. The game has two checks whether rotations are possible: 1. The basic rotation, 2. Kicked rotations.
The basic rotation is just that. The game tries to rotate and if blocks overlap, it fails.
If the basic rotations fail the game checks so called "kicks" where the piece is not only rotated but also moved in one direction. The game tries to kick to the right and tests if no blocks overlap. If this fails it tries to kick to the left. If this also fails the whole rotation fails.
There are several exceptions and special rules here. The I and O pieces will never kick. The L, J, and T pieces will not kick off their center column if the first overlap block is detected there. Also, the very first frame a block spawns it will try the basic rotation, but never kick.

Movement

You can move to the left and to the right by using the corresponding buttons. Normally you would only be able to move in the same direction every other frame, since you have to release and repress, but this version of Tetris has a so called Delayed Auto Shift or DAS. Once charged up it will move the piece every frame. It can be charged during the time between a piece lock and the next spawn. Important to note is how the DAS counter is 1 byte and can overflow, so it needs to be reset occasionally to avoid sudden movement stops. This run uses placements without movement to reset the counter.
Movement can't happen on the first frame a piece spawns. It also can't be combined with the lock input, so it can't happen on the last frame of a placement.

Lock

Locking is done using the down button. It can't happen on the first frame. It also can't be combined with a movement input. If a row fills up it is removed and rows above will be moved down.

Losing

On the first frame a piece spawns, if blocks overlap (after an optional basic rotation) you lose the game.

Medals

<Medal>

<Requirement for bronze/silver/gold.>

AC (All Clear)

Completely empty the field 1/2/3 times.

ST (Section Time)

Complete a section (100 levels) within 52/45/42 seconds

SK (Skill)

Clear a Tetris 5/10/17 times.

RE (Recovery)

Go from over 149 blocks to under 71 blocks 1/2/4 times.

RO (Rotation)

Surpass 1.2 rotations per piece during levels 0-300/300-700/700-999

CO (Combo)

Clear at least 2 lines 4/5/7 times in a row without a piece not clearing a line at all.

Secret Grade

A Secret Grade GM can be achieved by building a > pattern (right pointing angle bracket) with holes during the credits.

Timings

Line clears usually take a few frames longer than simple piece placements.
LevelPiece placementLine clearFrames lost vs clearing a Tetris:SingleDoubleTripleTetris
0xx1826 6420
1xx1414 0000
2xx1414 0000
3xx814 4.531.50
4xx712 3.752.51.250
5xx+610 3210
Important to note is how in 100-299 you don't lose any time clearing something else than a Tetris.

Techniques

Planning

In terms of Medals, ST (Section Time), SK (Skill), and RO (Rotation) will be gold basically automatically. The other three will be the actual challenge to achieve without losing time.

Route

First I made sure to delay frames at the start to give me a piece sequence where it is possible to completely empty a field twice with a Tetris for the AC (All Clear) medal. I tried for three times, but it seems there are only around 3000 possible seeds at all.
Next, to reach the next section as soon as possible it's important to keep the amount of blocks low when approaching a section change. After all, more line clears mean higher levels and an earlier speedup from the next section.
Once I reached section 100-299, no time will be lost from not clearing 4 lines at once, so this is the perfect time to aim for the CO (Combo) medal. So I built up the field with two empty columns and got a 7 combo of Doubles. Now is also a good time to finish the AC (All Clear) medal, since that's much easier without being restricted to Tetris clears.
Now the only part left was the 4 recoveries for the RE (Recovery) medal. Of course, I also had to make sure to be low on blocks during the section changes, so I could only complete one recovery per section.
At level 574 I was finally done with all the medals and could focus on getting to level 999 as fast as possible.
After level 999 I could finally play around a bit and decided to immediately do another full clear of the field, as this sadly isn't possible simultaneously with reaching level 999 without losing time. The rest was getting the secret grade GM by building the required shape, and making sure to end with perfect timing, as losing would not give you the grade.

Kicking

Since kicking pieces moves them in one direction in addition to the movement, it can be used to save 1 or 2 frames of regular placement. This is the most important optimization technique, where it's sometimes better to allow holes in the field to allow more kicking.

Placement

This chart shows how many frames it takes the pieces on average (without kicks) to reach each of the 10 columns, as well as how fast a piece is against the column average with the greenest color.
You can see how most pieces are left-aligned from the symmetrical O piece. This can also be seen in the rotation diagram. However, the I piece is right aligned, which is the reason the I piece holes are usually on the right side.

Optimizing

Most of my workflow was using my program to brute force piece placements. However, without any overhang or hole rules it's only possible to brute force the next ~5 pieces. But always choosing the fastest placement will quickly lead to losing time later. My program was very useful with generating All Clears, or the secret grade pattern.
The naive strategy of brute forcing the next few pieces, and then choosing the next one piece placement with the most occurrences lead to the initial 20 frames improvement. So then I changed it up and implemented a few weights so I can check more future pieces without brute forcing all of them (I might add more explanation here at a later point). This of course loses the optimality certainty but it also allowed me to complete this run in my lifetime, which was nice.

Special Thanks to

  • Steelix100 for creating the previous run and giving me a very good comparison run.
  • The tetris wiki, which is a very good resource on how these games work.
  • feos and MAMEHawk, as BizHawk has an easier and more intuitive workflow, even if the MAME core isn't perfect yet.

Suggested Screenshot


Memory: claiming for judging
Memory: Optimization is super good here.
The sheer speed of the TAS here makes it extremely fun to watch. The audience whole-heartedly enjoyed the run and I did too.
The fact that the medals are included makes this able to be considered both fastest and full completion. If a run that was faster than this was performed that didn't get all the medals, I admittedly am unsure whether or not it would be able to be considered as a new branch or not since it'd presumably be so similar. My first inclination is no but I am not sure.
Spikestuff: Publishing.
Last Edited by adelikat on 11/5/2023 6:28 PM
Page History Latest diff List referrers