Search the Mindcreators site: 

Update Alert!

I have now finished work on a much more advanced version of the insect simulator named AnimatLab. AnimatLab is a software tool that combines biomechanical simulation and biologically realistic neural networks. You can build the body of an animal, robot, or other machine and place it in a virtual 3-D world where the physics of its interaction with the environment are accurate and realistic. You can then design a nervous system that controls the behavior of the body in the environment. The software currently has support for simple firing rate neuron models and leaky integrate and fire spiking neural models. In addition, there a number of different synapse model types that can be used to connect the various neural models to produce your nervous system. On the biomechanics side there is support for a variety of different rigid body types, including custom meshes that can be made to match skeletal structures exactly. The biomechanics system also has hill-based muscle and muscle spindle models. These muscle models allow the nervous system to produce movements around joints. In addition, there are also motorized joints for those interested in controlling robots or other biomimetic machines. This allows the user to generate incredibly complicated artificial lifeforms that are based on real biological systems. Best of all AnimatLab is completely free and it includes free C++ source code!

4.4.3 Obstacle Avoidance

1. Introduction

Even with the insects ability to follow walls and detect corners, it still may end up getting stuck against a wall. There are any number of scenarios that could make this happen. One common way is if the insect is about to run into a wall and some other system still has just enough control to impede its turn away from the wall slightly. It will not turn quickly enough and will impact. Then the insect will try and go forward and to the side. But the obstacle will prevent the insect from going forward or from turning. So it just kind of skates along the edge of the wall completely stuck. What is needed is a way to let the insect detect that it has been stuck, and then correct the problem.

2. Obstacle Avoidance Neural System

Obstacle Avoidance Neural Layout
Figure 1. This is the neural layout for the obstacle avoidance controller.

Figure 1 shows the simple neural net that is used by the insect to get itself unstuck from an obstacle. The Obstacle Top Left (OBStl) and the Obstacle Top Right (OBStr) neurons are contact sensor neurons. When the insects upper left side of the body bumps into an obstacle then the OBStl neuron will fire. When that neuron fires it immediately begins trying to turn the insect to the right in an attempt to avoid obstacle. If the insect has only made incidental contact with the wall and is still able to turn freely then it will most likely keep the insect from getting stuck on the wall in the first place. However, if the insect does get stuck then that is where the Obstacle Memory (OBSM) neuron kicks in. This neuron has a reasonably large capacitance, gain, and threshold voltage. The threshold voltage is setup so that it is a few millivolts below the steady state voltage of the neuron. Because of the large capacitance the membrane voltage increases slowly. Once it exceeds the threshold voltage the high gain allows the neuron to fire rapidly, and begins stimulating the Backward Control (BC) neuron to make the insect begin to back up away from the wall. At that point the obstacle neuron will no longer be firing because the insect is no longer in contact with the wall. OBSM will no longer be stimulated, and will fall below the threshold voltage and the insect will stop backing up and will begin to walk forward once again. During the whole time it is backing up the appropriate turn neuron is stimulated to make the insect turn away from the wall. This system should not kick in unless the insect is well and truly stuck against the wall. Incidental contact should not cause the insect to begin backing up. Only prolonged contact should elicit that behavior. The values of the capacitance, synaptic weights, and threshold voltage are all setup in such a way to insure that the correct behavior is displayed. The key to this is the time it takes to charge the OBSM neuron enough to go above the firing threshold. The values are setup so that the insect must be in contact with the obstacle for approximately two seconds before it will begin to back up. Finally, the middle legs also have contact sensors. These sensors will usually be stimulated when the insect is trying to turn around an outside corner. If it turns to quickly then the middle leg can get stuck. To avoid this the middle legs detects contact and cause the insect to turn slightly away from the corner.

3. Avoidance Analysis

Stuck On the Wall
Video 1. This video shows the insects getting permanently stuck on the wall.
Video Size: 600 Kb

This is the before video. For this example the two synaptic connections between the obstacle sensors and the OBSM neuron were reset to zero. So it will attempt to turn away from the wall when it comes into contact, but it can not back up to get away from the wall. Also, an artificial current is injected into the LT neuron to briefly counteract the edge following systems naturally tendency to turn the insect away from the wall. This is done in order to manually get the insect to be stuck for this example. In this version, when the insect smacks into the wall it stays there and just sort of glides along the edge. This is because the insect is constrained from moving forward, but it does have a little force pushing it to the side. This is mostly an artifact of the simplistic physics simulation used here.

Getting Out of the Trap
Video 2. This video shows the insects getting stuck on the wall, and the extricating itself.
Video Size: 820 Kb

This is the after video. Now when the insect gets stuck it behaves similarly to the above example for the first two seconds, and then suddenly backs up just a bit and turns away from the wall. It then begins to implement its normal edge following behavior. So just these two simple connections can change the insect from something that will eventually die with its head against the wall, into something that gets out of the trap and moves on to continue its explorations.

4. Overview

At this point the insect is pretty versatile at exploring its environment. It can follow around the edges of all kinds of obstacles, randomly explore its surroundings, and if it does happen to somehow get stuck in a bad situation it can get itself out of the trap and keep on going. However, even with all of the neat new abilities to explore its environment that have been given to the simulated insect so far, it will still not live very long with the current neural network. It still can not find food and eat! The next section will start to address this problem by allowing the insect to detect and find food.


<< Previous Contents Home Next >>

MindCreators.Com is edited and maintained by David Cofer. If you have any questions, comments, or just want to discuss the contents of this website, then email me at: dcofer@MindCreators.com.

Copyright © 2002 by David Cofer. All rights reserved.