4.5.3 Dying
1. Introduction
All things end, and this includes the virtual insect. Future versions of this simulator
will be used with genetic algorithms to attempt to grow the neural network that the insect
uses for its brain. That will require defining a fitness function that can be used to
determine which insects are more fit, and thus more likely to survive. And a large part of the
fitness of an animal will be determined by whether or not it is able to survive on its own.
If it can not find and eat food it will eventually die, and this will weed out unfit individuals.
(It is more complicated than this, but lets save that for later.) In the current simulator
the insect will die when its energy supply reaches zero. However, It can not die of old age. So as long
as the food supply holds out and the insect is always able to eat food, it will continue to
putter around its environment. There are no neurons involved in death of the insect. It is
simply part of the simulation code. When the energy level of the insect hits zero then it
can no longer move, and its neurons are no longer active. Also, the insect turns a cold,
dead, blue color in the simulator when it dies.
| Dying |
 |
|
Video 1. This video shows the insect dying.
|

Video Size: 324 Kb
|
|
|
|
This is a simple example that shows the insect dying. It starts out with a really low
energy level of 0.03. This is only enough for it to walk a short distance. It then dies,
turns blue, and no longer moves.
|