loy%sunburn.West@Sun.COM@gtx.UUCP (Bob Loy) (07/19/89)
#============================================================================#
Whales & Plankton Introduction and Posting
#----------------------------------------------------------------------------#
This is to announce the posting of source to "whpl.c" and associated
files, more easily referred to as "Whales & Plankton", to USENET, and more
specifically, to comp.sources.misc.
A README file is included in the source archives with instructions on
compiling and running Whales & Plankton (runs fine on a Sun 3; should be
UNIX-portable, but no guarantees for any particular system).
Complete documentation is included within the source, easily found by
an editor or a search utility such as "grep", keying on the character '@'.
What you should find in comp.sources.misc will be 13 shell archive
files which you can convert back to compilable source with the following
shell script for C-shell users (or just type in each line by hand once
you get the whpl*.shar files loaded into a spare subdirectory):
#!/bin/sh
set -v
sh whpl01of13.shar
sh whpl02of13.shar
sh whpl03of13.shar
sh whpl04of13.shar
sh whpl05of13.shar
sh whpl06of13.shar
sh whpl07of13.shar
sh whpl08of13.shar
sh whpl09of13.shar
sh whpl10of13.shar
sh whpl11of13.shar
sh whpl12of13.shar
sh whpl13of13.shar
If you already use the Bourne shell, you can delete the top line.
This cover letter has been posted to the following newsgroups:
comp.ai, sci.bio, & sci.misc.
#----------------------------------------------------------------------------#
Whales & Plankton is a program which models a small ecology and is a
study of genetic algorithms.
The inspiration for it comes from two of A. K. Dewdney's Scientific
American Computer Recreation columns: "Sharks and Fish Wage an Ecological
War on the Toroidal Planet Wa-Tor" of December, 1984, and from November,
1985, "Exploring the Field of Genetic Algorithms in a Primordial Computer
Sea Full of Flibs" [Finite LIving BlobS].
For this program, the finny inhabitants of the planet Wa-Tor have been
replaced: The fish by very dumb plankton (they just float there and
multiply), and by whales who, if they are not 'smart' enough at finding
plankton, get replaced by descendents who are. The whales originally have
randomly loaded gene sets which guide their movements over the two dimen-
sional array looking for, and eating, the plankton. Periodically, the
whales mate and produce offspring by mixing different genes from different
parents. Included is the Darwinian pressure of only allowing the most
successful whales to procreate.
As an ecological model, Whales & Plankton is almost mindlessly simple,
with only one predator and one prey.
As a platform for study of genetic algorithms, it has certain strengths
and certain weaknesses:
Mating different parents to improve the algorithm -- The 'chromosomes'
involved are not precisely the classic Holland character strings,
but they do get a thorough mix, and the whales do indeed improve as
the generations proceed. There are over 400 different 'breeds' of
whales which can tested by the whpl system.
Gene Crossover -- The fundamental unit in whpl.c is the 'gene'. The
chromosomes are made up of a certain number of genes, which are
freely mixed in the mating algorithm. The ability to cut the chromo-
somes themselves, which would be a more complete crossover algorithm,
is not presently implemented.
Mutation -- Not presently implemented, but the necessary "hooks" are
already in place for it to be added to the code.
Whales & Plankton is ready to be run as is. It has a rich number of
options available which can be typed on the command line at run time. Any
user can use it to create generations of any of the breeds of whales and
monitor the changes in the viability of the offspring.
Nevertheless, Individuals with C programming experience will be able
to make deeper modifications to how it operates. Notes in the README
file included in the source archive touch on possible modifications, and
relate them to levels of C-language expertise ranging from beginner to
expert. But again, hopefully Whales & Plankton will turn out to be
interesting to many people, not just C programmers.
Whales & Plankton is of course, my child, my labor of love, and all
that. Naturally I would be interested in hearing about anyone's experi-
ences with it. However, the documentation in the source code may seem to
imply that further versions are forthcoming soon, and from there one might
be tempted to assume that I am supporting it almost as a commercial product.
The answer is no, in both cases.
I am proud of whpl.c, and hope it is not so esoteric that there won't
be somebody out there who gets some use and enjoyment from it. But it
is also time for it to stand on its own. It has been well and success-
fully tested, and the bugs which remain (and there are always some bugs)
should be minor ones. Use it as a starting point for your own explorations,
both in genetic algorithms, and just possibly, in C programming.
#============================================================================#
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
Bob Loy | Life is the detour you take on the
...!sun!sunburn!gtx!loy | way to where you're really going.
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~