230 likes | 380 Views
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
E N D
Tree Evaluation Overview September 17th, 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 • Target condition
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)
Node Evaluation • Role transformation • Check if the current node satisfies the target condition
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
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
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
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.
An Ideal Tree WRAPPER FLOAT2INT INT2FLOAT ARR2INDEX FLOAT-ARRAY FLOAT-ARRAY INT TARGET-METHOD INT-ARRAY
An Ideal Tree WRAPPER FLOAT2INT INT2FLOAT ARR2INDEX (Start) FLOAT-ARRAY FLOAT-ARRAY INT TARGET-METHOD INT-ARRAY
An Ideal Tree WRAPPER • Convert a float array to an int array • Target role is int array • FLOAT-ARRAY.fitness += 10.0 FLOAT2INT INT2FLOAT ARR2INDEX FLOAT-ARRAY FLOAT-ARRAY INT TARGET-METHOD INT-ARRAY
An Ideal Tree WRAPPER • Get the high index of an array • Children are an array and an int • INT.fitness += 10.0 FLOAT2INT INT2FLOAT ARR2INDEX FLOAT-ARRAY FLOAT-ARRAY INT TARGET-METHOD INT-ARRAY
An Ideal Tree WRAPPER Tree is penalized out of existence if 3rd parameter is not a target-method FLOAT2INT INT2FLOAT ARR2INDEX FLOAT-ARRAY FLOAT-ARRAY INT TARGET-METHOD INT-ARRAY
An Ideal Tree WRAPPER • Convert an int array to a float array • Target role is float array • INT-ARRAY.fitness += 10.0 FLOAT2INT INT2FLOAT ARR2INDEX FLOAT-ARRAY FLOAT-ARRAY INT TARGET-METHOD INT-ARRAY
An Ideal Tree WRAPPER Overall fitness 1.0 / (FLOAT-ARRAY.fitness + INT.fitness + INT-ARRAY.fitness) FLOAT2INT INT2FLOAT ARR2INDEX FLOAT-ARRAY FLOAT-ARRAY INT TARGET-METHOD INT-ARRAY
An Ideal Tree WRAPPER CHAR2INT Fitness here would simply be incremented, as a FLOAT2CHAR is a valid transform FLOAT2CHAR INT2FLOAT ARR2INDEX FLOAT-ARRAY FLOAT-ARRAY INT TARGET-METHOD INT-ARRAY
An Ideal Tree WRAPPER • 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 FLOAT2INT INT2FLOAT ARR2INDEX FLOAT-ARRAY FLOAT-ARRAY INT TARGET-METHOD INT-ARRAY
An Ideal Tree WRAPPER • 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) FLOAT2INT INT2FLOAT ARR2INDEX FLOAT-ARRAY FLOAT-ARRAY INT TARGET-METHOD INT-ARRAY
A Non-Ideal Tree WRAPPER CHAR2VOID INT2FLOAT NOP FLOAT-ARRAY INT TARGET-METHOD INT-ARRAY
A Non-Ideal Tree WRAPPER Penalize for an invalid transform CHAR2VOID INT2FLOAT NOP FLOAT-ARRAY INT TARGET-METHOD INT-ARRAY
A Non-Ideal Tree WRAPPER Penalize for an unsatisfied condition CHAR2VOID INT2FLOAT NOP FLOAT-ARRAY INT TARGET-METHOD INT-ARRAY
Discussion • Evaluation methods • Use of terminals • Other?