Automatically Defined Functions Used to evolve modular programs Architecture implemented by Koza...

18
Genetic Programm ing Automatically Defined Functions Used to evolve modular programs Architecture implemented by Koza Architecture implemented by Bruce Function calls A critical analysis of ADFs Applications

Transcript of Automatically Defined Functions Used to evolve modular programs Architecture implemented by Koza...

Page 1: Automatically Defined Functions Used to evolve modular programs Architecture implemented by Koza Architecture implemented by Bruce Function calls A critical.

Genetic Programming

Automatically Defined Functions

Used to evolve modular programs Architecture implemented by Koza Architecture implemented by Bruce Function calls A critical analysis of ADFs Applications

Page 2: Automatically Defined Functions Used to evolve modular programs Architecture implemented by Koza Architecture implemented by Bruce Function calls A critical.

Genetic Programming

Architecture Implemented by Koza Each individual of the population is represented by a tree

containing one or more function-defining (function) branches and a results-producing branch (main program).

progn

defunvalues

ADF0 ArgumentList

values

Defining BranchBody of Result

Producing Branch

1

2

3 4 5

6

7 8

Body of Function

Page 3: Automatically Defined Functions Used to evolve modular programs Architecture implemented by Koza Architecture implemented by Bruce Function calls A critical.

Genetic ProgrammingExample

progn

defunvalues

ADF0 ARG0, ARG1, values

1

2

3 4 5

6

7

8

ARG2

+

+ ARG0

ARG1 ARG2

+

+ ARG0

ARG1 ARG2

-

x

7 7

7 7

8 8

8

ADF0

y

x

x

8

8

Page 4: Automatically Defined Functions Used to evolve modular programs Architecture implemented by Koza Architecture implemented by Bruce Function calls A critical.

Genetic ProgrammingExtensions to GP System

GP parameters Number of ADFs Number of arguments for each ADF

Initial population generation Structure- preserving crossover Typing

Branch typing Point typing

Page 5: Automatically Defined Functions Used to evolve modular programs Architecture implemented by Koza Architecture implemented by Bruce Function calls A critical.

Genetic Programming

Architecture Implemented by Bruce

Each individual is represented as an array of trees, one representing the main program and the rest one or more ADFS.

The user has to specify the number of trees in each genotype.

The user must also specify how the evaluation of each tree will contribute to calculating the overall fitness of the individual.

Architecture simpler and more general than Koza’s.

Page 6: Automatically Defined Functions Used to evolve modular programs Architecture implemented by Koza Architecture implemented by Bruce Function calls A critical.

Genetic ProgrammingExample

+

+ ARG0

ARG1 ARG2

+

+ ARG0

ARG1 ARG2

-

x

ADF0

y

x

x

ADF0

Main program

Page 7: Automatically Defined Functions Used to evolve modular programs Architecture implemented by Koza Architecture implemented by Bruce Function calls A critical.

Genetic ProgrammingExtensions to the GP System

Size of the genotype Functions calls Initial population generation Crossover

Page 8: Automatically Defined Functions Used to evolve modular programs Architecture implemented by Koza Architecture implemented by Bruce Function calls A critical.

Genetic ProgrammingFunction Calls

There are no references between the function-defining branches.

References among function-defining branches are not restricted.

A function may hierarchically call those functions that have been defined before it, e.g. ADFO can call ADF1 but not vice versa.

Page 9: Automatically Defined Functions Used to evolve modular programs Architecture implemented by Koza Architecture implemented by Bruce Function calls A critical.

Genetic ProgrammingCritical Analysis

The use of ADFs is not beneficial for simple problems. ADFs are beneficial for complex problems. ADFs produce parsimonious solutions for difficult problems.

One of the disadvantages of using ADFs is that the user has to define the entire architecture prior to a simulation.

The benefits of using ADFs increases with the difficulty of the problem.

The use of automatically defined functions decreases the computational effort needed to find a solution as well as increases the parsimony of solutions provided that the problem is of sufficient difficulty.

A GP system incorporating the use of ADFs has the lens effect, i.e. a GP system with ADFs tend to find individuals that have extreme

scores.

Page 10: Automatically Defined Functions Used to evolve modular programs Architecture implemented by Koza Architecture implemented by Bruce Function calls A critical.

Genetic ProgrammingApplication 1

Objective: Induce an equation that calculates the volume of a 2-dimensional box.

Architecture:One result-producing branch; one function-producing branch defining the ADF ADF0 with has three arguments.

Typing: Branch Terminal set for the results-producing branch:

Tr = {L0, W0, H0, L1, W1, H1 } Function set for the results-producing branch:

Fr = {+, -, *, /, ADFO }

Page 11: Automatically Defined Functions Used to evolve modular programs Architecture implemented by Koza Architecture implemented by Bruce Function calls A critical.

Genetic ProgrammingApplication 1

Terminal set for the function-producing branch: The three dummy variables: Tf = { ARG0, ARG1, ARG2}

Function set for the results-producing branch: Ff = {+, -, *, /}

Number of generations:51 Population size: 4000 Raw Fitness: Error Formula

Page 12: Automatically Defined Functions Used to evolve modular programs Architecture implemented by Koza Architecture implemented by Bruce Function calls A critical.

Genetic ProgrammingApplication 1

Hits criterion: The number of fitness cases for which the value calculated by the induced program is within 0.01 of the target value.

Method of selection:Fitness proportionate selection.

Initial population generator: The ramped half-and-half method with an initial tree depth of six and a depth limit of seventeen on the size of trees created by the genetic operators.

Fitness cases: The six dimensions of the box

Page 13: Automatically Defined Functions Used to evolve modular programs Architecture implemented by Koza Architecture implemented by Bruce Function calls A critical.

Genetic ProgrammingApplication 1

Genetic Operations: Reproduction –10% Mutation – 0% Crossover – 90%

In this particular example the use of ADFs has not decreased the computation effort needed to find a solution or the average structural complexity.

Page 14: Automatically Defined Functions Used to evolve modular programs Architecture implemented by Koza Architecture implemented by Bruce Function calls A critical.

Genetic ProgrammingSolutionprogn

defun

ADFO ARG0 ARG1 ARG2values values

-

* *

+ /

/

-

ARG2 ARG0

ARG0 *

ARG0 ARG1

ARG2

ARG2 ARG2

ADF0 ADF0

L1 W1 H1 W0 H0 L0

Page 15: Automatically Defined Functions Used to evolve modular programs Architecture implemented by Koza Architecture implemented by Bruce Function calls A critical.

Genetic ProgrammingApplication 2

Function to generate: Induce a program that produces the value of x6 – 2x4+x2 , given x.

Architecture of overall program: One result-producing branch; one function-producing branch defining the ADF ADF0 that has one argument.

Typing: Branch typing Terminal set for the results-producing branch: Tr =

{X, } where is in the interval [-1.0, 1.0]. Function set for the results-producing branch: Fr =

{+, -, *, /, ADFO }

Page 16: Automatically Defined Functions Used to evolve modular programs Architecture implemented by Koza Architecture implemented by Bruce Function calls A critical.

Genetic ProgrammingApplication 2

Terminal set for the function-producing branch: Tf = { ARG0, } where is in the interval [-1.0, 1.0].

Function set for the function-producing branch: Ff = {+, -, *, /}

Number of generations: 51 Population size: 4000 Raw Fitness: Error formula Hits criterion: The number of fitness cases for which

the value calculated by the induced program is within 0.01 of the target value.

Page 17: Automatically Defined Functions Used to evolve modular programs Architecture implemented by Koza Architecture implemented by Bruce Function calls A critical.

Genetic ProgrammingApplication 2

Method of selection:Fitness proportionate selection. Initial population generator: The ramped half-and-half

method with an initial tree depth of six and a depth limit of seventeen on the size of trees created by the genetic operators.

Fitness cases: Fifty values are chosen randomly from the interval [-1.00, 1.00]

Genetic operators: Crossover – 90% Reproduction – 10%

Page 18: Automatically Defined Functions Used to evolve modular programs Architecture implemented by Koza Architecture implemented by Bruce Function calls A critical.

Genetic ProgrammingSolution

progn

defun

ADFO ARG0 values values

--

*

/ *

ARG0

ARG0

ARG0 ARG0 ARG0

ADF0

ADF0

+

X

X

+-

*

X XARG0

ARG0