Institute for Personal Robots in Education Blog

Exploring Programming through Robot Behaviors

As we begin to explore the use of robots in an introductory computer science course (CS1), it appears that there are at least three distinct ways of creating interesting robot behaviors.

The first is what one might call the engineered approach. Using this method, one might write a control program like the following:

for n in range(4):

One might guess that this code would go forward a distance of 5 units and turn to the left 90 degrees. This is repeated 4 times, so that the robot should return to its initial position.

This approach is a rational approach---one can reason about what the intent of the program is. It is also independent of the world; it doesn't matter what else is going on in the world, it will attempt to traverse its square path. In fact, a robot doesn't even need sensors for this type of control; it is purely Platonic in a sense.

The second approach is what one might call the emergent approach. Using this method, one might write a different kind of program like the following:

while True:
    val = robot.getRightSensor()
    if val < 1:

or in a more continuous fashion:

while True:
    robot.turn( (1 - robot.getRightSensor()) * 5)

The idea of this program is to turn towards the wall if it is too far away from it, and turn away from the wall if it is too close. This will run forever, or until stopped by the user.

This approach could be described as being embodied or reactive as it merely reflects its environment---it acts directly based on its righthand sensor. But it might be, in general, hard to say exactly what the resulting emergent behavior might be for more than a couple of reactive rules.

The third type of behavior might be called the hybrid approach, and would be a combination of the two others. Sometimes it would be engineered, but other times it might need to adjust based on the specifics of the environment. Probably, most real robotics control paradigms fall into this category.

Although I have no evidence, I suspect that students might prefer to explore one methodology over another, and could imagine that such a bias could be correlated with gender.

For further reading:

Vehicles: Experiments in Synthetic Psychology, by Valentino Braitenberg.

Behavior-Based Robotics, by Ron Arkin.

I have read "Behavior-Based

Thu, 2009-02-19 04:47

I have read "Behavior-Based Robotics" and I recommend it for everyone interested in this subject. Thanks for the useful article!

Bottoroff's performance enhancement review blog

Post new comment

  • Lines and paragraphs break automatically.
  • Allowed HTML tags: <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
More information about formatting options