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.1 Wandering

1. Introduction

An insect that can only walk a straight line is pretty useless. In nature insects rarely walk straight lines for any significant length of time. The ant demonstrates this nicely. Ants typically use random exploration while they are attempting to find food. They make a random turn and follow that path for a random amount of time. Then they make another random turn and continue on again until they smell some food. However, in order for the ant to actually cover any real distance while randomly exploring, it must make sure that the random turns are not to large. If they are, then the ant could just spend its time zigzagging the same ground over and over again while making little progress. However, If the turns are reasonably shallow then it will be able to cover a good amount of territory. This type of behavior is pretty normal for a number of different insects and is not used solely for hunting food. It is also used to allow the insect to learn about its environment. So being able to turn the direction of travel is crucial to the insect so that it can actively explore its environment.

2. Insect Turning

Insect Leg Extension
Figure 1. This diagram shows how an insect extends its legs in order to turn its body. The lower image shows the original orientation of the insect and the new orientation.

The simulated insect that has been presented thus far is only able to walk backwards and forwards in a straight line. Figure showed a picture of the cockroach leg. It had a femur which was responsible for moving the leg backward and forward. This is equivalent to the muscles that move the leg in the swing and stance phases. It also had the tibia which could be used to raise the foot off the ground. However, the tibia also serves another important function in turning the animal. If the insect keeps its foot on the ground it can use the tibia on one side to push itself and pull the tibia from the other side in. The femur is also involved in this. It can move up and down slightly to help keep the foot on the ground when the tibia is extended. Figure 1 shows a simple diagram of a cockroach while it is using extension of its legs to turn its body. The simulated insect uses a simplified version of this principle to allow it to turn. It ignores the actions taken by the femur and simply assumes that if one of the legs extends while the foot is on the ground then it is pushing the insect in the opposite direction with a force equivalent to the amount of extension. Each of the legs can be extended and the force will be applied as a vector. Extending the right rear leg during walking will turn the insect clockwise. Extending the right front leg will turn the insect counter-clockwise. Extending both front legs the same amount will result in no net turn of the insect.

3. Turning Controller

Turning Controller Neural Layout
Figure 2. This is the neural layout for the turning controller.

Figure 2 shows the turning controller that is used in the simulator. There are two motor neurons that directly control the extension of the front two legs. They are called Leg Extension Right (LER) and Leg Extension Left (LEL). Even though all of the legs can be extended, the system currently only extends the front legs. These motor neurons use a simple linear system to relate the firing frequency of the neuron to a given leg extension value. This allows the insect to control the degree of turn. A large firing frequency in the motor neuron generates a large extension of the leg, and causes a larger turn of the insect. Connected to each of the two leg extension motor neurons are the turning control neurons. They are named Right (RT) and Left (LT). Notice that LT stimulates LER and RT stimulates LEL. This is because to turn right the insect must extend the left leg. No other neurons are connected directly to these motor neurons. Any system that wants to affect the turning of the insect connects to the left and right neurons. These are the basic neurons that are important for the core function of turning the insect.

Figure Eight Example
Video 1 This video shows the insect traveling in a figure eight pattern

Video Size: 3.8 Mb

Video 1 shows some output that is generated when an insect travels in the figure eight pattern. To produce this behavior 1 na of current was injected into the RT neuron for 16 seconds and then the same amount of current was injected into the LT neuron for the 16 seconds.

4. Random Wandering Controls

Now that the insect has the ability to turn left or right, and can control how large a turn to make, it is possible to implement random wandering. The key neurons to this system are the Random Burst Right (RBr), Random Burst Left (RBl), and the Non-Wandering Control (NWC) neurons. These can be seen in figure 2. Rbr and RBl are random neurons that use an inverted bell curve to determine the amount of current to inject into the turning neurons. The inverted bell curve is used in an attempt to make sure that the turn is usually small, but is occasionally large. The two random neurons synapse on the LT and RT neurons to randomly turn the insect. However, it should not be turning randomly unless it is actually wandering to try and find food or explore. If it began randomly turning while it was homing in on food it might lose the chemical scent and starve to death. So it is important that the insect be able to control the wandering behavior. This is what the NWC neuron is for. When NWC is active it strongly inhibits the two random bursters and makes sure that they can not fire. Finally, there are two other neurons that are involved with controlling wandering. The first is the Stop neuron that was discussed during the locomotion controller. It also strongly inhibits the two random neurons. This keeps the insect from trying to extend its legs to turn while it is stopped. The other neuron is the Locomotion Gate Control. The insect should only try and implement the wandering behavior if it is actively moving. The two random bursters are setup in such a way that they will not be able to fire unless they have a minimum stimulation from the locomotion controller. This, plus the Stop neuron, insures that the insect will not attempt to turn around while it is stopped to eat.

Wandering Example
Video 2. This video shows the insect randomly wandering in its environment.

Video Size: 7.8 Mb

5. Subsystems

The turning controller in figure 2 shows several different subsystems that are connected to the turning neurons. These are the edge following, appetitive, and obstacle avoidance systems. These systems all use the turning controller to perform their functions. They will each be discussed in more detail in the following sections.

6. Overview

Using the principle of leg extension the insect can quickly change its direction of travel. By varying the amount of extension for the front legs it can also determine the amount of rotation that is applied. This ability, coupled with some randomly bursting neurons, gives the insect the ability to wander randomly about its environment. The insect can use this behavior to actively search for food and to explore. This is a very important function for the insect. If it does not find food before its energy supplies are exhausted then it will die. It is very unlikely that the insect will always be within sensor range of food when it starts getting hungry. It must find the food before it can eat, and it is the random wandering that allows it to do this. The next section will build on the turning controls outlined here in order to implement another very important system, the edge followers.

<< 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:

Copyright © 2002 by David Cofer. All rights reserved.