tree evaluation overview

23
1 Tree Evaluation Overview September 17 th , 2013 Erik Fredericks

Upload: danyl

Post on 24-Feb-2016

46 views

Category:

Documents


0 download

DESCRIPTION

Tree Evaluation Overview. September 17 th , 2013 Erik Fredericks. Overview. Step-by-step detail of tree evaluation process Discussion throughout Issues in generating trees that fully satisfy all pre/post conditions. Tree Setup. Terminals Objects defined with: Starting state - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Tree Evaluation Overview

1

Tree Evaluation OverviewSeptember 17th, 2013Erik Fredericks

Page 2: Tree Evaluation Overview

2

Overview

• Step-by-step detail of tree evaluation process• Discussion throughout

• Issues in generating trees that fully satisfy all pre/post conditions

Page 3: Tree Evaluation Overview

3

Tree Setup

• Terminals• Objects defined with:

• Starting state• Target condition

Page 4: Tree Evaluation Overview

4

Tree Setup

• Terminals• Objects defined with:

• Starting state• Target condition

• Examples:• Starting state: FLOAT-ARRAY (Source pre-condition)• Target state: INT-ARRAY (Target pre-condition)

• Starting state: INT (Source pre-condition)• Target state: ARRAY-SIZE (Target pre-condition)

Page 5: Tree Evaluation Overview

5

Node Evaluation

• Role transformation• Check if the current node satisfies the target

condition

Page 6: Tree Evaluation Overview

6

Node Evaluation

• Role transformation• Check if the current node satisfies the target

condition• If true

• Increment object fitness by a large amount• Note that condition is satisfied

Page 7: Tree Evaluation Overview

7

Node Evaluation

• Role transformation• Check if the current node satisfies the target

condition• If true

• Increment object fitness by a large amount• Note that condition is satisfied

• Else• If the transformation was valid

• Increment object fitness by a small amount• “We’re heading in the right direction”

• If it was not valid• Decrement object fitness by a decent amount

• If condition was previously satisfied, penalize further as we’re moving away from a correct answer

• Note that condition is currently unsatisfied

Page 8: Tree Evaluation Overview

8

Node Evaluation

• Data transformation• Check that necessary roles are available for

evaluation• GET-HIGH-INDEX requires an array and an array size

• If so, increase object fitness• Otherwise, penalize

Page 9: Tree Evaluation Overview

9

Fitness Calculation

• Fitness values for each terminal object is summed, and the inverse is calculated• EpochX considers 0.0 to be the best fitness

• Software engineering metrics could further be applied here in the future• Reduce size of tree• Complexify tree• Etc.

Page 10: Tree Evaluation Overview

10

An Ideal Tree

WRAPPER

FLOAT-ARRAY INT TARGET-METHOD

FLOAT2INT

FLOAT-ARRAY

ARR2INDEX

INT-ARRAY

INT2FLOAT

Page 11: Tree Evaluation Overview

11

An Ideal Tree

WRAPPER

FLOAT-ARRAY INT TARGET-METHOD

FLOAT2INT

FLOAT-ARRAY

ARR2INDEX

INT-ARRAY

INT2FLOAT

(Start)

Page 12: Tree Evaluation Overview

12

An Ideal Tree

WRAPPER

FLOAT-ARRAY INT TARGET-METHOD

FLOAT2INT

FLOAT-ARRAY

ARR2INDEX

INT-ARRAY

INT2FLOAT

Convert a float array to an int array• Target role is int array• FLOAT-ARRAY.fitness += 10.0

Page 13: Tree Evaluation Overview

13

An Ideal Tree

WRAPPER

FLOAT-ARRAY INT TARGET-METHOD

FLOAT2INT

FLOAT-ARRAY

ARR2INDEX

INT-ARRAY

INT2FLOAT

Get the high index of an array• Children are an array and an int• INT.fitness += 10.0

Page 14: Tree Evaluation Overview

14

An Ideal Tree

WRAPPER

FLOAT-ARRAY INT TARGET-METHOD

FLOAT2INT

FLOAT-ARRAY

ARR2INDEX

INT-ARRAY

INT2FLOAT

Tree is penalized out of existence if 3rd parameter is not a target-

method

Page 15: Tree Evaluation Overview

15

An Ideal Tree

WRAPPER

FLOAT-ARRAY INT TARGET-METHOD

FLOAT2INT

FLOAT-ARRAY

ARR2INDEX

INT-ARRAY

INT2FLOAT

Convert an int array to a float array• Target role is float array• INT-ARRAY.fitness += 10.0

Page 16: Tree Evaluation Overview

16

An Ideal Tree

WRAPPER

FLOAT-ARRAY INT TARGET-METHOD

FLOAT2INT

FLOAT-ARRAY

ARR2INDEX

INT-ARRAY

INT2FLOAT

Overall fitness1.0 / (FLOAT-ARRAY.fitness +

INT.fitness + INT-ARRAY.fitness)

Page 17: Tree Evaluation Overview

17

An Ideal Tree

WRAPPER

FLOAT-ARRAY INT TARGET-METHOD

FLOAT2CHAR

FLOAT-ARRAY

ARR2INDEX

INT-ARRAY

INT2FLOATFitness here would simply be

incremented, as a FLOAT2CHAR is a valid transform

CHAR2INT

Page 18: Tree Evaluation Overview

18

An Ideal Tree

WRAPPER

FLOAT-ARRAY INT TARGET-METHOD

FLOAT2INT

FLOAT-ARRAY

ARR2INDEX

INT-ARRAY

INT2FLOAT

The composition node (always root) looks for (mergeSort):

• 4 conditions to be satisfied• FLOAT-ARRAY -> INT-ARRAY• ARRAY-HIGH-INDEX• TARGET-METHOD• INT-ARRAY -> FLOAT-ARRAY

Page 19: Tree Evaluation Overview

19

An Ideal Tree

WRAPPER

FLOAT-ARRAY INT TARGET-METHOD

FLOAT2INT

FLOAT-ARRAY

ARR2INDEX

INT-ARRAY

INT2FLOAT

What the results show:

• Generally, 2/3 of the conditions are satisfied (never all 3)

• Evolution finding simplest path, or simplest path with an extra NOP

• (not chaining transforms)

Page 20: Tree Evaluation Overview

20

A Non-Ideal Tree

WRAPPER

FLOAT-ARRAY INT TARGET-METHOD

CHAR2VOID NOP

INT-ARRAY

INT2FLOAT

Page 21: Tree Evaluation Overview

21

A Non-Ideal Tree

WRAPPER

FLOAT-ARRAY INT TARGET-METHOD

CHAR2VOID NOP

INT-ARRAY

INT2FLOAT

Penalize for an invalid transform

Page 22: Tree Evaluation Overview

22

A Non-Ideal Tree

WRAPPER

FLOAT-ARRAY INT TARGET-METHOD

CHAR2VOID NOP

INT-ARRAY

INT2FLOAT

Penalize for an unsatisfied condition

Page 23: Tree Evaluation Overview

23

Discussion

• Evaluation methods

• Use of terminals

• Other?