YouTube RSS

An open source Artificial Intelligence Evolution Simulator

Creating Artificial Intelligence is seen by many as the holy grail of computer science, and many devote their careers to that goal. One of the methods being explored is Evolutionary Computation, and we’re going to take a quick look at an exciting piece of open source software called Evolve 4.0 that uses that method!

“Evolutionary Computation is the general term for several computational techniques which are based to some degree on the evolution of biological life in the natural world.” – Craig Reynolds

What is Evolve?

Evolve 4.0 is an evolution simulator that places organisms into a 2D universe in which they can move, grow, eat, breed, and fight other organisms. Each organism is made up of one or more “cells”, and contains its own genetic language called KFORTH, which plays the role of DNA.

Evolve 4.0 Simulation Screenshot

Two species fighting for dominance and survival, much like life in the real world.

How do the organisms reproduce?

When an organism breeds asexually, its genetic code is copied, and then randomly “mutated” based on some customisable probabilities. For example, a simulation with the same settings as seen in the below settings box would have a 2% chance of duplicating a line of genetic code in the organism’s offspring.

Evolve Mutation Settings

How quickly should creatures evolve? Too much mutation too fast can destroy a species

Sexual reproduction is almost the same as asexual reproduction, except that the first organism releases a spore that contains an exact copy of it’s genetic code, and that spore then sits there until another organism comes along and introduces a copy of it’s own genetic code.

Evolve's Sexual Reproduction

Sexual reproduction, as shown on Evolve's site

The code of the two organisms is then mixed, and again mutated, to produce the offspring.

So mutation is evolution?

Yes! In biological life, organisms mix and mutate their DNA randomly, a process that over millions of years (and a lot of random chance) allows the better suited organisms to survive and reproduce, while the weaker less suited organisms and their DNA die out.

In Evolve the same is true. Newly born organisms are randomly mutated, and that mutation will either give this organism an advantage over the others (and thus make it more likely to take over the genetic pool), or give the organism a disadvantage that makes it more likely to die out (E.g. not being efficient at hunting food, or being unable to reproduce).

The mutation could also give the organism no advantage or disadvantage, if for example the code in the mutation is never actually used. Just as there is plenty of unused junk code in our own DNA, there is also going to be plenty of useless junk code in an Evolve organism’s KFORTH code.

How much complexity does Evolve’s genetic code allow?

Many PC CPUs at their heart can only actually perform a dozen or less specific actions (see RISC Architecture). All the extremely complex things they can do are derived from those dozen actions. Let’s keep that in mind when we look at Evolve’s KFORTH code.

Organism's Status & Genetic Code

An example of an organism's current status, including the organism's full KFORTH Genetic Code

KFORTH gives organisms 22 specific actions, that are either applied to a single cell within the organism, or the entire organism. The actions are interesting and useful, and a creature that evolves to make the best use of these actions could be very exciting indeed. This list of actions is a bit of a read, so feel free to skip past and just take my word for it:

Interacting with the universe

  • OMOVE (The entire organism moves)
  • ROTATE (The entire organism rotates)
  • CMOVE (A single cell moves within the organism)
  • GROW (Produces more cells within the organism)
  • MAKE-SPORE (Produces a reproductive spore)
  • EAT (Eats whatever the cell is touching)


  • LOOK (A cell can see what’s around it, and how far away that thing is)
  • WHAT (Used in LOOK, tells the cell what type of thing it can see)
  • WHERE (used in LOOK, tells the cell how far away something is
  • NEAREST (Finds the nearest thing to the cell)
  • FARTHEST (Finds the farthest thing from the cell)
  • NEAREST2 (Like NEAREST, except it takes a distance value to limit the search radius)
  • FARTHEST2 (Like FARTHEST, except it takes a distance value to limit the search radius)

Communication between cells

  • MOOD (Every cell has a “mood” value, this queries another cell within the organism)
  • MOOD! (Cell sets its own mood value)
  • BROADCAST (Takes a value and sets the “message” register for every cell in the organism)
  • SEND (A cell can send a value to any other cell in the same organism)
  • RECV (Pushes a copy of the message register onto the top of the data stack)

Information about organism

  • ENERGY (Amount of energy the cell has)
  • AGE (The organism’s age)
  • NUM-CELLS (How many cells the organism has)
  • HAS-NEIGHBOR (Checks if there is a cell next to the cell executing the instruction)

As we can see, KFORTH allows for some very complex creatures, and if we look at the limitless complexity in mixtures of commands that can evolve within a organism’s genetic code, we could even eventually reach the kind of complexity we see in some biological life. In a very large scale simulation, at least.

Has anybody ran a long term simulation using Evolve?

Ken Stauffer, the man behind Evolve, ran a 42 week simulation of sexually reproducing organisms, the details of which can be found over on his One Year of ALife blog. That was four years ago, on old hardware that could only simulate 7 million steps a day. The more powerful computers get, the faster simulations can be run. Perhaps you can set up a simulation that can produce interesting results in half the time? Give it a shot!

I’ve started my own simulation using the same basic seed code Stauffer used in his 42 week simulation (which can be found at the bottom of his One Year of Alife page). I created a large world and populated it with interestingly shaped barriers. The top left of the world for example has a “forest” of dotted barriers, while the bottom right has spiral “caves”.

My creatures look black because it's very zoomed out (very large world)

So far, my organisms seem to prefer the nooks and crannies, and avoid the open area of the middle of the world. I’ve also noticed that while they are all able to interbreed as one species, noticeable genetic differences exist in different areas due to isolation, in much the same way humans evolved slightly differently after being forced apart by distance, and an ice age.

Unfortunately my simulation is running on my only free machine, a five year old laptop. Also, as my simulation universe contains more organisms with more opportunity for complexity, in a much larger world space, I can’t get anywhere near the speed of Stauffer’s original year long simulation. He could produce 7,000,000 steps a day, my machine can only produce 290,000. Even so, interesting things are occuring, and I look forward to checking in on my creatures again at the end of today.

One interesting thing I did notice (though I can’t explain it) was that on day one of my simulation the population doubled and remained stable at around 3,000 for a while, before dropping down to around 1,100, the lowest it’s ever been. This could be a long term trend moving towards extinction, or perhaps the organisms have just evolved to be more greedy and thus unable to sustain larger numbers. Who knows!

In conclusion, Evolve is an exciting piece of software you guys.

Wrong Evolution, you guys

My organisms will destroy you all! Especially you, David Duchovny. Especially you.

Interested in seeing your own creatures evolve? Head over to Evolve’s site and download a copy! Like the idea of an evolutionary simulator, but this one’s not for you? Check out Wikipedia’s list of Notable Artificial Life Simulators (Polyworld is quite popular). Want to watch a movie about rapidly evolving organisms? I got you covered bro.

Peace out.

Hey guys, an update on my simulation!

My simulation’s been running for 6 days now, and a snapshot of the world is saved every hour. I grabbed the stats from the snapshots and made two graphs! Click them for full size.

So this first graph shows three things. The number of organisms (which is basically the number of sexual organisms) currently alive, the amount of food (dead organisms), and the number of spores (the “eggs” the organisms lay awaiting fertilisation). Make of it what you will!

First 6 days of my simulation

An initial drop in population was quickly replaced with a huge boom! Then it leveled out....

The second graph shows some information relating to the genetics of the organisms! Logarithmically! Make of it what you will.

First 6 days logarithmic graph

This track shows a bit of genetic information, logarithmically!

5 Responses

  1. bbsaver

    Well… I “used to have” that program but I deleted it ( and I’m crying for that decision…)
    It seem like their web has some problem cause Evolve to cease for existence…
    Sadly, it’s good simulator…

  2. biff

    How does one go about programming something similar to this? I have been wanting to make my own evolution sim, but I have trouble finding tutorials or source code

  3. Tomas


    Recently I made a couple of experiments with evolutionary programming, especially with Avida and Tierra, and I would like to try Evolve too, but 99% of my search went to nowhere. The only thing I found is an archive from 30 Jun 2013, but all the links are dead.
    What happened to Evolve ? Why I’m not able to find almost anithing about the soft. Has anybody the exe ?

    Many thanks

Leave a Reply to Tomas Cancel reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Home Science An open source Artificial Intelligence Evolution Simulator