LectureLecture 1010 EvolutionaryEvolutionary Computation:Computation: EvolutionEvolution strategiesstrategies andand geneticgenetic programmingprogramming EvolutionEvolution strategiesstrategies GeneticGenetic programmingprogramming SummarySummary
Negnevitsky, Pearson Education, 2002 1 EvolutionEvolution StrategiesStrategies AnotherAnother approachapproach toto simulatingsimulating naturalnatural evolutionevolution waswas proposedproposed inin GermanyGermany inin thethe earlyearly 1960s.1960s. UnlikeUnlike geneticgenetic algorithms,algorithms, thisthis approachapproach −− calledcalled anan evolutionevolution strategystrategy −− waswas designeddesigned toto solvesolve technicaltechnical optimisationoptimisation problems.problems.
Negnevitsky, Pearson Education, 2002 2 InIn 19631963 twotwo studentsstudents ofof thethe TechnicalTechnical UniversityUniversity ofof Berlin,Berlin, IngoIngo RechenbergRechenberg andand Hans-PaulHans-Paul SchwefelSchwefel,, werewere workingworking onon thethe searchsearch forfor thethe optimaloptimal shapesshapes ofof bodiesbodies inin aa flow.flow. TheyThey decideddecided toto trytry randomrandom changeschanges inin thethe parametersparameters definingdefining thethe shapeshape followingfollowing thethe exampleexample ofof naturalnatural mutation.mutation. AsAs aa result,result, thethe evolutionevolution strategystrategy waswas born.born. EvolutionEvolution strategiesstrategies werewere developeddeveloped asas anan alternativealternative toto thethe engineer’sengineer’s intuition.intuition. UnlikeUnlike GAsGAs,, evolutionevolution strategiesstrategies useuse onlyonly aa mutationmutation operator.operator.
Negnevitsky, Pearson Education, 2002 3 BasicBasic evolutionevolution strategiesstrategies InIn itsits simplestsimplest form,form, termedtermed asas aa (1(1++1)-evolution1)-evolution strategy,strategy, oneone parentparent generatesgenerates oneone offspringoffspring perper generationgeneration byby applyingapplying normallynormally distributeddistributed mutation.mutation. TheThe (1(1++1)-evolution1)-evolution strategystrategy cancan bebe implementedimplemented asas follows:follows: StepStep 11:: ChooseChoose thethe numbernumber ofof parametersparameters NN toto representrepresent thethe problem,problem, andand thenthen determinedetermine aa feasiblefeasible rangerange forfor eacheach parameter:parameter: {}{}{} x1min , x1max , x2min, x2max , . . . , xNmin , xNmax DefineDefine aa standardstandard deviationdeviation forfor eacheach parameterparameter andand thethe functionfunction toto bebe optimisedoptimised..
Negnevitsky, Pearson Education, 2002 4 StepStep 22:: RandomlyRandomly selectselect anan initialinitial valuevalue forfor eacheach parameterparameter fromfrom thethe respectiverespective feasiblefeasible range.range. TheThe setset ofof thesethese parametersparameters willwill constituteconstitute thethe initialinitial populationpopulation ofof parentparent parameters:parameters:
xx1,, xx2,, ...... ,, xxN StepStep 33:: CalculateCalculate thethe solutionsolution associatedassociated withwith thethe parentparent parameters:parameters:
XX == ff ((xx1,, xx2,, ...... ,, xxN))
Negnevitsky, Pearson Education, 2002 5 StepStep 44:: CreateCreate aa newnew (offspring)(offspring) parameterparameter byby addingadding aa normallynormally distributeddistributed randomrandom variablevariable aa withwith meanmean zerozero andand pre-selectedpre-selected deviationdeviation δδ toto eacheach parentparent parameterparameter:: ′ = + ()δ xi xi a 0, ii == 1,1, 2,2, ...... ,, NN NormallyNormally distributeddistributed mutationsmutations withwith meanmean zerozero reflectreflect thethe naturalnatural processprocess ofof evolutionevolution (smaller(smaller changeschanges occuroccur moremore frequentlyfrequently thanthan largerlarger ones).ones).
StepStep 55:: CalculateCalculate thethe solutionsolution associatedassociated withwith thethe offspringoffspring parameters:parameters: ′ = ()′ ′ ′ X f x1, x2, . . . , xN
Negnevitsky, Pearson Education, 2002 6 StepStep 66:: CompareCompare thethe solutionsolution associatedassociated withwith thethe offspringoffspring parametersparameters withwith thethe oneone associatedassociated withwith thethe parentparent parameters.parameters. IfIf thethe solutionsolution forfor thethe offspringoffspring isis betterbetter thanthan thatthat forfor thethe parents,parents, replacereplace thethe parentparent populationpopulation withwith thethe offspringoffspring population.population. Otherwise,Otherwise, keepkeep thethe parentparent parameters.parameters.
StepStep 77:: GoGo toto StepStep 4,4, andand repeatrepeat thethe processprocess untiluntil aa satisfactorysatisfactory solutionsolution isis reached,reached, oror aa specifiedspecified numbernumber ofof generationsgenerations isis consideredconsidered..
Negnevitsky, Pearson Education, 2002 7 AnAn evolutionevolution strategystrategy reflectsreflects thethe naturenature ofof aa chromosome.chromosome. AA singlesingle genegene maymay simultaneouslysimultaneously affectaffect severalseveral characteristicscharacteristics ofof thethe livingliving organism.organism. OnOn thethe otherother hand,hand, aa singlesingle characteristiccharacteristic ofof anan individualindividual maymay bebe determineddetermined byby thethe simultaneoussimultaneous interactionsinteractions ofof severalseveral genes.genes. TheThe naturalnatural selectionselection actsacts onon aa collectioncollection ofof genes,genes, notnot onon aa singlesingle genegene inin isolation.isolation.
Negnevitsky, Pearson Education, 2002 8 GeneticGenetic programmingprogramming OneOne ofof thethe centralcentral problemsproblems inin computercomputer sciencescience isis howhow toto makemake computerscomputers solvesolve problemsproblems withoutwithout beingbeing explicitlyexplicitly programmedprogrammed toto dodo so.so. GeneticGenetic programmingprogramming offersoffers aa solutionsolution throughthrough thethe evolutionevolution ofof computercomputer programsprograms byby methodsmethods ofof naturalnatural selection.selection. InIn fact,fact, geneticgenetic programmingprogramming isis anan extensionextension ofof thethe conventionalconventional geneticgenetic algorithm,algorithm, butbut thethe goalgoal ofof geneticgenetic programmingprogramming isis notnot justjust toto evolveevolve aa bit-bit- stringstring representationrepresentation ofof somesome problemproblem butbut thethe computercomputer codecode thatthat solvessolves thethe problem.problem.
Negnevitsky, Pearson Education, 2002 9 GeneticGenetic programmingprogramming isis aa recentrecent developmentdevelopment inin thethe areaarea ofof evolutionaryevolutionary computation.computation. ItIt waswas greatlygreatly stimulatedstimulated inin thethe 1990s1990s byby JohnJohn KozaKoza.. AccordingAccording toto Koza,Koza, geneticgenetic programmingprogramming searchessearches thethe spacespace ofof possiblepossible computercomputer programsprograms forfor aa programprogram thatthat isis highlyhighly fitfit forfor solvingsolving thethe problemproblem atat hand.hand. AnyAny computercomputer programprogram isis aa sequencesequence ofof operationsoperations (functions)(functions) appliedapplied toto valuesvalues (arguments),(arguments), butbut differentdifferent programmingprogramming languageslanguages maymay includeinclude differentdifferent typestypes ofof statementsstatements andand operations,operations, andand havehave differentdifferent syntacticsyntactic restrictions.restrictions.
Negnevitsky, Pearson Education, 2002 10 SinceSince geneticgenetic programmingprogramming manipulatesmanipulates programsprograms byby applyingapplying geneticgenetic operators,operators, aa programmingprogramming languagelanguage shouldshould permitpermit aa computercomputer programprogram toto bebe manipulatedmanipulated asas datadata andand thethe newlynewly createdcreated datadata toto bebe executedexecuted asas aa program.program. ForFor thesethese reasons,reasons, LISPLISP waswas chosenchosen asas thethe mainmain languagelanguage forfor geneticgenetic programming.programming.
Negnevitsky, Pearson Education, 2002 11 LISPLISP structurestructure LISPLISP hashas aa highlyhighly symbol-orientedsymbol-oriented structure.structure. ItsIts basicbasic datadata structuresstructures areare atomsatoms andand listslists.. AnAn atomatom isis thethe smallestsmallest indivisibleindivisible elementelement ofof thethe LISPLISP syntax.syntax. TheThe numbernumber 2121,, thethe symbolsymbol XX andand thethe stringstring “This“This isis aa string”string” areare examplesexamples ofof LISPLISP atoms.atoms. AA listlist isis anan objectobject composedcomposed ofof atomsatoms and/orand/or otherother lists.lists. LISPLISP listslists areare writtenwritten asas anan orderedordered collectioncollection ofof itemsitems insideinside aa pairpair ofof parentheses.parentheses.
Negnevitsky, Pearson Education, 2002 12 LISPLISP structurestructure ForFor example,example, thethe listlist −− (( ((* AA B)B) C)C) callscalls forfor thethe applicationapplication ofof thethe subtractionsubtraction functionfunction ((−−)) toto twotwo arguments,arguments, namelynamely thethe listlist (*A(*A B)B) andand thethe atomatom C.C. First,First, LISPLISP appliesapplies thethe multiplicationmultiplication functionfunction (*)(*) toto thethe atomsatoms AA andand B.B. OnceOnce thethe listlist (*A(*A B)B) isis evaluated,evaluated, LISPLISP appliesapplies thethe subtractionsubtraction functionfunction ((−−)) toto thethe twotwo arguments,arguments, andand thusthus evaluatesevaluates thethe entireentire listlist −− (( ((* AA B)B) C).C).
Negnevitsky, Pearson Education, 2002 13 GraphicalGraphical representationrepresentation ofof LISPLISP S-expressionsS-expressions BothBoth atomsatoms andand listslists areare calledcalled symbolicsymbolic expressionsexpressions oror S-expressionsS-expressions.. InIn LISP,LISP, allall datadata andand allall programsprograms areare S-expressions.S-expressions. ThisThis givesgives LISPLISP thethe abilityability toto operateoperate onon programsprograms asas ifif theythey werewere data.data. InIn otherother words,words, LISPLISP programsprograms cancan modifymodify themselvesthemselves oror eveneven writewrite otherother LISPLISP programs.programs. ThisThis remarkableremarkable propertyproperty ofof LISPLISP makesmakes itit veryvery attractiveattractive forfor geneticgenetic programmingprogramming.. AnyAny LISPLISP S-expressionS-expression cancan bebe depicteddepicted asas aa rootedrooted point-labelledpoint-labelled treetree withwith orderedordered branches.branches.
Negnevitsky, Pearson Education, 2002 14 LISPLISP S-expressionS-expression ((−− (*A(*A B)B) C)C)
−
* C
A B
Negnevitsky, Pearson Education, 2002 15 HowHow dodo wewe applyapply geneticgenetic programmingprogramming toto aa problem?problem? BeforeBefore applyingapplying geneticgenetic programmingprogramming toto aa problem,problem, wewe mustmust accomplishaccomplish fivefive preparatorypreparatory stepssteps:: 1.1. DetermineDetermine thethe setset ofof terminals.terminals. 2.2. SelectSelect thethe setset ofof primitiveprimitive functions.functions. 3.3. DefineDefine thethe fitnessfitness function.function. 4.4. DecideDecide onon thethe parametersparameters forfor controllingcontrolling thethe run.run. 5.5. ChooseChoose thethe methodmethod forfor designatingdesignating aa resultresult ofof thethe runrun..
Negnevitsky, Pearson Education, 2002 16 TheThe PythagoreanPythagorean TheoremTheorem helpshelps usus toto illustrateillustrate thesethese preparatorypreparatory stepssteps andand demonstratedemonstrate thethe potentialpotential ofof geneticgenetic programming.programming. TheThe theoremtheorem sayssays thatthat thethe hypotenuse,hypotenuse, cc,, ofof aa rightright triangletriangle withwith shortshort sidessides aa andand bb isis givengiven byby
c = a2 + b2