| Show-Me Training |
GPL notice: This document and the ideas contained herein are Copyright © 1999-2007 Robert P. Munafo, and are distributed under the Free Software Foundation General Public License version 2.0. See the FSF GPL page for more information.
This is a simple, intuitive method of training robots. The hardware and software algorithms inside the robot can be quite simple, but still allow for a wide variety of behaviors.
Dog Training
Think about how you train a dog to do tricks. Well, there are two ways, actually. If you want the dog to "sit" there are two ways to train him:
- give the command, wait until he sits, then give him a reward
- give the command, physically guide the dog into a sitting position,
then give him a reward
(and of course, repeat over and over again until trained!)
the second method is what I call Show-Me training.
Robot Training
Suppose you have a robot that has two motors (A and B) connected to left and right wheels, and a third wheel (for balance) that just pivots and rolls like a caster. It also has one touch sensor, placed behind a bumper on the front of the robot. It also has a button called "TEACH" and another called "GO".
Suppose you want to train this robot to move straight forward until the touch sensor gets hit, then stop, reverse motor A for a little while, then resume forward motion. The way to train it via the Show-Me method is:
- press and hold the "TEACH" button
- roll the robot forward
- bump its touch sensor against something
- roll the robot backward on a curve
- roll it forward again
- release the "TEACH" button
the robot's firmware would:
- observe the TEACH button being pressed
- observe the motors both moving forward (via generated voltage)
- observe the touch sensor getting hit
- observe the stop/reverse motion
- observe that forward motion has resumed
- observe TEACH being released
and would encode this as a program with a single initial motion and a single stimulus-reaction motion:
Flexible and Adaptable
Notice I have the two motors going in opposite directions. The idea is that the robot is built that way the motors "point" in different directions because they are on opposite sides of the chassis. But suppose the builder rebuilt the robot so that the motors point the same way, or added gears to make it so that you have to run both motors clockwise to get forward movement. The user would simply repeat the Show-Me training and the robot would learn that it should turn one of the motors the other way. The robot doesn't even need to know what has been changed as far as it knows, maybe it's being trained to turn in circles.
If the firmware wanted to be fancy it could even measure the speeds and delay timings. I have implied part of this in the line that says "wait 1.5 seconds". A much richer set of behaviors would result if the firmware noted the motor speed, and kept track of how much variation in speed takes place. Statistics such as mean speed, standard deviation, frequency of changes, rate of acceleration, etc. could all be gathered and used as parameters in a pseudo-random motion generation function used during GO mode (behavior playback).
Analog variable inputs (like light sensors) that aren't just "on" or "off" allow for an even more elegant form of programming. Statistics for the motors and the input are taken simultaneously and accumulated on a scatter graph:
The points are widely scattered, but there is a correlation that can be roughly described by saying that the motor goes faster at lower light levels. This data would be analyzed by the firmware using standard two-variable linear regression, and the resulting slope, intercept, and correlation coefficients would be used to generate behavior during GO (behavior playback) mode.
In fact, the same concept can be generalized to a multivariable linear correlation technique that correlates all of the inputs with all of the outputs. "Inputs" and "outputs" can be actual raw input levels and motor speeds, or derived parameters such as mean, standard deviation, frequency, rate of change, etc. The correlation would be stored as a matrix that maps a vector of input values onto a vector of output values. Such a multivariable linear correlation system would include all of the behaviors possible in the simpler training systems described above.
Intuitive
This is about as intuitive as robot programming can get. All the user has to do is push the robot around and make it react to inputs in the desired way. Telling it what sensor readings to react to happens automatically as a part of the training. Reprogramming to get a different behavior takes all of 5 to 10 seconds.
This site is not affiliated with the LEGO® group of companies.
LEGO®, Duplo®, QUATRO®, DACTA®, MINDSTORMS®, Constructopedia®, Robotics Invention System® and Lego Technic®, etc. are trademarks or registered trademarks of LEGO Group. LEGO Group does not sponsor, authorize or endorse this site.
All other trademarks, service marks, and copyrights are property of their respective owners.
If you want to visit the official LEGO® site, click here
Parts images are from LUGNET. On this page they explicitly give permission to link to the images:
Note: you may link (as in, Yes, it's OK) directly to these parts images from an off-site web page.
© 1996-2008 Robert P. Munafo.
email me
more info
This work is licensed under a Creative Commons Attribution 2.5 License. Details here
Back to my main page
s.13