understanding the semantics of the genetic algorithm in dynamic environments abir alharbi william...

35
Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo [email protected] [email protected] [email protected] King Saud University Northwestern University University of Michigan Mathematics Dept. Northwestern Institute on Center for the Study of Complex Systems Complex Systems A Case Study Using the Shaky Ladder Hyperplane-Defined Functions

Post on 20-Dec-2015

214 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu

Understanding the Semantics of the Genetic Algorithm in Dynamic Environments

Abir Alharbi William Rand Rick [email protected] [email protected] [email protected] Saud University Northwestern University University of MichiganMathematics Dept. Northwestern Institute on Center for the Study of

Complex Systems Complex Systems

A Case Study Using the Shaky Ladder Hyperplane-Defined Functions

Page 2: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu

Semantic versus Syntactic Understanding

Language• “Put the box on the table by

the window in the kitchen.”• Syntax assessment:

• Label prepositions, nouns, verbs, articles

• Syntactically Okay• But the syntactic assessment

misses the point, there are three different semantic interpretations

• With a semantic labeling we can better appreciate the informational content

Genetic Algorithms• “1100101”• Syntax assessment:

• Some measure of diversity • Fitness score

• But the syntactic assessment misses the point, there are many different semantic interpretations

• If we can label the building blocks that are present in the genome we can better appreciate the informational content

Page 3: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu

Semantic LabelingGenetic Algorithms• “1100101”

Language• “Put the box on the table by the

window in the kitchen.”

b1

b2 b

3b

4

b12

b23

b123

b1234

Building Block Setb

1 = 11****1 = 1

b2 = **00*** = 1

b3 = ****1** = 1

b4 = *****0* = 1

b12

= 1100**1 = 1

b23

= **001** = 1

b123

= 11001*1 = 1

b1234

= 1100101 = 1

Page 4: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu

Overview

• Previous Mysteries of the sl-hdfs• The Experiment• Average Schemata Analysis• Diversity of Schemata Analysis• Conclusion and Future Work

Page 5: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu

Previous Mysteries of the sl-hdfs

• In all variants (Cliffs, Smooth, Weight) the GA performs at least as well as, and in most cases does better, in dynamic versions of the sl-hdfs than it does in static versions• Shouldn’t the GA perform better in static environments since

the environment is not changing?

• In all cases (Static, Dynamic) the GA performs better in the Cliffs variant than the other variants• The Cliffs variant features rough transitions shouldn’t this

prevent the GA from performing optimally?

• Hypothesis: In both static environments and smoothly transitioning environments the GA prematurely converges on local optima.

Page 6: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu
Page 7: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu

The Experiment

Parameter Cliffs Variant Smooth Variant Weight Variant

Population SizeMutation RateCrossover RateGenerationsString LengthSelection TypeNumber of Elem. SchemataElementary Schemata OrderElementary Schemata Length 50Mean, Var. of Int. Schem. Wt. 3, 1Int. Constr. Method Unrestr., Random Restr., Random Restr., Neighbortdelta

wdelta 1Number of Runs

500Tournament, size 3

508

10000.0010.7

1800

Not Specified 3, 0

100

300

Page 8: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu

Average Schemata Analysis

• Four different levels of schemata• Potholes• Elementary• Intermediate• Highest Level

• Count the number of schemata of each level that are present in an individual and divide by the total number of schemata possible at that level

• Average that fraction across all individuals in the population• Average that average across all runs for each generation

Page 9: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu
Page 10: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu

Cliffs Results

• As hypothesized the shakes in the ladder prevent the GA operating in the Cliffs variant from locking on to a particular set of intermediate schemata

• Intermediate schemata decrease immediately after every shake since those schemata that were rewarded are not any more

• In some runs highest level schema found as early as just before generation 800

Page 11: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu
Page 12: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu

Smooth Variant Results

• Decrease due to shakes not as great, since intermediate schemata do not change as much

• Still within the same basin of attraction• No highest level schema until generation 1500 or so

Page 13: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu
Page 14: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu

Weight Variant Results

• Shakes appear to have no effect on the accumulation of any level of schemata

• The dynamics of the weight variant are not apparent to the GA

• Despite rapid performance increases early on the GA operating in the Weight variant environment underperforms the other two variants

Page 15: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu

Comparison of Results

• Confirms our hypothesis• In dynamic environments the GA is perturbed off local optima

and begins to accumulate different intermediate schemata• In smooth environments the GA behaves as if it were operating

in a static environment and prematurely converges

Page 16: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu

Diversity of Schemata

• Remap every string sj in the population into a new string s’j that contains a 1 at location i if sj contains schema i and a 0 if it does not

• Compute the average pairwise hamming distance between s’j and every other s’ in the population, normalizing by string length

• Average this value across all individuals in the population• Average this average across all runs for every generation

Page 17: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu
Page 18: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu

Diversity Results

• Cliffs Variant• Two phases: Exploration then Convergence• Exploration causes sharp changes in the diversity of schemata

because the individuals that are currently being rewarded have different schemata than those that were previously rewarded

• Smooth Variant exhibits a similar but weaker effect• Weight Variant

• Never affected by changes in the landscape• Lower diversity in schemata space overall indicating the GA

populations never contain within them many different schemata at the same time

Page 19: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu

Overall Conclusions

• We have provided additional confirmation for our hypothesis that dynamic environments and abrupt changes stop the GA from prematurely converging

• We can define local optima as places where it is difficult for the GA to acquire new schemata, given this definition semantic examinations like what we have done are some of the best observations for understanding the behavior of the GA

Page 20: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu

Future Work

• New Mysteries• Why does the Cliffs variant feature non-monotonic acquisition

of the potholes and the other variants do not?• Why do the spikes in the diversity graph have the shape they

do? Why do they increase in size until the optimal is found?

• “Tracing” of schemata ala radioactive tagging of genes (Paper in progress)

• New variants of the sl-hdfs that combine short building blocks with rough transitions (GECCO 2007)

Page 21: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu

Acknowledgements

• U of M’s Center for the Study of Complex Systems and Carl Simon for financial support for Rick Riolo and computational resources

• Northwestern Institute on Complex Systems for support of William Rand

Page 22: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu

Any Questions?

Page 23: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu

UnrestrictedConstruction

ElementarySchema

ElementarySchema

PotholePothole

ElementarySchema

ElementarySchema

IntermediateSchema

Highest LevelSchema

IntermediateSchema

IntermediateSchema

IntermediateSchema

Pothole

Pothole

Page 24: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu

Restricted Construction

Pothole Pothole Pothole Pothole Pothole

ElementarySchema

ElementarySchema

ElementarySchema

IntermediateSchema

IntermediateSchema

Highest LevelSchema

ElementarySchema

ElementarySchema

Page 25: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu

RandomConstruction

ElementarySchema10******

ElementarySchema**00****

ElementarySchema****11**

ElementarySchema******10

IntermediateSchema10**11**

IntermediateSchema**00**10

Page 26: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu

Neighbor Construction

ElementarySchema10******

ElementarySchema**00****

ElementarySchema****11**

ElementarySchema******10

IntermediateSchema1000****

IntermediateSchema****1110

Page 27: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu

Shaking byForm

ElementarySchema

ElementarySchema

ElementarySchema

ElementarySchema

IntermediateSchema(w = 3)

IntermediateSchema(w = 3)

ElementarySchema

ElementarySchema

ElementarySchema

ElementarySchema

IntermediateSchema(w = 3)

IntermediateSchema(w = 3)

Page 28: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu

Shaking byWeight

ElementarySchema

ElementarySchema

ElementarySchema

ElementarySchema

IntermediateSchema

(w = 3.12)

IntermediateSchema

(w = 2.77)

ElementarySchema

ElementarySchema

ElementarySchema

ElementarySchema

IntermediateSchema

(w = 2.12)

IntermediateSchema(w = 2.5)

Page 29: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu

Three Variants

Variant Construction MethodElementary

Schemata LengthShaking Method

Cliffs Unrestricted, Random Undefined Form

Smooth Restricted, Random Undefined Form

Weight Restricted, Neighbor 50 Weight

Page 30: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu

Shaking The LadderCliffs VariantUndefined Length

ElementarySchema

PotholePothole

Pothole Pothole

ElementarySchema

ElementarySchema

ElementarySchema

IntermediateSchema

Highest LevelSchema Delete

IntermediateSchemata

Generate NewIntermediateSchemata

IntermediateSchema

IntermediateSchema

IntermediateSchema

Page 31: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu

Shaking The Ladder

Pothole Pothole Pothole Pothole Pothole

ElementarySchema

ElementarySchema

ElementarySchema

ElementarySchema

ElementarySchema

IntermediateSchema

IntermediateSchema

Highest LevelSchema Delete

IntermediateSchemata

Generate NewIntermediateSchemata

Smooth VariantUndefined Length

Page 32: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu

Shaking The Ladder

Pothole Pothole Pothole Pothole Pothole

ElementarySchema

ElementarySchema

ElementarySchema

ElementarySchema

ElementarySchema

IntermediateSchema

IntermediateSchema

Highest LevelSchema Delete

IntermediateWeights

Generate NewIntermediate Weights

Weight VariantShort Length

Page 33: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu

Cliffs Variant Performance Results

Page 34: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu

Smooth Variant Performance Results

Page 35: Understanding the Semantics of the Genetic Algorithm in Dynamic Environments Abir Alharbi William Rand Rick Riolo a_alharbi@mail.comwrand@northwestern.edurlriolo@umich.edu

Weight Variant Performance Results