Evolve

Evolve

[Go to the Download page]

Preface

The Evolve application is a simulator that I have been developing since 1996. It has evolved just like the creatures that live in the simulator evolve. It started out without any GUI and I had to use perl scripts to convert the universe into a postscript file for viewing. This version is a complete windows application with a well designed GUI and lots of features for examining the evolved creatures.

Table of contents

Introduction:

The Evolve application is a windows GUI written completely using ISE Eiffel 4.5. I have prepared a quick overview of the software
here.

Eiffel Program

This program is written in Eiffel. It is my first eiffel program. This program can be used by anybody who wants to see how to program using GOBO yacc as well as windows GUI programming using WEL.

Genere

This program is a simulator of artificial life. A virtual universe is created that supports the basics of evolution: Replicators and cummulative selection. Several simulations exist that all try to do related things:
  1. Primordial Soup simulations: These simulators begin with simple rules and attempt to cause the emergence of replicators.
  2. Artifical life: The machinery for replication is the starting point. And the goal is to evolve better and better replicators.

The Evolve program described here is most definately (2). In fact I tried to emulate in my universe, the same structure of cells and organisms as we have in real-life.

Evolve can be thought of as a union of the game of life and core wars. The game of life presents a very simple two dimenional universe, with some basic rules that cells in the universe follow (Evolve has a slightly more complext set of rules). Core wars is a virtual compute running many programs in a shared memory space (called core). Each program tries to copy itself and crowd out other programs.

Evolve uses a sophisticated assembly language for the control of organisms and cells. This is the equivilant of our DNA. The size of these programs is unbounded and therefore very complex behaviors can evolve. Genetic programs do not run in a shared memory space, each cell has its own virtual computing machine that includes registers, bit flags and a small stack. A an organism can have many cells all executing different parts of the same genetic program. It is therefore possible for cells to specialize their function, and thus achieve even more complex behaviors.

Differences

Most artifical life simulators use a very restricted genetic layout. One program for example, called "Darwin Pond" has about 8 or 9 genes which are simple floating point numbers. All the logic for reproduction and consumption and movement are hard coded in the simulation. There is very little genetic variation that can occur. The genetic programming language for Evolve is unlimited in size and therefore extremely advanced behavior for organisms can emerge.

Biomorphs also have a limited set of genes, and the selection process is through user interaction. In the Evolve program, the selection process is part of the simulation.

Some simulators run short scenarios with a small handful of organisms, and then after a fixed period of simulation time, the best organisms are retained and the rest are eliminated. Then a new scenario is started. The Evolve program is more realistic. In Evolve there is a virtual universe in which thousands of organisms live and reproduce. The simulations you will run are intended to run for millions of simulations steps, with hundreds of millions of births and deaths.

History:

In 1996 I read a wonderful book by Richard Dawkins, The Blind Watchmaker that in addition to providing a clear description of the workings of evolution it also described some computer software called biomorphs.

His biomorphs would evolve by mutating a small set of genes through successive generations. However the selection process was by using input from the user. The user selected organisms based on whatever criteria they wished.

I got to thinking that it would be more interesting to have a complete simulation of evolution, including a selection process that was based on only one criteria: Survival. I also wanted a more sophisticated mechanism for genes.

Richard Dawkins description of the power of cummulative selection was so convincing that I imagines a sufficiently good simulation of this process would eventually evolve some very "smart" creatures.

My idea was to create a simple 2 dimensional universe using finite elements. Conceptually the universe would consist of discrete locations (Such as (0,0), (5,4), etc...). There would not be any bounds to this universe, and creatures could roam in virtually unlimited directions (North, South, East and West).

The entities that would inhabit this simple world consisted of organisms. Every organism would occupy one or more locations. The organism would be a series of cells that all had to be physically located next to each other.

Each organism would consist of a genetic program. Each instruction would encapsulate a very simple operation. For example the instruction "REPRODUCE NORTH(#10)" would cause the organism to spawn a copy (with possible mutations) 10 units north of the cell that executed the instruction. Other operations included: MOVE, CONSUME, NEW, DIE.

To make the range of behaviors that could evolve more interesting I included GOTO and a few other instructions that were purely programmatic in nature.

I had a spare Sun workstation that I hoped to run this simulator for months at a time, and periodically I would examine the current universe to see what "smart" creatures had evolved.

The initial version was not very good. For one thing I didn't have any GUI. The only way to examine the universe was to dump the state of the universe to a text file. I had a perl script the generated a postscript file that I could view using Ghostscript. But the results and interactivity was lacking. So two years later in 1998 I pulled to orginal code off of my Sun workstaiton and decided to port it to Borland Builder C++. It was very easy to get a simple GUI going and I was very excited and pleased to run a simulation and be able to see the simulation results.

During this time I enhanced the instruction set. I realized that in real-life organisms, each cell has a state seperate from the other cells. You nerve cells are different from your skin cells. I added registers and flags and a stack to each cell. The genetic program was shared by all cells in the organism (just like our DNA is common to cells, but each cell does different things based on state).

I continued to enhance this version. I added many nice GUI features like zoom, cut/paste. I would periodically revisit this program and run simulations for a couple of days but I never seemed to evolve anything very interesting.

One of the problems was the unbounded universe. The creatures would just move in a single direction and go off into inifinity. My model for rewarding organisms with energy if they consume other organisms had problems. It was unstable. Depending on the parameters I used, I either got an exponential growth of organisms (and the machine would run out of memory). Or the creatures would die off quickly.

I continued to tweak my universe model. I added a "crowded cells" parameter so that if the carrying capacity of the simulation reached a certain level, then it would become harder and harder for organisms to reproduce. The amount of energy needed to reproduce would dynamically change based on the total number of cells in the universe.

Anyway, after sufficient tweaking the simulation began to exhibit the characteristics of cummulative selection, and I was happy.

Then in 2001, I decided to re-implement the entire simulation in Eiffel. The main goal was to learn eiffel. But I made several improvements to the program during this time. One improvment was adding Barriers to the universe. A "barrier" is a way to limit the universe to a enclosed region. When I ran the simulation with an enclosure, I began to see much more evolution of smart creatures. They moved around more, and they would change their direction and interact strangely with other creatures.

The version of Evolve that is being described is the latest and greatest version.

Related Software:

Some other simulations that allow the user to explore genetics, artificial life and evolution:
Quick Overview...



Last changed: April 17, 2001 Evolve (c) 2001 Ken Stauffer ken@kenstauffer.com