L and D

by Quark March-August, 2007
Written in the Euphoria Programming Language
Euphoria link: http://www.rapideuphoria.com/
Uses w32lib.ew (David Cuny, Derek Parnell, and others),
Win32lib IDE (Judith Evans),
win32dib.ew  (Tommy Carlier),
 idle.e (Ryan Johnson).
Thanks to all associated with these tools.
 

L and D Screenshot
L and D Screen Shot


Table of Contents


The Basics of L and D


L and D is an abstract representation of a pond and the life in it. 

There are four types of colored blocks which represent water (blue), organics (black), plants (green), and animals (red). 


The blue water blocks represent a medium and space to inhabit. 

The black blocks are organics which are needed by plants as nutrient. 

There is a one in two hundred-and-fifty chance any given black block will be swept away by currents.  Besides the black blocks, organics include the left, right, and bottom pond edges. 

When plants or
animals die, they become organics

Each plant or animal "contains" its own controlling number values in a sequence. 

Age of plants and animals increases with each iteration and vitality decreases.  When a plant or animal divides, the age of each resulting being drops to one (1) and the vitality is set to a standard value.

Each plant or animal contains an internal "breeding age" and a maximum life span.  These vary from individual to individual in the course of time. 

The green blocks are plants that get sunlight and increased vitality with each iteration,  but the sunlight dims with increased depth and so becomes less"nourishing" as the depth of water increases.  When a plant has enough vitality (from sunlight) and is of "breeding age", it will divide IF it is in touch with an organic AND it is next to a  blue block which the new plant will occupy. 

Animals eat plants to gain vitality.  Like the plants, they will divide when they reach breeding age AND have enough vitality AND are next to a blue block.  Animals can move and their likelihood of doing so increases with age.

Built into L and D is the simplest sort of evolutionary capability.  Each plant and animal has a pair of "genes" for increasing, decreasing, or not changing the breeding age and the maximum age of descendants.  They pass on such tendencies to a new member at the time of a split.  This increase or decrease has limits. 

Also, there is a small chance a gene will change.  Besides inborn abilities (e.g. animals can move) beings can also evolve a "strategy" based on variations in these two ages to enhance their chance of survival.  The strategy is based on survival and is never static -- a new challenge may modify the value of an old evolved response.

[Top]

Layout of L and D

Here is another screen shot :

L and D Screenshot

 
On the left side are the Start/Stop button, the Pause button, and the Pond-size radio buttons.   At the bottom-left are the Save BMPs checkbox (to save the graphic images at the bottom of the window), and the labels and colors associated with the graph of the evolution of the breeding and maximum ages.

On the right, the Help button brings up this html help file, and below are the radio buttons that control which iterations are printed to the screen (this can greatly speed up the progress of L and D).  The last checkbox controls whether a text report (c:\ldreport.txt) is generated or not (I may delete this functionality in future versions as the graphs now show more clearly how the evolution proceeds).

The graph at the bottom of the screen shows the evolution of the average of the breeding and maximum ages as time goes on.  It keeps track of the viewed iterations.  The top and bottom of the graph represent the maximum and minimum limits on the ranges of the breeding age and maximum age values.


[Top]

How to use L and D

The button "Start L and D" runs the program, becoming  "Stop L and D" to stop it.

The "Pause" button will pause the program. 

The graph at the bottom of the L and D window shows the averages of the current breeding and maximum  ages of the plants and animals through time.

The radio (or option) buttons marked Pond 1875 up to  Pond 30000 allow the user to set the pond size.  If the pond is not active, then clicking a radio button simply sets the pond size.  If the pond is active when the radio button is clicked, then the pond is cleared and the program is reset and ready to be started with the new pond size.  The smaller pond is more active and easy to see, the larger ponds last much longer before die-out.  The larger the scope, the more stable the system.

The program is slowed down when it prints to the screen, so use the radio buttons on the right to control that printing.  The user can watch all iterations, every other one, every fourth, eighth, and so on up to every 1024th one.  Experiment with this -- the user can control how the pond  life flows and set it as mood dictates.

To save bitmaps of the progress of L and D, set the Save BMPs checkbox.  The images will be saved to the root directory of the C: drive with filenames indicating date, time, and iteration-value  when saved.  These images may be viewed in a graphics program such as MS Paint or the free program IrfanView.

For the smaller ponds, there is no guarantee any particular run of L and D will continue for a long time (sometimes the fates are not kind), but it may run quite a while as the animals and plants evolve a stable relationship.  It is a good idea to run a compiled version of L and D to increase the speed of the program.

[Top]

Some history and a few comments:

This program is the latest incarnation of L and D.  The first one was in about 1993 programmed in BASIC, then later came a C one, then assembler.  The latter was very fast, but hard to modify.  These versions were a little more complex than the current one, which demonstrates the pond world in clearer terms.  Hope you enjoy the latest version and watch it for a while (it takes time to appreciate the changes).

The plants and animals are controlled by the rigor of rules, but there is also chance.  In a larger sense, this combination of rigor and the "spooky" qualities of the universe (such as chance or quantum mechanics) seems mysterious.  While there are implications in L and D to think about, it is also possible to just enjoy its colorful variety.  It is ever-changing and never-repeating.

---

Note: to run or compile the L_D17.exw file, the user needs the latest version of win32lib to be in the EUINC include path.  Otherwise, all needed files are in the L_D17.zip file.  Keep the LD_Help.html and .gif files in the same directory from which the L_D17.exe file is run.
 



Quote: "Birth is just anteing up; every action thereafter is a bet."
-- from the book "Chances Are..." by Michael Kaplan and Ellen Kaplan
(Penguin Books, 2007)

[Top]


End help file