if Tetris were Thanksgiving dinner with your shittiest uncle
November 6, 2022 1:45 PM   Subscribe

Want to hate Tetris, or for Tetris to hate you? The answer may be Hatetris (which you can play here), an adversarial Tetris game (by MeFi's Own qntm) that tries to serve you the worst possible pieces you could ever not hope for. Here's a detailed writeup of understanding and breaking the high score record by David & Filipe, who just shattered their previous record with 148 whole points.
posted by cortex (22 comments total) 20 users marked this as a favorite
 
I got a score of two! I'm so excited!
posted by Conrad Cornelius o'Donald o'Dell at 2:18 PM on November 6, 2022 [1 favorite]


Pssh. Got two, ON MY FRIST TRY.
posted by signal at 3:39 PM on November 6, 2022


I also scored 2 points! I hate it!

(Specifically, I hate the right-facing S piece.)
posted by klausman at 3:51 PM on November 6, 2022 [1 favorite]


looking three moves ahead is computationally impractical to achieve (in client-side JavaScript, at any rate). I think it should be possible to build a game which permits no lines whatsoever, and I hope to create this, and I'm not intending to release any kind of intermediate solution. More as it happens.

Aurrshnrkk.
posted by clew at 3:59 PM on November 6, 2022


Favorited for the title.
posted by bendy at 4:05 PM on November 6, 2022


honestly think that gravity is the least of your problems

oh this is hateful alright
posted by They sucked his brains out! at 4:13 PM on November 6, 2022 [1 favorite]


" I think it should be possible to build a game which permits no lines whatsoever"

Hrm, if it *IS* possible, then you only have to do it once? Like how the first to go in tic-tac-toe will win.
posted by Horkus at 4:28 PM on November 6, 2022 [1 favorite]


I got three points, to my surprise. I consider this a win for bumblers everywhere.
posted by solarion at 4:45 PM on November 6, 2022 [1 favorite]


The comment where I speculate about making a version of Tetris which permits no lines whatsoever is from 2010. In 2011 I conjectured that in fact this is impossible, and that a rational player can always get at least one line, no matter what pieces they're given. I attempted to prove this but failed. In April 2022 this conjecture was proven correct by a3nm.

Despite the fact that you can always get at least one line no matter what the AI does, and although HATETRIS remains by far the most hostile Tetris AI I'm aware of, I still think significantly more hostile Tetris AIs could be created, most likely by leveraging the same techniques as David & Felipe. Possibly not by me, though.
posted by qntm at 5:18 PM on November 6, 2022 [32 favorites]


I feel like at this point with machine learning being the technique that makes progress, the next most hostile step is to introduce a small amount of randomness so that while the game itself may not be any more difficult, these sort of analytical solutions are no longer possible.
posted by Superilla at 6:18 PM on November 6, 2022 [1 favorite]


As far as I can tell this is just Tetris, but with only S pieces. Zs seem possible I guess, but not in combination.

(I mean is there even a way to generate a straight? Or an L? Seems unlikely.)
posted by kleinsteradikaleminderheit at 7:50 PM on November 6, 2022


That's one of the fascinating things about it: you absolutely can force it to cough up other pieces, but not through normal reasonable play. The game likes to throw out Ss and Zs because, placed in a nominally strategically sound fashion (i.e. laying out a fairly dense packing with a hole you hope to clean up later when your piece luck improves), you'll never, ever get a line using more Ss and Zs. So the game keeps throwing those at you, because there is no luck and no hope.

If you watch the 148-point replay in the last link of the post, you'll see it opens with a few Ss but then starts coughing up I and L pieces etc. once the placement of those initial Ss creates a situation where another one would give the player a line that an I or an L wouldn't. The evolving strategies of the various attempts to counter the adversarial piece choices of Hatetris all depend on different approaches to that idea: throw out everything you know about reasonable Tetris tactics and instead try to exploit the small chinks in the armor of the Hatetris algorithm. You can't try to win, you can only try to lose a little bit slower by playing unconventionally.
posted by cortex at 8:04 PM on November 6, 2022 [4 favorites]


(I mean is there even a way to generate a straight? Or an L? Seems unlikely.)

You can get a straight block easily by laying three S pieces horizontally. I also managed to generate a L playing it again while writing this post but I don't have a clear means.
posted by solarion at 8:05 PM on November 6, 2022


In fact I just overstated the difficulty a bit of getting an I out of the game: you can get it on the fifth piece. Here's a replay string for a score three game I just played:

ޛටմݹடقາח௧ࡆໃݷۑඦҽݹƐඡଈݶݻටדݹ௨ƣາם௨ರໃŦஸقවߢஸٯແߢளقलݚ௧ɜຽऎ௧ੲະऎ௩ϺಊݑɷชЂঐரقƊӼ௨ళʃܡஒشНڣ୮ϭ1

Which, we'll see if that comes through the comment parser unscathed, but in theory you can copy that, paste it into the "show a replay" button's prompt, and watch it. I'm playing pretty thoughtlessly and unsavvy there, as if I don't know how hard the game is trying to screw me, but luck has it that it still sets me up for a few line clears and also shows off a decent variety of pieces. Never got a T and I don't know if I got both L and J or just one of 'em, but I and S and Z and O and at least one of L/J show up.

My gut feeling is S and Z are so good for Hatetris as a default because (a) they have poor reach with no 2+ length limbs and (b) their 180 degree rotational symmetry means you can't get as many extra options out of rotation as you could from L/J or T.
posted by cortex at 8:13 PM on November 6, 2022


by the third piece i was like "now wait a minute"
posted by misternineham at 11:01 PM on November 6, 2022


It is possible to force all seven pieces to appear, even a T. In fact I even have unit tests to prove this.

The game generates S pieces by default, but if it generated solely S pieces then you could make infinite lines. If you can't figure out how to turn a continual stream of S pieces to your advantage, bad luck!
posted by qntm at 2:47 AM on November 7, 2022 [4 favorites]


Yes, the game is written entirely in JavaScript. You can find the source code here on GitHub. Very few real games are amenable to this . . .

It was a different time.
posted by nosewings at 3:36 AM on November 7, 2022 [1 favorite]


I got 4 on my first try. For a little bit, I felt like I had gotten a system down and was going to do much better than that, but nope.

Ҿڠໃם௨ණໃܭԊقຣऐԈϺໃɜ௨ೲVݶԪҨໃןѻකПݹ௫ටฆݹ४ΟໂএИඦඍݷభඨІܭЩටȻݹޛඝЕঅਏuܘʥௐقඍݶƔقӽथԨΤWŦԨ੬ถࡨஓƔఽࠋ༭૫සѴഖRHɜݫගȣםԥఢƁວਛƆVҲޚ෮ฎߛறඝƽǃߞ
posted by aubilenon at 10:33 AM on November 7, 2022


I got 4 on my first try. I even had a setup for a Tetris but that's probably a fool's errand unless I can figure out how to force it to dispense a line piece.

That 148 point run is some mad wizard shit and I need to try more of that cave/overhand and rotate in place to fit tactic.

I'm definitely appreciating the lack of gravity giving you more time to think about piece placements. Normal Tetris might be really fun and contemplative like that instead of turning into sheer terror and panic at higher/faster levels.
posted by loquacious at 10:34 AM on November 7, 2022 [1 favorite]


I'm just pleased I managed to make it cough up a square!
posted by nickmark at 11:37 AM on November 7, 2022


Hey, you deserve a square!
posted by aubilenon at 2:08 AM on November 8, 2022


There has been incremental improvement since this post went up, but here's an absolutely shattering update: 289 lines from knewjade, on whose previous work the post's prior record had been in part based.

If you are fluent in both tetris hacking and Japanese, here's some more detail.
posted by cortex at 8:51 PM on November 25, 2022 [2 favorites]


« Older "[T]he cruel jokes don’t ruin his day anymore"   |   Honest Government Ad: Visit Western Australia Newer »


This thread has been archived and is closed to new comments