Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Tetris AI revisited: How strong is it exactly?

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
385 views
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jan 8, 2012

In April 2011, I published the source code to a piece puzzle game here at YouTube. You can see it here: http://youtu.be/V65mtR08fH0
In addition to being playable, the game also had a built-in AI using a state-of-art real-time algorithm by Pierre Dellacherie, extended by me for multi-piece look-ahead. But the video showcased the AI for really quite a short time.

I meant to publish a second video in which I show how good exactly the AI is.

Then came the summer, and came the Feast of Tabernacles, and came Hanukkah, and the video got a little delayed. But here it is. In this video, I pit two instances of that AI against each others, and see how long they last.
See for yourself. Keep in mind that the game features pentominos -- five-block pieces which are really difficult to work with. With tetrominos only (4-block pieces), the AI would keep playing almost indefinitely, never getting a game over, at least not within the 15 minutes limit of this video, even with the penalty rows (no 20G mode).

Background music:
-- Betrayal at Krondor bgm 31, played through ADLMIDI

Source code and resources: http://bisqwit.iki.fi/jutut/kuvat/programming_examples/tetre/

The whole video series:
-- http://youtu.be/JDnypVoQcPw -- Creating a rudimentary TETRIS clone in GW-BASIC
-- http://youtu.be/V65mtR08fH0 -- Improving the game by rewriting from scratch C++, added AI
-- http://youtu.be/-j9AG2I0f3Y -- Illustrating the AI's power with tetrominos and pentominos
-- http://youtu.be/ukXDCBewnsg -- Illustrating the AI's power with only tetrominos
-- http://youtu.be/zQZLK8r1NFs -- Illustrating the AI's power with tetrominos, pentominos and hexominos
-- http://youtu.be/7kHnnkVlBKI -- Testing the AI at tackling octominos. Not good.
-- http://youtu.be/Yw02EkQE3Cw -- Illustrating the AI's power with tetrominos on a half-width field.

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (Bisqwit)

  • Interestingly, I've had the AI crap out on me before 15 minutes. Granted, this wasn't the look-ahead version AND it was built into a Windows screen saver, but still.

  • @JosephCollins Which AI? You know there are an infinite possible ways to implement an AI that plays Tetris. Some algorithms fare better than others.

  • It's hard to relate with those weird five-block pieces, because I've never actually played a game like that before. Could you show us an example of the AI playing traditional Tetris?

  • @jwcsh There we go: video ukXDCBewnsg

see all

All Comments (7)

Sign In or Sign Up now to post a comment!
  • @Bisqwit

    I'm pretty sure it was Pierre's algorithm. But I can't be COMPLETELY sure. I just know it focused solely on Singles and could actually for near-infinity, despite utterly failing every once in a great while.

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more