Friday, March 16, 2012


I am fascinated by Asimov's Gedankenexperiment  in robot design.  With pen and paper, and a degree in biochemistry he mapped out interesting territory in the intersection of robotics and humans.

Every sci-fi buff who has been to a movie theatre has had the three laws of robotics drilled into them, whether by watching the charming flick Bicentennial Man  or  "I, Robot"  (or as I think of it, I, Robot, the remix), we know, par coeur.

The Three Law, apart from being well founded, a good idea etc, provide a brilliant dramatic device for Asimov. His robots must follow the three laws, which seem reasonable and good, but when actually applied lead to some tense situation.

Over the last day or so, I have begun to re-read I,Robot. Each time I read it I know more about robotics and each time I read it,  I get the chilling feeling that Asimov was some kind of visitor from the future. How could he have figured out so much about robots without ever having built one?

I, Robot, chapter 1: Robbie

The story opens with a little 8 y.o. girl playing hid and go seek with her robot companion. The child is "it" first. She counts to 100 (in my day it was 10, I guess kids were more patient in those day.. !) . The child looks about, and leaves the magic zone of being between robbie and the home tree. Robbie sprints at high speed. Of course, the robot being of superior speed could easily outrun the child to"home base" but,  in the last 10 steps it slows down and lets the child win.

 From Principles of robot motion, H. Choset et al.. 
From an algorithmic point of view, this feels like Robbie is using a kind of potential field method to trigger his action to run. The Potential Field method, is a motion planning method were objects are represented as repelling objects, and the goal, the home tree in this case, is an attractor. Each object creates a Vector Field.

One way of thinking about of vector field is to stand outside your house with an arrow pointing from the center of your chest. Point the arrow towards your front door. Now  have a friend stand near you, say 20 paces away in some direction. Have her use and arrow in the same way.  Now image hundreds of friends with such arrows pointing toward home. That is a vector field. The robot needs only follow the arrows to get home.

One way of constructing a vector field is to start with a function of two variables, say x, and y representing the a grid stretched across a local path of earth, and let the center be the goal location in the case of a the vector field associated with the goal and taking the gradient of the function, and putting a minus sign in front of it.


Well, think of a really big bowl, centered at the home location, now if you were standing inside the bowl, the gradient would be the direction you would want to head to get out of the bowl, while the opposite of that (the negative) would lead you to the bottom of the bowl.  If all of our friends are standing in the bowl with arrows pointing to the bottom of the bowl, then, you get the idea.

[This is not the only way of creating a vector field and in fact many really useful vector field can exist with are not simple .]

Ok, now the problem with such methods is simply, what function should you start with to give you a vector field.

If we start with a cone  the gradient is of constant magnitude (and hence the robot will move at a constant speed). Now, that is not a good thing. If our friend robbie is running at top speed, he would not slow down, but would just smack into the tree.

Hmmm, what about parabola (beautiful example!).   Well, when the robot is far away, it would have a gradient approaching infinity. So, this is clearly not possible.  But as we got closer, the gradient of the parabola would gradually approach zero.

One idea is to use a cone for distances far away, say, more than ten feet, and then a parabola for distances closer. The effect would be that the robot would move at top speed to the obstacle, then, just before reaching the obstacle would begin to slow down quickly. Just as Asimov described in his book!

Of course, robbie may just have wanted to let the little girl win. Or, did he predict this now well known algorithm for robot path planning?

Dr -T

No comments:

Post a Comment