Search within Lanny's blog:

Leave me comments so I know people are actually reading my blogs! Thanks!

Saturday, February 21, 2009

Robot of the Day: Tetris-Bot, Lego Robot Playing Tetris

Remember the Rubik's Cube solving robots in a previous post? Well, as robots are gradually taking on our world, they are also taking on more and more of our games, and this time, it's Tetris -- one of the most popular video games in the world -- hmm, this really reminds me of those long, sleepless nights of a poor college student!

Pointing a web cam at a computer screen, hooking it to a Lego Mindstorms NXT robot, and setting the robot next to a keyboard, Branislov Kisacanin successfully created a Tetris-Bot that's capable of playing Tetris all by itself. Although Branislov claims that this was an educational project for his kids, chances are, he had a lot more fun than his kids.

The setup really had three pieces. The first piece is a camera capturing video of a computer screen running the game Tetris. A digital signal processing board then processes the video and determine how the falling piece should be moved. The DSP board then tells the NXT robot what to do using LED lights. Then the NXT robot uses its three fingers (hands) to punch three keys on a keyboard to move left, move right, or rotate. Although the robot is capable of punching 3 keystrokes per second, it moves at a much slower pace.

The creator Branislov must had a strong engineering background from his choice of using a DSP board for signal processing. If I were to create such a robot, I'd probably use a computer to perform the computer vision task. Recognizing the Tetris pieces and their orientation is not a very difficult task because of the color simplicity. Then the program just have to use a data structure to represent the state of the game and then choose moves that will maximize a certain utility (defined by the programmer). The video below demos the capability of the Tetris-Bot. The actual robot doesn't appear until 1:48, so skip forward if you want to hurry.

Tetris-Bot here plays like a novice player. My guess is that it will probably forever stuck on level 1 because of it's physical constraints. What would be really nice and fun is to implement some kind of learning algorithm so the robot actually learns what strategies to play from its own experiences and then does some advanced planning by thinking about what to do based on the pieces shown ahead of time. If the algorithm can adjust its parameters (such as threshold values on when to get rid of rows quickly vs. when to wait for a long stick), then the Tetris-Bot would look a lot smarter and more intelligent.

This is yet another example of what kind of robots you can build at your home at your free time using commercially available robotics kit. I know what I am getting for my kids' birthday -- I am very serious about my kids' education! Aren't you?

So if robots are doing our work and playing our games for us, what is left for humans to do? Well, I can think of at least three things:
  • building better robots
  • blog about robots, and
  • work on my translation projects
Wait, aren't I doing these already? :) That is, of course, until we have robots that build better robots, robots that blog about robots, and robots that can translate better than I do ... and I am sure glad I won't live long enough to that day!

Video of the Day:

This is excellent engineering too: OK Go - This Too Shall Pass