Search within Lanny's blog:


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

Monday, February 23, 2009

AI and Robots: VEX Robotics Competition World Championship

Two days from today, and between April 22 and 24, the 2009-2010 VEX Robotics Competition World Championship will be held at Dallas Conventional Center where over 3000 contestants from 14 countries around the world will meet and fight their guts out (correction, fight their robots' guts out).

It is interesting that I only heard about this competition a few days ago from my wife because she is actually working on arranging hotel and travel for the Chinese team. Therefore, I looked it up and hence, today's blog post. :)

The main sponsor of the competition is a company called Vex Robotics Design System, who makes and sells robotics kits to hobbyists and young students. At the beginning of the season each year, the organizer would announce a new challenge, and students around the world can then form teams to compete in this world-wide competition using robots built from, of course, the VEX robotics kit. Contestants contained mostly middle school and high school students. However, even elementary school students can compete in this competition. These teams then compete against each other at the local and regional level until finalists are determined who then compete in the world championship. The competition is presently in its third season. The challenge for the 2008-2009 season is called Elevation Challenge, and the new one for the 2009-2010 season is called Clean Sweep Challenge.

The video below is from last year's world championship, also held at Dallas Conventional Center.


This year's challenge is the clean sweep challenge where two teams, each team using two robots, are divided into two courts, and the goal is to rack up as many points in a fixed time by pushing, shoveling, throwing, and dumping balls out of the team's own court and into the opponent's court. In the first 20 seconds of the game, the robots will play autonomously by running programs written by the contestants. For the remaining duration of the game, each robot is teleoperated using a remote control by contestants. Each team is free to design the robots anyway they like, and the only constraint is that the size of each robot can not exceed a certain limit (read the detailed description of the rules). The video below is the game animation describing the game in detail.


Since each team has to fight all the way from local to international, there are plenty of videos of games played at different cities and regions. The video below shows a game played by team number 8888 from La Salle High School in the semifinals (probably at the country level). You can probably see that during the first 20 seconds, the robots looked very dumb and didn't really do much. This is probably due to the difficulty for pre-college-level students to master and implement advanced AI algorithms and techniques. However, the students still have to put in a lot of effort designing and implementing these robots from an mechanical engineering perspective. Still though, it would be so nice if we see people designing fully autonomous robots (or robots with supervisory control) to compete in such interesting games.


I wish all the contestants the best luck in the upcoming world competition. I am sure they will all have a ton of fun and hopefully many of them will grow up into sincere robotists.

Video of the Day:

The street magician!

Sunday, February 22, 2009

Full Moon Crescent Saber: Chapter 1 (3)


The creek was as clear as crystal.
Ding Peng walked along the creek, walking very quickly.
Of course he needed to hurry back. He still had many things to do. The morning sun had been rising high gradually. He suddenly felt very hungry, deadly hungry.
Today could very well be the most important day in his entire life. The moment that would decide his fate was right around the corner. But what was he doing? He was looking for an old man in bright red robe for a naked girl on an empty stomach like a fool.
If anyone else had told him of such a fool, he would never have believed.
The only thing real was that the girl was amazingly beautiful. Furthermore, she also possessed a very special temperament that made it impossible and unbearable for someone to reject her requests.
If there actually exists men capable of saying “no” to the face of this girl, such men must be very rare.
Fortunately, the creek was not very long.
There was indeed an old tree at the end of the creek, and indeed two men playing the game of Go there. One of them was indeed an old man in a bright red robe. Ding Peng heaved a secret sigh and then walked toward them in large strides. Reaching his hand forward, he tried to mess up the present game.
He was indeed an obedient man. But as he reached forward with his hand, his foot suddenly tripped. There was a hole on the ground, and he had stepped into the hole.
Fortunately the hole was not very big and he didn’t fall. Unfortunately, just when he drew his foot out of the hole, his other foot also tripped. Turned out there was a rope circle on the ground, and he happened to step into it. The rope circle immediately tightened.
Since his other foot was still in the air, as soon as the rope circle tightened, he lost his balance.
Even more unfortunately, the rope circle was tied to a tree branch. The tree branch had been bent to the ground. When the rope circle moved, the tree branch immediately shot upward and also swung him upward.
Most unfortunately, as he was swung upward, he happened to bump into another tree branch, and the branch happened to poke him right on an acupoint around his waist, which could easily immobilize a person even when poked lightly. Therefore, Ding Peng
found himself hanging upside down like a stupid fish hanging from a fishing pole.
The hold on the ground, the rope circle, and the tree branch – did someone deliberately set up the trap?
When the girl told him to come here, did she intend for him to fall prey of this trap? The two of them obviously didn’t hold any grudges against each other. Why would she do such a terrible thing to him?
The two men under the tree concentrated on their ongoing Go game without ever sparing a glance at him, as though they had no idea that someone came and was now hanging from the tree upside down.
The two must be true Go enthusiasts.
All Go enthusiasts hate interruptions when they are playing.
Maybe they only laid the trap to prevent others from disturbing them. They didn’t do it specifically for him.
Of course the girl would have no idea about such a trap.
At that thought, Ding Peng felt slightly better inside.
“Excuse me, misters! Will you let me down please?” he asked calmly.
But the two Go players didn’t hear him at all. Ding Peng repeated three times, but they ignored him completely as though they didn’t hear a word he said. Ding Peng began to lose his calm.
“Hey…,” he shouted.
He only had the chance to call out that one word. The word required him to open his mouth, but instantly, something flew over and blocked his mouth, something stinking, soft, sticky, and reeking. Ding Peng couldn’t tell if it was mud or something much worse than mud. The thing came from a tree branch on the opposite side. A little monkey wearing a red dress and riding on the branch was actually laughing at him with its mouth stretched wide. Things thrown by a monkey cannot be anything good! He’d be very lucky if it were only mud. Ding Peng nearly fainted from anger. After years of hardship and struggle, when he could almost feel the edge of success, then this happened.
Now support the translator Lanny by following my blog and leaving comments! :)

Picture of the Day:

Adeline does the Kung-Fu Panda at BYU CS Building!
Did you know that Jason Turner, a BYU alumnus currently working at DreamWorks Animation, personally built the computer model for "Po," the panda who stars in the movie?


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

Friday, February 20, 2009

Random Thoughts: Adventure in Japan -- Part 2

Adventure in Japan - Part 1

It has been a while since I returned from Osaka, Japan, but I thought I'd share a bit more of my experience in Japan for people who would like to visit Japan one day. Let me start off with some traveling tips.
  • For a lot of people (61 countries and regions to be exact) including US citizens, visiting Japan for non-paid activities for 90 days or less does not require a visa. Just buy a plane ticket and go. It's that easy!

  • There are several ways to get Japanese Yen. You can get it from your local bank before the trip. However, be aware that you have to pre-order, and it might take them up to 5 business days to get the money ready for you. They also charge a service fee ($10 for US Bank) for the exchange (from US Dollar to Yen or later from Yen to US Dollar after you return). This option works well if you exchange large quantities of money. A more convenient way to get Japanese Yen for a short term visitor is to get the Japanese money from ATMs at the Japanese airport. You will be charged about 3% for the exchange plus the ATM fee (probably $2). This option is better for small amount of exchange.

  • Before visiting Japan, I was told that most places in Japan would take credit cards such as American Express of Visa. After visiting Japan, I learned the hard way that this is not true. Japanese businesses mostly don't take credit cards. Even McDonald's in downtown Osaka refused to take any credit cards.

  • Power outlets in Japan are different from North America. North America has polarized outlets (one big one small). Japan has non-polarized outlets (both small). Also they don't have three holes, only two. If you have polarized plugs, then you need an adapter. The hotel might loan you one for free.

  • Standard voltage in Japan is 100V. Make sure your devices can operate at 100V. If not, you need a transformer.
For the rest of the blog post, I'll focus on one single topic: Japanese Food.

The conference provided free lunch everyday in the form of a very traditional style of Japanese food: Bento Box. According to Wikipedia:
Bento (弁当) is a single-portion takeout or home-packed meal common in Japanese cuisine. A traditional bento consists of rice, fish or meat, and one or more pickled or cooked vegetables, usually in a box-shaped container.
The three pictures below show the three kinds of bento box lunches I was fortunate to try out. Each bento box contained a great variety of things, including rice, sea food, and lots of pickled things. Everything in a bento box is served cold, removing the need to heat up things using a microwave. I must confess that although the bento boxes looked very colorful and pretty, cold rice and too much pickled meat/vegetables just didn't quite agree with me. And I must mention that all the beautiful wooden boxes were properly recycled to save trees!


Because of the generosity of the HRI 2010 conference organizers (they covered most of the meals) and my very busy schedule, I only had the chance to visit one traditional Japanese restaurant during the trip. The picture below on the left shows the front of the small restaurant in downtown Osaka named Money House. The picture on the right shows the hall way inside, just wide enough for one person, a typical setup for traditional Japanese restaurants.


Since Japan is entirely made up of islands, it was not surprising to see lots of sea food dishes on the menu. Since a friend in our dinner group was an American who had lived in Japan for 8 years, he took charge of all the ordering, and we got to experience some interesting food. For example, deep fried squids (left), octopus balls (middle), and of course, raw fish (right). The first two actually tasted great despite the weirdness, however, I shied away from the raw fish, because I don't ever eat raw meat (e.g., a rare steak).


Some other dishes are very similar to Chinese dishes, such as dumplings, stir fried clams, and boiled green soy beans.


There were dishes that tasted very American too, such as the big Chicken Nugget shown below. Alcohol is also a big part of a Japanese culture (see all those bottles in the middle picture), and I wonder how many people in Japan drink and drive. The dinner was great! There is only one thing I'd like to complain though: why were all the dishes served in such small plates? See the stack of small plates in the last picture? We are a bunch of hungry grad students and I am not kidding when I say we can eat a lot!


For a group of 13 people, the dinner cost per person was 3000 yen (roughly about $35 USD), quite expensive in American standards, but it was well worth it. How often does one get the chance to eat a real authentic Japanese dinner? And by the way, they did not take credit cards. :)




The easiest way to put a baby to sleep is to give him classical music!

Thursday, February 19, 2009

Paper Review: Using Maximum Entropy for Text Classification

This paper is written by Kamal Nigam, John Lafferty, and Andrew McCallum, all from Carnnegie Mellon University. It was presented at IJCAI-99 workshop on machine learning for information filtering.

This paper talks about the use of maximum entropy techniques for text classification and compares the performance to that of naïve Bayes.

Maximum entropy is a general technique for estimating probability distributions from data. The main principle in maximum entropy is that when nothing is known, the distribution should be as uniform as possible, that is, have maximal entropy. In text classification scenarios, maximum entropy estimates the conditional distribution of the class label given a document. The paper uses word counts as features.



Training data is used to set constraints on the conditional distribution. Maximum entropy first identifies a set of feature functions that will be useful for classification, then for each feature, measures its expected value over the training data and take this to be a constraint for the model distribution.

Improved Iterative Scaling (IIS) is a hillclimbing algorithm for calculating the parameters of a maximum entropy classifier given a set of constraints. It performs hillclimbing in parameter log likelihood space. At each step IIS finds an incrementally more likely set of parameters and converges to the globally optimal set of parameters.

Maximum entropy can suffer from overfitting and introducing a prior on the model can reduce overfitting and improve performance. To integrate a prior into maximum entropy, the paper proposes using maximum a posteriori estimation for the exponential model instead of maximum likelihood estimation. A Gaussian prior is used in all the experiments.

One good thing about maximum entropy is that it does not suffer from any independence assumptions.

The paper used three data sets to compare the performance of maximum entropy to naïve Bayes. The three data sets are WebKB, Industry Sector, and Newsgroups. In WebKB data set, the maximum entropy was able to reduce classification error by more than 40%. For the other two data sets, maximum entropy overfitted and performed worse than naïve Bayes.


Video of the Day:

Liu Qian performing magic tricks at the Chinese New Year Show. Can you figure out how he did the tricks?