4.4.3 Obstacle Avoidance
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
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
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.
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.
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.