An Introduction to Genetic Algorithms - Boente
An Introduction to Genetic Algorithms - Boente
An Introduction to Genetic Algorithms - Boente
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Chapter 3: <strong>Genetic</strong> <strong>Algorithms</strong> in Scientific Models<br />
reservoir is empty. Thus, bugs must find food continually in order <strong>to</strong> survive.<br />
Each bug's behavior is controlled by an internal lookup table that maps sensory data from the bug's local<br />
neighborhood <strong>to</strong> a vec<strong>to</strong>r giving the direction and distance of the bug's next foray. The sensory data come<br />
from five sites centered on the bug's current site, and the state at each site is encoded with two bits<br />
representing one of four levels of food that can be sensed (00 = least food; 01 = more food; 10 = even more<br />
food; 11 = most food). Thus, a bug's current state (input from five sites) is encoded by ten bits. The vec<strong>to</strong>r<br />
describing the bug's next movement is encoded by eight bits—four bits representing one of 16 possible<br />
directions (north, north−northeast, northeast, etc.) in which <strong>to</strong> move and four bits representing one of 16<br />
possible distances <strong>to</strong> travel (0–15 steps) in that direction. Since there are 10 bits that represent sensory data,<br />
there are 2 10 possible states the bug can be in, and a complete lookup table has 2 10 = 1024 entries, each of<br />
which consists of an eight−bit movement vec<strong>to</strong>r. Each eight−bit entry is considered <strong>to</strong> be a single "gene," and<br />
these genes make up the bug's "chromosome." One such chromosome is illustrated in figure 3.12. Crossovers<br />
can occur only at gene (lookup table entry) boundaries.<br />
The simulation begins with a population of 50 bugs, each with a partially randomly assigned lookup table.<br />
(Most of the entries in each lookup table initially consist of the instruction "do nothing.") A time step consists<br />
of each bug's assessing its local environment and moving according <strong>to</strong> the corresponding instruction in its<br />
lookup table. When a bug encounters a site containing food, it eats the food. When it has sufficient energy in<br />
its internal reservoir (above some predefined threshold), it reproduces. A bug can reproduce asexually (in<br />
which case it passes on its chromosome <strong>to</strong> its offspring with some low probability of mutation at each gene)<br />
or sexually (in which case it mates with a spatially adjacent bug, producing offspring whose genetic material<br />
is a combination of that of the parents, possibly with some small number of mutations).<br />
To measure evolutionary activity, Bedau and Packard kept statistics on gene use for every gene that appeared<br />
in the population. Each gene in a bug was assigned a counter, initialized <strong>to</strong> 0, which was incremented every<br />
Figure 3.12: Illustration of the chromosome representation in the Strategic Bugs model. Crossovers occur only<br />
at gene (lookup−table entry) boundaries.<br />
82