this is a stupid evolution simulation program

NOTE: you may need to adjust the size of your console window for the maze and
creature information to display properly.

there are eight program options that can be specified by the user at the
command line.

-m filename  load maze from disk (default: maze.txt)
-c           continue the simulation after one lineage has outcompeted the
             others
-p           allow creatures to pass through each other
-M N         set color mutation rate in percent (default: 7)
-l N         set base life (default: 1000)
-n N         set initial number of creatures (default: 1)
-t N         set turn delay (default: 0.05)
-d N         set food duration (default: 1000)
-f N         set feeding interval (default: 2.5) 
-s N         set health and life decrement interval (default: 1)

the turn delay option can be used to alter the simulation speed. depending on
the options used, however, after some time there will be so many creatures with
such high sniff distances that their searching will slow the simulation. in
such a case, the program will decrease the turn delay and run the simulation as
quickly as possible.

the base life, food duration, feeding interval, and decrement settings can
be used to alter the turnover and reproduction rates.

the program recognizes four keystrokes while running.

p    pause
s    save state
l    load save state
q    quit simulation

save states contain the sequences used by the program to keep track of the
creatures, and being saved in plain text, can become quite large. if you have
the bzip2 command on your computer (http://bzip2.org), the program can compress
and decompress your save states automatically if you use the ".bz2" extension.

===============================================================================

this is basically a combination of two programs i wrote. the first was written
idly one day, much like this one. it involved little creatures wandering
aimlessly about a field, looking for food. they could smell food from a
certain distance, depending on an innate and inheritable trait defining the
radius in which they could smell.

once they reached a certain health level, they split off into two
creatures. the new creature would inherit a similar smelling radius from
its parent - either slightly below, above, or equal to the parent's.

the second program was for a computer science class. it involved a mouse
finding its way through a maze using a stack to keep track of where it's
been. in this program, a stack is maintained, but kept to a maximum level
of 7 in order to keep the creature from going around loops multiple times.
the goal is not to escape from the maze, but to survive and have the most
offspring.

this program also uses an improved sniffing technique. it operates
similarly to the class assignment, using recursion to search all possible
paths within a certain distance. the distance the creature can sniff is
also governed by an inheritable trait, which also varies with each
reproduction. as a visual aid, food pellets turn red when detected. also,
an asterisk will also appear in the creature status area, after the
creature's attributes, when it has detected food in the area.

creatures have two properties, health and life, which are subtracted at
regular intervals. health can be replenished by eating food, which is
periodically dropped in the maze. life, however, cannot be replenished,
and furthermore, is reduced by a third with each reproduction. once either
the creature's health or life reaches zero, it dies.

the initial creatures dropped in the maze are also assigned a unique color
(if possible, depending on how many creatures are spawned to start).
this trait, too, is inheritable. let the program run for some time and see
which color comes to dominate (note: 2% of the time, a creature will spawn
a mutant, a child with a different color than its parent's). by default,
the simulation will end when one lineage has outcompeted the others. this
behavior can be turned off with the -c option.

creatures tend to meet their fate in one of two ways. one may die because it
is less fit than the others, and may not be aware of food that other, fitter
creatures are able to sniff out.

the second reason they may die is because they were simply crowded out.
that is, there were simply too many others around for the creature to reach
enough food to survive. this will happen especially if the -p switch is not
used (so that the creatures will bump into each other rather than just
squeeze past each other), or if a creature is especially unfit. of course,
dumb luck may just as easily contribute to a creature's demise as well as its
success.

                                                             enjoy,
                                                             matt arriola

