There was a long standing bug in the Pyrobot Simulator which allowed
robots to escape from a boxed-in area (especially when dealing with robots
which had evolved behavior). This was a weird bug, and I never could
figure out how the little buggers could escape...until now!

The short story is that you can get updated versions of Pyro from cvs:

http://pyrorobotics.org/?page=PyroDeveloperCVS

The long story is an interesting mystery of the life of a bug. Here is
that story briefly. The Pyrobot client robots move robots in the simulator
by setting their velocities. Then 10 times a second, or so, the simulator
will look to see if the robot will hit something, and if the way is clear,
it moves the robot by those velocities.

Now, there is a kink in this when the robot would run into something. In
that case (and only in that case) the velocities are adjusted. If the
robot is going to hit something, the simulator tries to slow the robot
down a bit to see if it can move a little bit, if it can't move the whole
amount. Also, if the robot runs into something that "gives" (a puck) then
it even loses a little bit of energy/velocity, and transfers this energy
to the puck. (This doesn't work with angular movement, just in the x
direction to keep things simple).

This generally work fine. However, every once in a while a robot
inexplicable runs over an obstacle and runs amuck in the sim wild. This is
impossible. Guesses? Spoiler below.







It turns out that while the simulator is moving the robot, a change in
velocity can come in. Now, when the robot adjusts the velocity during the
robot placement, it actually is adjusting the new velocity rather than the
one it started with.

The first solution I tried was to put a lock/aquire/release on the
velocities, but that really slowed down the user interface. The second fix
which seems to work is to make a copy of the velocities when the simulator
starts to move the robot, and use those during the move. Now, I don't see
any more escaping robots!

(Somehow I don't think this exciting mystery of the escaping robot would
transfer to the big screen...) Any way, try it out. This was big problem
when trying to evolve robots, and they kept getting out of their boxes.

-Doug

-- 
Douglas S. Blank
Associate Professor, Bryn Mawr College
http://cs.brynmawr.edu/~dblank/
Office: 610 526 601

_______________________________________________
Pyro-users mailing list
Pyro-users@pyrorobotics.org
http://emergent.brynmawr.edu/mailman/listinfo/pyro-users

Reply via email to