Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

37
Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez

Transcript of Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

Page 1: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

Evolving Virtual Creaturesby Karl Sims (1995)

Adelein Rodriguez

Page 2: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

Outline

• Goal & Perspective• Motivation• Creatures

• Morphology• Control

• Evolution• Coevolution• Demo• Comments• Other Work

Page 3: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

Goal

• Automatically create creatures by evolving its morphology and behaviour.

• Creatures will be optimized for specific tasks such as walking, jumping, and swimming.

• Perspective:• Karl Sims had previously evolved expressions

for creating virtual plants, particle effects, and others.

• Genetic Programming recently invented (1992), evolving of variable length genomes.

• MIT Media Lab• This work has been referenced 440 times.

Page 4: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

Motivation

• Tedious coding process for creating behaviours that look realistic.

• Entertainment industry:• Creating film effects

• Creating characters• Need specific behaviours, thus

optimization technique such as evolution can help bias.

• Previous work evolved either the morphology, or the control structure, but not both.

• Here we want to evolve a control for a structure, and a structure for the control.

Page 5: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

The big picture

Genotype Directed graphs of nodes and connections. Graphs provide instructions for building a creature and cycles for repeating same part.

Phenotype Body parts are made by starting at the root node of the directed graph and following the connections.

Page 6: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

Morphology Node

Dimensions Joint type: Defines degrees of freedom & type

of movement relative to parent part. Revolute Rigid Twist Universal Etc...

Joint Limits: Point at which need to exert string forces.

Page 7: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

Node (cont) Recursive Limit: No. of times it can

generate a part from a cycle. Neurons: Given an input perform a

function to produce and output. Connections to other nodes (parts)

Position, orientation, scale, and reflection, terminal only flag.

Page 8: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

Example Hand Designed Topologies

Page 9: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

Control

Page 10: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

Sensors Connected to:

Effector Neuron

• “Embedded” in body parts: Joint angle sensors: monitors values of

degrees of freedom. Contact Sensors: Positive activation (1,0) if

contact. Negative activation (-1,0) if no contact. Present on all surfaces.

Photosensors: 3 sensors combined to get coordinates of global light source.

• Sensors enabled depending on environment. (Manually?)

Page 11: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

Neurons

Functions: sum, product, threshold, min, max, if, sigmoid, oscillate-wave, etc.

Two types of functions: Operate on input and give output directly

Recurrence, output depends on time step. Can give different output even if inputs is constant. Memory.

Page 12: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

Effectors

Connected to: Sensor Neuron

• Value is exerted as a joint force• Maximum strength proportional to

the max cross sectional area of the 2 parts it joins. Force scales with area.

Page 13: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

Going from genotype to phenotype Iterate over directed graph to create body parts:

Blocks of neural circuitry can be replicated together with morphological nodes.

There can be connections between adjacent parts . Sensors, neurons and effectors from one part can connect to sensors, neurons and effectors from other part. Allows coordination.

There is a separate graph of neurons not tied to any part. Phenotype has only one copy of this graph. Brain ?

Can allow centralized control

Page 14: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

How it all comes together

Nodes contain sensors, neurons (graphs), and effectors.

Connections allow flow of signals between nodes.

Page 15: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.
Page 16: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

The idea

Similar to Nervous System: Localized distributed control (neurons for every part)

Central control (separate groups of neurons)

Page 17: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

Phenotype Brain Phenotype Morphology

Page 18: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

This creature swims by makingpaddling motions with the flippers

Page 19: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

Evolution

Initial population: random genotypes and previous evolution genotypes.

Population size: 300 Selection: Top fit 1/5 of population

survives to next generation. Fitness evaluation: place creature in a

simulated environment, goal is to optimize for specific task or behaviour (e.g. jumping). Pre-screening process.

Page 20: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

Fitness Evaluation

4 Different Evolutions, each with different tasks: Swimming Walking Jumping Following

Page 21: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

Swimming

Simulated environment has no gravity. Viscosity effect. Faster it swims, higher fitness. Straight swimming gets higher fitness

than circling. Continuous movement gets higher fitness

than initial drastic jumps.

Page 22: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

Walking

Walking = kind of moving on land. Gravity and friction. Faster it moves, better. Vertical

movement is ignored. Environment could have other objects.

Page 23: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

Jumping

Measure vertical movement.

Page 24: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

Following

Task is to follow a light source Many trials with light source at different

positions Faster it moves towards light source

better. Land and water environments.

Page 25: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

Evolution (Cont)

Get surviving creatures, mate and/or mutate them.

Reproduction: Only highest fit can reproduce, higher fit reproduce more. To create an offspring you can mutate a parent, or mate two parents by either one of two crossover types.

Page 26: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

Mutation

Graph mutation steps:

1) Node's internal parameters Boolean values change from true to false and vice versa.

Scalar values change according to a Gaussian scale (Small adjustments are more likely than drastic ones)

2) Add a new node to graph Must be followed by a mutation that adds a connection to it in order to have effect.

Page 27: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

Mutation (Cont)

Graph mutation steps (cont): 3) Connection's internal parameters 4) Add/Remove a connection (can only happen in

morphological graphs, nor neural ones) 5) Remove unconnected nodes and neurons.

Morphology graphs mutated first, then inner graphs.

Page 28: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

Mating

Combines structures from two parent genotypes to make an offspring.

Used two mating types: Crossover: Graft

Page 29: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

Evolution (Cont)

Some creatures from one evolution were used as seeds for other evolutions. A creature from one medium could be used for evolution in another medium.

Page 30: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

Co Evolution

Evolving 3D Morphology and Behaviour by Competition (1994)

Place pairs of creatures in an arena to compete for a common resource.

Taller creatures start further back.

Page 31: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.
Page 32: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

How to pair individuals

Each to all

• Very expensive Each to some

• Might not get correct idea of fitness relative to others.

Species intrabreeding Species interbreeding

Page 33: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

Interesting results

Interspecie competition was observed where both species developed different techniques for grabbing the cube, then tried to add techniques to stop the other from grabbing it.

• Push cube from opponent, then follow it.

Page 34: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

Demo

Page 35: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

Additional Comments Genotype-Phenotype encoding allows to specify the

structure and behaviour in a compact way. Indirect encoding.

Only need to specify a few building blocks and the rules for how to combine the building blocks

Information reuse, modularity. Avoids hardships of hand coded designs. Very

useful for automatic content creation (Games) Use of evolutionary search allows for parallel

search over many possible structures and behaviours.

Neural structure is added as needed and tightly connected to the morphological structure. Co-adapation.

Page 36: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

Additional Comments (Cont)

Evolution attempts to find (“learn”) the best mapping of sensors and effectors by being exposed to the environment.

Downside: Fitness function and genotype language encoding need a lot of hand design.

Page 37: Evolving Virtual Creatures by Karl Sims (1995) Adelein Rodriguez.

Other Related Work

http://sodarace.net/ http://www.frams.alife.pl/a/al_pict.html