Hacker News

My quest to see all of Tetris

63 points by wwilson ago | 15 comments

smalltorch |next [-]

I'm a huge fan of Tetris and have played them all. I think this version is the best one. Not only because of the drama behind it, but two player mode is actually pretty fun.

https://tetris.wiki/Tetris_(NES,_Tengen)

whywhywhywhy |root |parent [-]

Recently got Tetris Grand Master 4 and played it with an arcade stick insanely satisfying to play that way and with that ruleset and kinda ruined other versions/input methods for me.

NauticalStu |root |parent [-]

I grew up in the 80's and have a ton of nostalgia for the Game Boy and NES versions of Tetris. But after getting used to modern variants (TGM, Tetris Effect, Tetris 99, etc.), the old versions feel so clunky and awkward. The controls and randomizers have gone through so many refinements over the decades that lead to much better gameplay IMO.

HelloUsername |next |previous [-]

Related? "After 34 years, someone beat Tetris [video]" 02-jan-2024 https://news.ycombinator.com/item?id=38841080 183 comments

billAntithesis |next |previous [-]

I'm the author. Thanks for the comments.

jdw64 |previous [-]

I was expecting something like DQN, but what I actually saw was a new approach, so it was fascinating. Usually when you're making small AI demos and doing hands-on exercises, you work with Tetris a lot.

In NES Tetris, if the input is the same, the result is the same, so you can store all the inputs and reproduce specific moments. The state becomes like a graph, which allows for fuzzing testing. It's interesting

jaffa2 |root |parent [-]

how doe piece selection work? isnt it random?

PetitPrince |root |parent |next [-]

NES Tetris have memory système that tries to repetition. As per Tetris wiki:

> The randomizer features a slight protection against direct repetition. The first roll generates a value 0-7 and will accept and deal on any value other than the previous piece dealt or the dummy value of 7. The piece history is initially empty. If the first roll fails, it progresses to a second roll that generates a value 0-6 and deals that piece.

Later games would evolve into a more ambitious history system like in Tetris the Grand Master, or a "bag" (Fisher Yates) system.

From a game design point of view, this avoids repetition in the distribution which generally suuuucks while playing.

billAntithesis |root |parent |next |previous [-]

I'm Bill, the author. I think the game randomness is a function of the inputs the game has received. I ran into some things that were interesting w.r.t. randomness. As I mentioned we have this thing called a "tactic" that prepares batches of inputs for what we are testing; in this case, key presses. I made the tactic assume it had a piece ready to drop, and then to randomly choose the piece orientation and the column, using randomness from our fuzzer, and then press DOWN a bunch of times. Later I added a small random chance that the piece would shift over to the left or right on the way down. This greatly increased the speed at which we progressed through levels, which surprised me. I have not run a thorough test of this, but my theory is that the benefit of the piece shift was not in allowing the piece to fit into more spaces, but was more because it tweaked the game RNG and gave the strategy more variations to choose from. Watching the runs I don't see a lot of times when a piece shifts at the last instant to "tuck" into a spot, but I do see pieces shift over on their way down. To a human, starting in column 4 and during the drop shifting to column 3 would seem equivalent to just starting in column 3 in the first place, but it is possible this gives two different RNG states in the game and one turns out being better than the other.

k_boyle |root |parent |next |previous [-]

Seems to be influenced by the pieces on the board. Bill talks about it a little in the article. You do seem to get more | shaped pieces when you leave those spaces open on the board.

chupasaurus |root |parent |next [-]

Nope, piece selection in the unmodified NEStris uses only the player input to generate pieces and it also starts from the same seed, so frame-perfect inputs after loading the game will result in the exact same pieces. The first perfect level 18 run (only tetrises to score) was dismissed by community because it was made by replicating a TAS run with a suitable piece sequence.

teo_zero |root |parent |next |previous [-]

> You do seem to get more | shaped pieces when you leave those spaces open on the board.

I don't think this is correct, nor that it can be evinced from the article. What it does say is that the sequences that led them to achieve their target show a higher incidence of I shapes. This is because all the ones that show less I shapes have been "pruned away" by the cost function, which favors I shapes.

This has some relationship with the anthropic principle: isn't it strange that, of all the possible universes, we ended up in the one that seems fine-tuned exactly for life as we know it?

nkrisc |root |parent |previous [-]

Their strategy optimized for the I pieces, so it should be no surprise that winning runs were ones that had a higher incidence of those pieces. Runs with fewer would not have survived under that strategy.

criddell |root |parent |next |previous [-]

The best versions of Tetris are random in sets of 7. There's a "bag" of all 7 shapes and the next piece is picked from that bag until the bag is empty and then it refills.

jdw64 |root |parent |previous [-]

You're talking about piece, right? I know that it's actually determined by the execution state per frame and the button inputs [1]. I looked into Tetris AI before because I found it fascinating, but I might be mistaken.

[1]https://tetrissuomi.wordpress.com/wp-content/uploads/2020/04...