Upload
danyl
View
44
Download
0
Tags:
Embed Size (px)
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
Citation preview
1
Tree Evaluation OverviewSeptember 17th, 2013Erik Fredericks
2
Overview
• Step-by-step detail of tree evaluation process• Discussion throughout
• Issues in generating trees that fully satisfy all pre/post conditions
3
Tree Setup
• Terminals• Objects defined with:
• Starting state• Target condition
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)
5
Node Evaluation
• Role transformation• Check if the current node satisfies the target
condition
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
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
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
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.
10
An Ideal Tree
WRAPPER
FLOAT-ARRAY INT TARGET-METHOD
FLOAT2INT
FLOAT-ARRAY
ARR2INDEX
INT-ARRAY
INT2FLOAT
11
An Ideal Tree
WRAPPER
FLOAT-ARRAY INT TARGET-METHOD
FLOAT2INT
FLOAT-ARRAY
ARR2INDEX
INT-ARRAY
INT2FLOAT
(Start)
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
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
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
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
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)
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
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
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)
20
A Non-Ideal Tree
WRAPPER
FLOAT-ARRAY INT TARGET-METHOD
CHAR2VOID NOP
INT-ARRAY
INT2FLOAT
21
A Non-Ideal Tree
WRAPPER
FLOAT-ARRAY INT TARGET-METHOD
CHAR2VOID NOP
INT-ARRAY
INT2FLOAT
Penalize for an invalid transform
22
A Non-Ideal Tree
WRAPPER
FLOAT-ARRAY INT TARGET-METHOD
CHAR2VOID NOP
INT-ARRAY
INT2FLOAT
Penalize for an unsatisfied condition
23
Discussion
• Evaluation methods
• Use of terminals
• Other?