Friday, September 11, 2009

How can you learn to walk if you never fall down?



Nobody gets it right the first time; not even robots. This video inspired the following story.

It's 2 AM and Kimiko had been coding for 6 hours straight. She was about to make a breakthrough, but it would carry with it a painful mistake.

Compile.
Upload.
Run.

***

The project was conceived in a moment of inspired laziness. Every time the robot Asimo tripped over an obstacle, or lost its balance, or took a mis-programmed step, it would fall down, clattering on the cold floor. And every time, Kimiko struggled to help it back up. Asimo weighed over a hundred pounds with its power pack - almost as much as she did. If only it could get up by itself!

The programming had been tedious and trying, but it wasn't devoid of pleasant diversions. She had fun earlier ordering Jeff around, telling him to lie on the ground and wiggle his lanky limbs, while she recorded his postures and movements. He warned her against uploading those videos to Youtube. Together they discovered that there were two stable ways of being prone: laying on the stomach, and on the back. From each position, there was a specific sequence of movements to stand back up. They giggled at Asimo as it clumsily emulated motions that seemed so natural to Jeff.

But, because Asimo had relatively inflexible joints, it couldn't get back up from a face-up position. Kimiko wasted almost two exasperating hours trying. It was the most advance humanoid robot in the world. They designed Asimo to look friendly, and because of that it had inherited all the flaws of flesh and bone, along with its own metal and plastic limitations.

On a whim, Kimiko laid down on the cold lab floor. She looked up at the ceiling and relaxed. Just resting her eyes for a brief moment to let the jumble of ideas settle in her mind. The lab is quiet; Jeff is probably getting drunk with his buddies by now.

Her muscles twitched right when she was falling asleep and jerked her back into the harsh light of the lab. She rolled onto her side and stared groggily at Asimo. It stood there, arms half-raised, as if expecting a hug. The idea came to her as she was getting up. That stroke of insight and the dizziness from standing overwhelmed her senses and she almost fell back down. She stumbled toward her desk and leaned against the bookshelf.

All she had to do was program Asimo to roll-over; reducing a difficult problem into one that had been solved - it was practically the first lesson in computer science. With a grin, Kimiko dove back into work.

She had to fight the urge to go help it, to give Asimo a hand, as she watched it squirm about on the ground so helplessly. Its motors whirred until, at last, it rolled onto its stomach and propped itself up, righted into a kneeling stance, and stood, wobbling, with one foot and then the other. Kimiko clapped and cheered, and thought briefly about hugging the stout robot.

But she wasn't finished. Before they branched out into this side project, she and Jeff had been working on a genetic algorithm for Asimo to optimize its stride. It should allow Asimo to learn autonomously from its own mistakes and select the fastest and most power-efficient movements. With the new procedure on how to get back on its feet, Asimo would be able to continue learning and improving without her supervision! It could go through -- quick mental math -- 40 or 50 iterations of improvement over the holiday weekend; just under 1000 laps around the track, all on its own; it only need to recharge every hour.

Kimiko was so entrenched in work that she payed no attention to the time. She was in a trance that Jeff referred to as the "programmer zen": there is no self; there is only code. After she merged her new functions into the algorithm, after squeezing out all the bugs, after tweaking the test runs, she was finally ready. Asimo was ready.

She noticed that it was past 2 AM, and rubbed her eyes.

Compile. Upload. Run.

And it was out of her hands. She watched Asimo shuffle around the course with those slow deliberate steps which had become so familiar that she caught her self emulating more than once. Kimiko sagged in her chair, and watched, and smiled.

"Goodnight, Asimo," she said softly as she locked up the lab.

***

Kimiko spent the weekend camping with her roommates, up in the beautiful Sierras. The crisp autumn breeze did wonderful things for her sub-basement constitution.

When she got back, half a dozen text messages were waiting for her. They were from Jeff, all along the lines of "OMG what did u do?" Her professor also left a stern voicemail requesting her presence as soon as possible.

Jeff caught her outside the lab. She was out of breath and her hands felt clammy. He whispered, "The professor, he's really mad, but he won't shut it down. He's been watching it go around and around the last 30 minutes."

The first thing she noticed was how natural Asimo's gait appeared. It had a rhythm, a purpose, in the way it lifted its leg as it shifted its balance, the way it rolled its feet from heel to toe, the way its body flowed along. There was momentum in its stride. She didn't need to see the monitor to know that Asimo had broken all the speed records.

The professor was muttering to himself about dynamic balance and predictive movement and pressure feedback controls, and was oblivious to Kimiko's entrance.

The second thing she noticed made her gasp.

Asimo was limping. Subtly, as if it were trying to hide the defect. And then she noticed the extent of the damage: the scratches all over its body, the jagged crack on its face plate, the twisted left hand, the warped knee piece that exposed dull-gray skeleton and wires and actuators. It made a grinding noise on every other step.

"Stop. Asimo, stop!" she cried.

Kimiko ran up to it and knelt before it and touched its damaged knee with trembling hands.

"I'm sorry. I'm sorry," she said, "I'm so sorry."

Jeff reached out to hold her shoulder, but he pulled back at the last moment and remained silent.

Kimiko looked up at Asimo's cracked face plate, and at the large, dark eyes behind it. In that moment, she realized the mistake she had made.

She taught it how to get up, but she forgot to teach it how to fall.

No comments: