evolution in a visual virtual world

26
Evolution in a visual virtual world Pacman as an evolving organism

Upload: onofre

Post on 22-Feb-2016

46 views

Category:

Documents


0 download

DESCRIPTION

Pacman as an evolving organism. Evolution in a visual virtual world. The simulated world. A 2D world of moving “animals” ala Pacman eating “plants”. Graphically represented Different zoom levels Run status Extra info Torus topology (no boundaries). Run options. Size of the world - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Evolution in a visual virtual world

Evolution in a visual virtual world

Pacman as an evolving organism

Page 2: Evolution in a visual virtual world

The simulated world A 2D world of moving “animals” ala

Pacman eating “plants”.

Graphically represented

Different zoom levels

Run status Extra info Torus topology

(no boundaries)

Page 3: Evolution in a visual virtual world

Run options Size of the world Initial population Max attainable energy per

grown plant Value of growing plants (vs grown) One metabolic parameter Graphic, background or

analysis mode Loading of previous run Switching on or off evolution (mutation)

Page 4: Evolution in a visual virtual world

Plants

2 variantsGrowing – dark green, will turn into a

grown plant after a given timeGrown – green, can seed growing plants

into unoccupied neighbor areas. Eaten by the “animals”, who can

focus their digestion on either grown or growing plants

Page 5: Evolution in a visual virtual world

Animals Moves about in the world. Eat plants Can multiply Has a number of characteristics attached to

them1) Phenotype2) Fixed status (ID, birth time, death time, parent)3) Dynamic states: energy, location, direction of

movement, activity, age Mutations directly on the phenotype

(genotype=phenotype). Almost no pleiotropy (Diagonal G matrix)

Page 6: Evolution in a visual virtual world

Phenotype Sensory parameter

Sense of touch Behavioral parameters

Probability of going straight, turning left, turning right or sitting down and trying to eat

Probability of eating growing and grown plants (conditioned on touch)

Probability of using memory to start in the same direction as one stopped.

Physiological parameters Speed Turning speed Coloration (neutral) Size/mass

Reproduction parameters Energy level for reproduction

(*mass) Mutation rate

Metabolic parameters Specialization for eating

grown or growing plants. Mass

Page 7: Evolution in a visual virtual world

Energy consumptionEnergy is consumed by Creature maintenance (proportional to mass) Movement

Proportional to mass*speed2

Starting after having stopped costs more than just maintaining a speed.

ReproducingParent looses energy proportional to its mass,

then splits the energy in half between it and its child.

Energy0 means death.

Page 8: Evolution in a visual virtual world

Energy gainEnergy is gained by eating plants (either

stopping randomly and trying to eat, or by sensing a plant and deciding to stop).

Digestion is divided into that for grown plants, Do, growing plants, Dg, and unused digestive capabilities (Du=1-Do-Dg). Eating grown plants yields energy

Eo=Dob-constant (b is a metabolic run parameter).

Eating grown plants yields energy Eg=Dg

b-constant.

Page 9: Evolution in a visual virtual world

Lession 1 – evolution works

Phenotypes for which I know in which direction they should go, actually do go that way.

Sense of touch as a function of timeUnused digestion (x-axis) as a function of time. Coloration indicates probability of eating a growing plant, if you can feel it.

Page 10: Evolution in a visual virtual world

Lession 2 – Evolution doesn’t just happen to the phenotypes for which we have a clear expectation

The energy limit for reproduction has increases as a function of time, here.

r

Page 11: Evolution in a visual virtual world

Lession 3 - Evolution can save a maladapted species from extinctionWithout

evolution (no variation for selection to act on):

With evolution:(Simulation run for 8 times

the time as for no evolution, and still no extinction for two simulations)

Size of population

Extinction

Size of populationDigest grown phenotype

Page 12: Evolution in a visual virtual world

Lession 4 – Sometimes evolution will go in surprising directions:Looks like

specialization on digesting grown plants is preferred:

But then the animals “change their minds”:

Page 13: Evolution in a visual virtual world

Lession 5 – Randomness matters (a little):If we start with

the same run conditions and the same animals, we don’t get exactly the same evolutionary trajectory.

Digest grown, two runs

Number of animals, two runs

time

Page 14: Evolution in a visual virtual world

Lession 6 – It’s not just the mean that’s changing

While we may see evolution in the changing mean, the variance may also be changing:

Page 15: Evolution in a visual virtual world

Lession 7 – Speciation is hard to arrange

The division into growing and grown plants was an easy extension to allow for speciation.

Speciation only seen for one run with extremely fine-tuned digestion setup and a huge world.

Page 16: Evolution in a visual virtual world

Lession 8 – Extinction is a possibility, but not a certainty on reasonable time scalesWith contingency and

(pseudo)randomness, there’s always a chance that the population will dwindle and disappear.Eventually all such

populations will go extinct.

However, that doesn’t need to happen in a ludicrously long time.

Histogram of number of animals for non-evolving population given a little more energy per plant.

time(a huge amount of it)

#animals

Page 17: Evolution in a visual virtual world

Lession 9 – Sometimes you can get too much of a good thing

If I pump too much energy into each plant (or increase the hunting efficiency) then extinction by over-grazing becomes a near certainty.

Page 18: Evolution in a visual virtual world

Lession 10 – Vulnerability to extinction goes down with increasing “world” size

Same run parameters, but world area x100:

Page 19: Evolution in a visual virtual world

Lession 11 – Predator-prey cycles evolveLarge world, mutations switched on:

It might look like the population size is getting more noisy with time…

But it’s really predator-prey cycles.With evolution switched off, the population would crash, or with slightly higher energy levels, stabilize.

#animals

time

Page 20: Evolution in a visual virtual world

A look at Lotka-Volterra models for predator-prey relationships

Lotka-Volterra:

With low k and c, the deterministic (without noise) system will stabilize to a single value.

With stochasticity, the process will nevertheless reach a stable distribution.

)(

)(2

)(

)(

LtLL

HtHHH

LdBdtHd

kcHLLadL

HdBdtHd

cHLHbHadH

Catchment efficiencyAdvantage of catching each prey #animals

time

Page 21: Evolution in a visual virtual world

Lotka-Volterra models – gradually increasing hunting efficiency

In the start, the system remains deterministically stable, but quickly becomes stochastically cyclic.

After a while, cycles even without noise.

Cycles become more and more extreme. Population under considerable extinction risk.

time

timetime

#animals

#animals

#animals

Page 22: Evolution in a visual virtual world

Lession 12 – Adaptive evolution has no foresight – Darwinian extinction!

For a particular run option, a non-evolving system seem to work stably.

The corresponding evolving system develops gradually more extreme predator-prey-cycles until the plants are wiped out. The animals then starve to death.

It’s entirely possible for a species to adapt itself to death! *

time(a huge amount of it)

#animals

time

#animals, #plants

* Colleen Webb (2005): A Complete Classification of Darwinian Extinction in Ecological Interactions, The American Naturalist 161(2), DOI: 10.1086/345858

Page 23: Evolution in a visual virtual world

Lession 13 – Effects of Darwinian extinction on choice of starting conditionsPoor starting phenotype (low sense of touch/digestive capabilities) means either immediate extinction due to inefficiency (low plant energy) or later Darwinian extinction (high plant energy).

Can’t start off with having too much evolutionary potential, that is.

Darwinian extinction seems somewhat softened by world size.

Page 24: Evolution in a visual virtual world

Lession 14 – There is randomness in Darwinian extinctions alsoDid 15 runs with under the same run

conditions.A histogram of time to system crash

shows stochasticity. Not an exponential distribution, though.

Phenotype at end also varies a little (about 7% for important phenotypic characters).

For some runs, the phenotype was almost stable for a long time before the crash. => You don’t get a specific phenotype, then die. You get near a specific phenotype and then come under increasing risk.

Survival curve suggesting increasing hazard (risk).

3 of the 15 runs ended with a green world.

tend

Page 25: Evolution in a visual virtual world

Lession 15: Changing hazard (survival analysis)

Suggests constant hazard for non-evolving organisms.

Decreasing hazard for young to moderately old.

Increasing hazard for really old organisms? (Surviving until evolution catches up to them?)

Page 26: Evolution in a visual virtual world

Source code

Source code can be found in my library named hydrasub: http://folk.uio.no/trondr/hydrasub

For Linux (64 bit RedHat) users at CEES, the exectuable is found at ~trondr/prog/evol12

Presentation: http://folk.uio.no/trondr/pacman_evol/