Top Banner
& Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin
34

Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

Jan 03, 2016

Download

Documents

Claude Craig
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

Evolving Virtual Creatures&Evolving 3D Morphology and Behavior by Competition

Papers by Karl SimsPresented by Sarah Waziruddin

Page 2: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

Motivation

• What: Automatically generate physically simulated characters without fully understanding the procedures used to control them

• How: Utilize optimization technique to generate complex behaviours automatically

Page 3: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

Use of Optimization in this paper

• Genetic Algorithm used as an optimization technique to search genotypes (encoding of a solution)

Page 4: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

Genetic AlgorithmsGenetic Algorithms

Imitate the processes of evolution and Imitate the processes of evolution and natural selection in biological world to natural selection in biological world to generate/evolve the best solutiongenerate/evolve the best solution

Page 5: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

Genetic AlgorithmsGenetic Algorithms

Goal: Goal: Create a computer program to solve Create a computer program to solve a problem defined by high level a problem defined by high level statementsstatements

High level statements:High level statements: Define objective function Define objective function Define and implement genetic representationDefine and implement genetic representation Define and implement genetic operators Define and implement genetic operators

Page 6: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

Genetic AlgorithmsGenetic Algorithms [Start] [Start] Generate random population of Generate random population of nn suitable solutions suitable solutions

for the problemfor the problem [Fitness][Fitness] Evaluate the fitness of each solution in the Evaluate the fitness of each solution in the

population population [New population] [New population] Create a new population: Create a new population:

[Selection] [Selection] Select two parent solutions from a Select two parent solutions from a population according to their fitness (the better fitness, population according to their fitness (the better fitness, the bigger chance to be selected) the bigger chance to be selected)

[Mutation][Mutation] With a mutation probability, mutate new With a mutation probability, mutate new offspring at each position in solution offspring at each position in solution

[[Sexual Reproduction]Sexual Reproduction] With some probability, combine With some probability, combine parents to form new offspringparents to form new offspring

[Replace][Replace] Replace current population with newly generated Replace current population with newly generated population population

[Test][Test] If the end condition is satisfied, If the end condition is satisfied, stopstop, and return the , and return the best solution in current population best solution in current population

[Loop][Loop] Go to Fitness Step Go to Fitness Step

Page 7: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

Application of Genetic AlgorithmApplication of Genetic Algorithm

Define objective functionDefine objective function Define and implement genetic Define and implement genetic

representationrepresentation Define and implement genetic Define and implement genetic

operatorsoperators

Page 8: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

Objective FunctionObjective Function

Stated implicitlyStated implicitly To create realistic looking and To create realistic looking and

acting creaturesacting creatures Fitness functions used to help Fitness functions used to help

evaluate if the objective function is evaluate if the objective function is satisfiedsatisfied

Page 9: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

Genetic RepresentationGenetic Representation

Defined by creature morphology and Defined by creature morphology and neurologyneurology

Morphology: “The form and structure of Morphology: “The form and structure of an organism or one of its parts”an organism or one of its parts”

Neurology (Nervous system): “The Neurology (Nervous system): “The system of cells, tissues, and organs that system of cells, tissues, and organs that regulates the body's responses to internal regulates the body's responses to internal and external stimuli”and external stimuli”

Page 10: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

Creature Morphology• Articulated three dimension rigid body parts

• Represented as a directed graph of nodes and connections

• Each node describes one body part– Many parameters to a node

Page 11: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

Creature NeurologyCreature Neurology

Comprised of:Comprised of: Sensors Sensors NeuronsNeurons EffectorsEffectors

Page 12: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

Sensors

• Each sensor is at a different part of the body

• Measure– That body part– The world relative to that body part

• Different types of sensors– Joint angle sensor– Contact sensors– Photo sensors

Page 13: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

Neurons

• Virtual brain: Function based on sensor input • Provides output effector values

Page 14: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

Effectors

• Each effecter controls a degree of freedom in a joint

• Each effectors value is applied as forces or torques

• Only exert simulated muscle force• Connected to neuron or sensor

Page 15: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

Neural System

• Local neural system:– Neural system generated along with

morphological system– Connection allowed between local neural

systems

• Global neural system:– Neurons not associated with a specific node– Can be connected with local neural systems

Page 16: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

Genetic Operators: Mutation (1/5) Genetic Operators: Mutation (1/5) Alter internal node parametersAlter internal node parameters

Dimensions- determine the physical shape of the Dimensions- determine the physical shape of the partpart

Joint type- number of DOF for each joint and Joint type- number of DOF for each joint and movement allowed for each DOFmovement allowed for each DOF

Joint limits- point where spring forces will be Joint limits- point where spring forces will be exerted for each DOFexerted for each DOF

Recursive limitRecursive limit Set of local neuronsSet of local neurons Set of connections to other nodesSet of connections to other nodes

Position, orientation, scale and reflection Position, orientation, scale and reflection relative to parent relative to parent

Page 17: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

Genetic Operators: Mutation (2/5) Genetic Operators: Mutation (2/5) Add a new node at randomAdd a new node at random

Leg Segment

BodySegment

Head Segment

Page 18: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

Genetic Operators: Mutation (3/5) Genetic Operators: Mutation (3/5) Parameter of each connection is Parameter of each connection is

subject to changesubject to change

Leg Segment

BodySegment

9045

Page 19: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

Genetic Operators: Mutation (4/5) Genetic Operators: Mutation (4/5) New connections are added at New connections are added at

random and old ones are deletedrandom and old ones are deleted

Leg Segment

BodySegment

Head Segment

Page 20: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

Genetic Operators: Mutation (5/5) Genetic Operators: Mutation (5/5) Delete unconnected nodesDelete unconnected nodes

Leg Segment

BodySegment

Head Segment

Page 21: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

Genetic Operators: CrossoverGenetic Operators: Crossover

Page 22: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

Genetic Operators: GraftingGenetic Operators: Grafting

Page 23: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

Genetic AlgorithmsGenetic Algorithms [Start] [Start] Generate random population of Generate random population of nn suitable solutions suitable solutions

for the problemfor the problem [Fitness][Fitness] Evaluate the fitness of each solution in the Evaluate the fitness of each solution in the

population population [New population] [New population] Create a new population: Create a new population:

[Selection] [Selection] Select two parent solutions from a Select two parent solutions from a population according to their fitness (the better fitness, population according to their fitness (the better fitness, the bigger chance to be selected) the bigger chance to be selected)

[Mutation][Mutation] With a mutation probability, mutate new With a mutation probability, mutate new offspring at each position in solution offspring at each position in solution

[[Sexual Reproduction]Sexual Reproduction] With some probability, combine With some probability, combine parents to form new offspringparents to form new offspring

[Replace][Replace] Replace current population with newly generated Replace current population with newly generated population population

[Test][Test] If the end condition is satisfied, If the end condition is satisfied, stopstop, and return the , and return the best solution in current population best solution in current population

[Loop][Loop] Go to Fitness Step Go to Fitness Step

Page 24: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

Start

• Generate random population of n suitable solutions for the problem – Random generation of nodes and connections– Use existing genotype to seed function– Create genotype manually to seed function

Page 25: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

FitnessFitness

Swimming, walking, jumping Swimming, walking, jumping Distance travelled by COM/unit of timeDistance travelled by COM/unit of time

FollowingFollowing Speed at which creature moves towards Speed at which creature moves towards

targettarget CompetitionCompetition

Pairs of individuals compete for control over a Pairs of individuals compete for control over a cubecube

Final distance of the creature from cube and Final distance of the creature from cube and opponents final distance from cubeopponents final distance from cube

Page 26: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

New populationNew population

Survival ratio: 1/5 of 300Survival ratio: 1/5 of 300 40% mutation, 30% crossover, 30% 40% mutation, 30% crossover, 30%

graftinggrafting Children from crossover and Children from crossover and

grafting are sometimes mutatedgrafting are sometimes mutated

Page 27: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

Results

• Different runs converged on characters with different evolved characteristics

• Specify a User Preference using the Algorithm– User can specify a preference over multiple runs

of the simulation– User can perform the natural selection

Page 28: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

ResultsResults

VideoVideo

Page 29: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

Advantages

• Generate characters without specification or knowledge about exactly how they work

• Less likely to get stuck on a local solution since we are searching on an encoding

• Easy to parallelize

Page 30: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

Disadvantages

• The characters could produce incorrect behaviour that could go undetected because of the lack of understanding of the underlying algorithm

• Process is not very reusable Can reuse some of the components of the

implementation, for example, the neuron language

• Genetic Algorithms sometimes require a lot of tweaking to work right

Page 31: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

Disadvantages

• Difficult to obtain ideal size for the neuron language, node types and parameters (joint types and parameters and connection parameters), sensor and effecter types

• i.e. Difficult to obtain best size for the search space – If the size is too small, then there aren't enough variations

in the population– If the size is too large, then changes in isolated parts of

the creature do not have a big affect on the behavior or structure

Page 32: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

Questions

?

Page 33: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

ReferencesReferences

http://www.genetic-programming.com/http://www.genetic-programming.com/ http://lancet.mit.edu/~mbwall/presentationhttp://lancet.mit.edu/~mbwall/presentation

s/IntroToGAs/s/IntroToGAs/ http://cs.felk.cvut.cz/~xobitko/ga/http://cs.felk.cvut.cz/~xobitko/ga/

Page 34: Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.

Physical Simulation

Dynamics used to calculate movement of characters– Articulated body dynamics– Numerical Integration– Collision detection and response– Friction– Option viscous fluid

Crucial for the physical simulator to be bug free as the GA will find ways to exploit bugs