genetic algorithm and genetic programming. crossovers in nature two parental chromosomes exchange...

87
Genetic Algorithm and Genetic Programming

Post on 20-Dec-2015

223 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Genetic Algorithm and

Genetic Programming

Page 2: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Crossovers in NatureCrossovers in Nature• Two parental chromosomes exchange part

of their genetic information to create new hybrid combinations (recombinant).

• No loss of genes, but an exchange of genes between two previous chromosomes.

• No new genes creatednew genes created, preexisting old ones mixed together.

Page 3: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Artificial Intelligence

Machine learningMachine learning

What are evolutionary algorithms and Genetic Algorithm (GA)?

GP

Artificial Intelligence

ROBOTICS

ESEP GA

evolutionary

Page 4: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Genetic Genetic AlgorithmsAlgorithms

Page 5: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Genetic AlgorithmsGenetic Algorithms• 1. Randomly initialize a population of

chromosomes.

• 2. While the terminating criteria have not been satisfied:– a. Evaluate the fitness of each chromosome:

• i. Construct the phenotype (e.g. simulated robot) corresponding to the encoded genotype (chromosome).

• ii. Evaluate the phenotype (e.g. measure the simulated robot’s walking abilities), in order to determine its fitness.

– b. Remove chromosomes with low fitness.– c. Generate new chromosomes, using certain

selection schemes and genetic operators.

Page 6: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Genetic Algorithms

1. Fitness function

2. Selection scheme

3. Genetic operators1. Crossover

2. Mutation

4. Create bitstrings

5. Evaluate bitstrings (genotype)

6. Transform bitstrings to robot behaviors (phenotype)

Page 7: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Crossover and mutation.

Page 8: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Agenda• What is Genetic Programming?

• Background/History.

• Why Genetic Programming?

• How Genetic Principles are Applied.

• Examples of Genetic Programs.

• Future of Genetic Programming.

Page 9: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Genetic Algorithms• Most widely used• Robust • uses 2 separate spaces

– search space - coded solution (genotype)– solution space - actual solutions (phenotypes)

Genotypes must be mapped to phenotypes before the quality or fitness of each solution can be evaluated

Page 10: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Evolutionary Evolutionary StrategiesStrategies

Page 11: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Evolutionary Strategies• Like GP no distinction between search and

solution space• Individuals are represented as real-valued

vectors.• Simple ES

– one parent and one child– Child solution generated by randomly mutating

the problem parameters of the parent.

• Susceptible to stagnation at local optima

Page 12: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Evolutionary Strategies (cont’d)

• Slow to converge to optimal solution• More advanced ES

– have pools of parents and children

• Unlike GA and GP, ES have these properties:– ES Separates parent individuals from

child individuals– ES Selects its parent solutions

deterministically

Page 13: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Evolutionary Evolutionary ProgrammingProgramming

Page 14: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Evolutionary ProgrammingEvolutionary Programming

• Resembles ES, developed independently• Early versions of EP applied to the evolution of transition

table of finite state machinesfinite state machines• One population of solutions, reproduction is by mutation

only• Like ES operates on the decision variable of the problem

directly (ie Genotype = PhenotypeGenotype = Phenotype)• Tournament selection of parents

– better fitness more likely a parent– children generated until population doubled in size – everyone evaluated and the half of population with lowest fitness

deleted.

Page 15: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

General Architecture

of Evolutionary

Algorithms

Page 16: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Genetic Genetic ProgrammingProgramming

Page 17: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Genetic ProgrammingGenetic Programming

• John Koza, 1992

• Evolve program instead of bitstring

• Lisp program structure is best suited– Genetic operators can do simple replacements of

sub-trees– All generated programs can be treated as legal (no

syntax errors)

Please review about Behavioral systems, Genetic Algorithms and Genetic Programming from the book.

Chapters 20, 21, 22, 23.

Page 18: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Genetic Programming• Specialized form of GA• Manipulates a very specific type of

solution using modified genetic operators

• Original application was to design computer programs

• Now applied in alternative areas eg. Analog Circuits

• Does not make distinction between search and solution space.

• Solution represented in very specific hierarchical manner.

Page 19: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Background/History• By John R. Koza, Stanford University.• 1992, Genetic Programming Treatise -

“Genetic Programming. On the Programming of Computers by Means of Natural Selection.” - Origin of GP.

• Combining the idea of machine learning and evolved tree structures.

Page 20: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Why Genetic Programming?

• It saves time by freeing the human from having to design complex algorithms.

• Not only designing the algorithms but creating ones that give optimal solutions.

• Again, Artificial Intelligence.

Page 21: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

What Constitutes a Genetic Program?

• Starts with "What needs to be done"

• Agent figures out "How to do it"• Produces a computer program - “Breeding Programs”

• Fitness Test

• Code reuse

• Architecture Design - Hierarchies

• Produce results that are competitive with human produced results

Page 22: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

How are Genetic Principles Applied?

• “Breeding” computer programs.

• Crossovers.

• Mutations.

• Fitness testing.

Page 23: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Computer Programs as Trees

• Infix/Postfix• (2 + a)*(4 - num) *

+ -

2 a 4 num

Page 24: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

“Breeding” Computer Programs

Hmm hmm heh.Hey butthead. Do

computer programs actually score?

Page 25: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

“Breeding” Computer Programs

• Start off with a large “pool” of random computer programs.

• Need a way of coming up with the best solution to the problem using the programs in the “pool”

• Based on the definition of the problem and criteria specified in the fitness test, mutations and crossovers are used to come up with new programs which will solve the problem.

Page 26: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

The The Fitness Fitness

TestTest

Page 27: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

The Fitness TestThe Fitness Test• Identifying the way of evaluating how

good a given computer program is at solving the problem at hand.

• How good can a program cope with its environment.

• Can be measured in many ways, i.e. error, distance, time, etc…

Page 28: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Fitness Test Criteria

• Time complexity a good criteria.– i.e. n2 vs. n logn.

– “How long to find the solution?”

• Accuracy - Values of variables.– “How good is the solution?”

• Combinations of criteria may also be tested.

Page 29: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

MutationsMutations

Page 30: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Mutations in Nature• Ultimate source of genetic variation.• Radiation, chemicals change genetic

information.• Causes new genes to be created.• One chromosome.• Asexual.• Very rare.

Before:

acgtactggctaa

After:

acatactggctaa

Properties of mutationsProperties of mutations

Page 31: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Genetic Programming

• 1. Randomly generate a combinatorial set of computer programs.

• 22. Perform the following steps iteratively until a termination criterion is satisfied– a. Execute each program and assign a fitness value to each individual.– b. Create a new population with the following steps:

• i. Reproduction: Copy the selected program unchanged to the new population.

• ii. Crossover: Create a new program by recombining two selected programs at a random crossover point.

• iii. Mutation: Create a new program by randomly changing a selected program.

• 33.. The best sets of individuals are deemed the optimal solution upon termination

Page 32: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Mutations in ProgramsMutations in Programs• Single parental program is probabilistically selected

from the population based on fitness. • MutationMutation point randomly chosen.

– the subtree rooted at that point is deleted, and – a new subtree is grown there using the same random growth

process that was used to generate the initial population.

• Asexual operations (mutation) are typically performed sparingly: – with a low probability of mutations,– probabilistically selected from the population based on fitness.

Page 33: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Crossovers in Crossovers in ProgramsPrograms

Page 34: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Crossovers in Programs1. Two parental programs are selected from the population based on fitness.

2. A crossover point is randomly chosen in the first and second parent. 1. The first parent is called receiving

2. The second parent is called contributing

3. The subtree rooted at the crossover point of the first parent is deleted

4. It is replaced by the subtree from the second parent.

5.5. CrossoverCrossover is the predominant operation in genetic programming (and genetic algorithm) research

6. It is performed with a high probability (say, 85% to 90%).

Page 35: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Applications of GP in robotics

1. Wall-following robot – Koza– Behaviors of subsumption architecture of Brooks. Evolved a new

behavior.

2. Box-moving robot – Mahadevan3. Evolving behavior primitives and arbitrators

– for subsumption architecture

4. Motion planning for hexapod – Fukuda, Hoshino, Levy PSU.

5. Evolving communication agents Iba, Ueda.6. Mobile robot motion control – Walker.

– for object tracking

7. Soccer8. Car racing

Population sizes from 100 to 2000

Page 36: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Subset of LISP Subset of LISP for Genetic for Genetic

ProgrammingProgramming

Page 37: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

This is a very very small subset of This is a very very small subset of

Lisp Lisp

LISP = Famous first language of Artificial LISP = Famous first language of Artificial Intelligence and RoboticsIntelligence and Robotics

Page 38: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

• More functions

• Atom, list, cons, car, cdr, numberp, arithmetic, relations. Cond.

• Copying example

Page 39: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

A very important concept – Lisp does not distinguish data and programs

Page 40: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Programs in Lisp are trees that are evaluated (calculated)

Tree-reduction semantics

Page 41: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Lisp allows to define special languages in itself

Page 42: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid
Page 43: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Robot-Lisp cont

• This subset of Lisp was defined for a mobile robot• You can define similar subsets for a humanoid robot,

robot hand, robot head or robot theatre

Page 44: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

As an exercise, you can think about behaviors of all Braitenberg Vehicles described by such programs

Page 45: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

• You can define much more sophisticated mutations that are based on constraints and in general on your knowledge and good guesses (heuristics)

Page 46: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

1. You can define your own languages in Lisp

2. You can write your own Lisp-like language interpreter in C++

3. Many on Web

Page 47: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

EyeSim simulatorEyeSim simulator allows to simulate robots, allows to simulate robots, environments and learning strategies together, with environments and learning strategies together, with

no real robotno real robot

Evolution here takes feedback from simulated environment (simulated)

In our project with teens the feedback is from humans who evaluate the robot theatre performance (subjective)

In our previous project with hexapod the feedback was from real measurement in environment (objective)

Page 48: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Evolution principles are the same for all evolutionary algorithms.

• Each individual (Lisp program) is executed on the EyeSim simulator for a limited number of program steps.

• The program performance is rated continually or when finished.

Page 49: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Sample Problem:

Ball Tracking

Page 50: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Sample Problem: Ball Tracking

• Find ball in environment• Drive towards it• Stop when close to ball

Similar other tasks that we solved:

• Collect cans

• Shoot goal in soccer

• Robot sumo

• Robot fencing

1. A single robot is placed at a random position and orientation in a rectangular driving area closed by walls.

2. A colored ball is also placed at a random position.

3. Using its camera, the robot has to detect the ball, drive towards it, and stop close to it.

4. The robot camera is positioned at an angle so the robot can see the wall ahead from any position in the field.

5. However, the ball is not always visible.

GOALSGOALS

Page 51: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Idea for solving• In the loop, grab an image and analyze it as

follows:– Convert the image from RGB to HSV (Hue, Saturation (Hue, Saturation

and Value)and Value)– Use the histogram ball detection routine from section

8.6 of the book (this returns a ball position in the range [0..79] (left.. Right) or no ball and a ball size in pixels [0..60])

– If the ball height is 20 pixels or more, then stop and terminate (the robot is close enough to the ball)

– Otherwise• If no ball is detected or the ball position is less than 20, turn

slowly left.• If the ball position is between 20 and 40, drive slowly straight• If the ball position is greater than 40, turn slowly right.

Page 52: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

• ColSearch returns the x-position of the ball or -1 if not detected and the ball height in pixels.

• The statement VWDriveWait following either VWDriveTurn or a VWDriveStraight command suspends execution driving or rotation of the requested distance or angle has finished.

Page 53: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

The evolution can start from random data or from good hand-coded solutions from humans

Bear in mind that obj_size and obj_pose are in fact calls to the image processing subroutine.

Page 54: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Evolution of tracking behavior• Koza suggests the following steps for

setting up a genetic programming system:

1. Establish an objective.2. Identify the terminals and functions used in the

inductive program3. Establish the selection scheme and its evolutionary

operations4. Finalize the number of fitness cases5. Determine the fitness function and hence the range of

raw fitness values6. Establish the generation gap G, and the population M7. Finalize all control parameters.8. Execute the Genetic Paradigm.

Page 55: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

EyeSim simulator allows to simulate robots, environments and learning strategies together, with no

real robot

Evolution here takes feedback from simulated environment (simulated)

In our project with teens the feedback is from humans who evaluate the robot theatre performance (subjective)

In our previous project with hexapod the feedback was from real measurement in environment (objective)

Page 56: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Summary on GP• Field of study in Machine Learning.• Created by John Koza in 1992.• Save time while creating better programs.• Based on the principles of genetics.• Used in:

– Symbolic Regression– Circuit Design.– Many others

Page 57: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

• Example of using Example of using Genetic Programming Genetic Programming in Roboticsin Robotics

• Use of simulationUse of simulation

Page 58: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Robot’s view and driving path in EyeSim simulator

Robot trajectory

Page 59: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

You want to maximize this fitness function

Page 60: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid
Page 61: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid
Page 62: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Fitness grows in next populations (in general)

Highest fitness

Page 63: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

What are the evolved trajectories of the robot to meet the ball?

The best trajectory

Page 64: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

• Use of improved GP• Use of parallel processing• Use of FPGA and evolvable hardware• Use of quantum computers in future.

Page 65: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Behavior-Based Behavior-Based SystemsSystems

Page 66: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Behavior-Based SystemsBehavior-Based Systems• Rodney Brooks, 1986

– Ronald Arkin, 1998

• Instead of single, monolithic program, use a number of behaviors ( parallel processes)– Improve changeability– Utililize emergence

• Each behavior has access to all sensors and actuators

• Problem: behavior selectionThere are now many variants of behavior-based robots.

Braitenberg is just one of them.

Page 67: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Good old-fashioned hierarchical software architecture for a robot

Page 68: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Modern behavioral software architecture for a robot

Page 69: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Behavior Selection

• Clearly, we cannot have two different behaviors in control of actuators– (e.g. obstacle-avoidance wants to drive left, ball-

detection wants to drive right)

• Solution 1: Always select one behavior as active

• Solution 2: Add actuator output of all behaviors, multiplied with certain coefficients

Page 70: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Behavior Selection

• Remaining problem:– How to determine which behavior to select or

which coefficients to use

• Solution: ??

• How about using GA to evolve a solution!

Page 71: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Behavior SelectionBehavior SelectionParameters

Single chromosome

camera Ball detection

Processed sensor input

Evolution of controller

parameters

Schemas using direct and processed inputs

Actuator output

Schema weighting

Move to ball

Avoid obstacles

schemas

Direct inputs

Trial result

Page 72: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

• Many tools of this type are created• In this class the projects are about animatronix editor and state

based editor• Another possibility is to use Artificial Neural Network

Page 73: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

• This slide shows hierarchical editor for subsumption-type architecture

Page 74: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Sample Problem: Ball Tracking

• Problem:– Find ball in environment– Drive towards it– [Stop when close to ball]

• Behavior selection:– Use NN– Evolve NN weights using GA

Page 75: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Behavior Selection Behavior Selection with NN and GAwith NN and GA

Page 76: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Behavior Selection with NN Behavior Selection with NN and GAand GA

• Fitness function:

fitness = initDist - b_distance();

if (fitness < 0.0) fitness = 0.0;

Page 77: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid
Page 78: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid
Page 79: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Both approaches can provide increase in Fitness function. The problem is how good?

Page 80: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Trajectories found by behavioral approaches

Page 81: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid
Page 82: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

AI in robotics (first summary)AI in robotics (first summary)

• Neural Networks– Learning requires complete test set with correct

results

• Genetic Algorithms– Evolving solutions based on fitness function can be

used in real robot or in simulation (often easier/faster)

• Genetic Programming– Requires algorithm coding/interpretation (e.g. Lisp)

• Behavior-Based Systems– Combining parallel processing approach with

intelligent selection scheme

Page 83: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Other areas - ExamplesOther areas - Examples of Genetic Programsof Genetic Programs

• 1. Symbolic Regression - – the process of discovering:

• the functional form of a target function • and all of its necessary coefficients, • or at least an approximation to these.

• 2. Analog circuit design – Embryo circuit is an initial circuit which is modified

to create a new circuit according to functionality criteria.

Page 84: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Genetic Programming in the Genetic Programming in the FutureFuture

• Speculative.• Only been around for 10 years.• Is very successful.• Discovery of new algorithms in

existing projects.• Can be combined with constructive

induction, LISP-based systems, evolutionary hardware, neural networks, fuzzy logic, quantum logic and many other ideas and methods.

Mr. Roboto

Page 85: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

End of Show

Shut up Buttmunch.That sucked.

Hey Butthead.That kicked ass.

Oh yeah. Hm hm yeah yeah hm. It sucked.

Page 86: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

What you can do with these evolutionary ideas?

1. Generation of gaits for a biped robot2. Generation of hand gestures for a humanoid robot3. Generation of path for a mobile robot4. Generation of mouth motions for a speaking robot

head 5. Generation of a state machine for a behavioral robot

– Braitenberg Vehicles.6. Generation of arbitrary controller represented as

Neural Net, Boolean Function, Fuzzy function or Multiple-Valued Function.

7. Many many other applications in our projects – be creative.

8. You can find many papers by Google – search under Evolutionary Robotics.

Page 87: Genetic Algorithm and Genetic Programming. Crossovers in Nature Two parental chromosomes exchange part of their genetic information to create new hybrid

Sources• Braunl

• Dan Kiely

• Ran Shoham

• Brent Heigold

• CPSC 533, Artificial Intelligence