Without a Traceroute

Time to live.

Without a Traceroute header image 2

Tetris

June 11th, 2009 · 1 Comment · Geeky, Hacker culture, Technology

Many people are probably aware that June 6 marked the 65th anniversary of the D-Day invasion. However, until I saw the commemorative Google logo, I hadn’t realized until I that it represented another monumental anniversary: the 25th birthday of Tetris.

I mentioned this to a friend of mine, and he said something like, “Wow, only 25? It kind of feels like Tetris should have been around forever.” I can see where he’s coming from. There’s something about the platonic purity of Tetris that makes it seem timeless. Other computer games from the 1980s, may still be fun, but invariably feel dated, handicapped by the primitive graphics and sound hardware of the era. Not so with Tetris. Playing Tetris, one gets the feeling that it looks and sounds the way it does because that’s what Tetris is.

The history behind the creation, licensing and promotion of Tetris is incredibly convoluted. It is a tale rich with Cold War politics and transnational intrigue. It’s also too long to recount here, and covered in sufficient detail elsewhere.

Of course, Tetris’ most famous characteristic is its addictive gameplay. In fact, it may be the only game so addictive that it nearly prevented its own completion. When Alexey Pajitnov first wrote Tetris, he found himself so distracted by playing the half-finished version—with no scoring, acceleration, or levels—that he almost didn’t get around to writing those features.

Over the years, a similar addiction has consumed the lives and livelihoods of many. World-record Tetris players have been known to play for more than 12 hours at a time. In my own life, back in junior high, I used to play Tetris DX on the Gameboy Color for an hour or two at a stretch, maxing out the acceleration.

I can testify that Tetris does weird things to your brain. At first, as the pieces fall faster and faster, the game becomes more hectic and stressful. However, I found that if I survived, and kept playing long enough, eventually I would move past that to a Zen-like state of total focus. The feeling is as though all available cognitive resources were redirected to the unitary goal of sorting blocks. Once I reached that state, it didn’t seem to matter how fast the pieces dropped, I was relaxed. I found that I could even get up and wander around my house, in a kind of trance, without breaking concentration. If somebody spoke to me, it seemed to come slowly and from far away. Unfortunately, replying would take me up out of the zone, and the quality of my play would decline rapidly. More than one game was lost as the result of my parents trying to talk to me.

I have occasionally had a similar feeling when writing, or during an exam, but never as overwhelmingly as when playing Tetris. This is analogous to the mental state reached by skilled hackers when coding. The Jargon file defines “hack mode” as:

“a Zen-like state of total focus on The Problem that may be achieved when one is hacking (this is why every good hacker is part mystic). Ability to enter such concentration at will correlates strongly with wizardliness; it is one of the most important skills learned during larval stage. Sometimes amplified as deep hack mode.”

The entry goes on to discuss the jarring experience of being jolted back to reality when deep in hack mode. In Tetris, that moment occurs when you lose. I would have a brief moment of disorientation, and “Wait, I’m not playing anymore?”, followed, of course, by the pervasive belief that everything in the world is made out of tetrominos, and if I could only fit them together properly, my life would be much, much better.

This post-Tetris hangover, the “Tetris Effect,” is actually a documented neurological phenomenon. Following intense Tetris sessions, players may visualize the real word in terms of interlocking geometric forms, they may see falling colored (or hideous green monochrome!) blocks when they close their eyes. Oh, and, yes, you will play Tetris in your dreams.

The mathematical aspects of Tetris are nearly as fascinating as its neurological ones. Like other classics, such as Chess or Go, Tetris is a game that is striking in its outward simplicity, but conceals enormous complexity. The number of possible board configurations in Tetris is on the order of 10^59 (for comparison, chess includes between 10^43 and 10^50 legal board positions, and there are probably about 10^75 atoms in the universe).

However, unlike these other games, Tetris is fundamentally digital. With due respect to the creators of some truly inspired electromechanical adaptations, Tetris really must be played on a computer of some sort. Intriguingly, Tetris is not a game that can be played by computers perfectly. Although for any given board configuration there is theoretically an ideal move, calculating this move in real time, for all possible situations, is beyond current computer hardware.

The best Tetris-playing AIs can complete hundreds of millions of lines before they lose, but they will eventually make a mistake and lose. There’s an outstanding (but long and technical) paper here where Colin Fahey explains his design of a Tetris AI (and anything else you’d want to know about the theory behind Tetris). If you’d just like to play around with a Tetris AI demonstration, you can download a good one here.

However, even if it were possible to construct an AI that played Tetris perfectly, it would still lose. There exist possible sequences of blocks which are impossible to clear fully, even by an inhumanly perfect player, and these necessarily result in a loss. Assuming that the sequence of pieces were truly random (computer random number generators only produce pseudo-random numbers, for reasons that are themselves complicated and interesting) the system would eventually (as t->∞) deal one of these sequences. One example of an absolutely fatal sequence is 70,000 or so Z- or S-pieces. The reasoning behind this futility is explained by a UIC math professor here; on his site, you can also play a modified version of Tetris that deals only S’s and Z’s. Experience failure yourself!

The fact that it’s mathematically impossible to win at Tetris; indeed, impossible even to achieve the sustained stalemate of perpetual play probably has as much to do with our enduring fascination for the game as anything else. Some see in Tetris’ futility a reflection of the grim, resigned outlook of its Russian creator, others a metaphor for the inevitable collapse of the Soviet Union, or communism writ large; still others find Tetris a metaphor for life itself. Hint: at the end, you always die.

For myself, I suppose the fact that I can never “beat” Tetris means that it will always represent a challenge. Tetris is the unclimbable mountain of video games. There’s a quote from an author whose name I can’t recall (and that I, shockingly, can’t find in google!) that goes very nearly:

“It is only possible to really succeed at second-rate pursuits like politics, sport, or war. Truly worthwhile human endeavors—art, science, philosophy—necessarily evoke a sense of failure”

This, more than anything else, is the reason that Tetris is perhaps the only video game about which we can accurately predict, “They’ll Keep Playing It Long After All of Us Are Dead.”

Tags:

One Comment so far ↓

  • Nathan

    Saying it’s “mathematically” impossible to win at Tetris is a bit of an odd way to put it; I’d say it’s defined to be impossible, since there’s no winning condition (but that’s not very interesting mathematically – it’s just that the game always keeps adding more blocks). Still, the fact that there are fatal sequences of blocks is interesting. I wonder if someone has estimated the expected time to lose given perfect play. I wouldn’t be surprised if it’s longer than the period of most PRNGs (that 70,000-block sequence of S and Z must be horrifically unlikely). If that’s the case, on a real computer the sequence of blocks might repeat after some tremendous amount of time, and so it would be possible for a perfect player to continue forever, sometimes – as long as the repeating sequence they got didn’t happen to contain a fatal sequence.

    By the way, that last link seems to be broken – it just goes back to this page.

Leave a Comment