abrahamieeeorg httpwwwajithsoftcomputingnet Department of Electronics Engineering and Telecommunications Engineering Faculty State University of Rio de Janeiro Rua S ao Francisco Xavier 524 Sala 5022D Maracan a Rio de Janeiro Brazil nadiaenguerjbr ht ID: 24631
Download Pdf The PPT/PDF document "Evolutionary Computation from Genetic Al..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
EvolutionaryComputation:fromGeneticAlgorithmstoGeneticProgrammingAjithAbraham,NadiaNedjahandLuizadeMacedoMourelleSchoolofComputerScienceandEngineeringChung-AngUniversity410,2ndEngineeringBuilding221,Heukseok-dong,Dongjak-guSeoul156-756,Koreaajith.abraham@ieee.org,http://www.ajith.softcomputing.netDepartmentofElectronicsEngineeringandTelecommunications,EngineeringFaculty,StateUniversityofRiodeJaneiro,RuaSaoFranciscoXavier,524,Sala5022-D,a,RiodeJaneiro,Brazilnadia@eng.uerj.br,http://www.eng.uerj.br/~nadiaDepartmentofSystemEngineeringandComputation,EngineeringFaculty,StateUniversityofRiodeJaneiro,RuaSaoFranciscoXavier,524,Sala5022-D,a,RiodeJaneiro,Brazilldmm@eng.uerj.br,http://www.eng.uerj.br/~ldmmEvolutionarycomputation,oerspracticaladvantagestotheresearcherfacingdicultoptimizationproblems.Theseadvantagesaremulti-fold,includingthesimplicityoftheapproach,itsrobustresponsetochangingcircumstance,itsexibility,andmanyotherfacets.Theevolutionaryapproachcanbeappliedtoproblemswhereheuristicsolutionsarenotavailableorgenerallyleadtounsatisfactoryresults.Asaresult,evolutionarycomputationhavereceivedincreasedinterest,particularlywithregardstothemannerinwhichtheymaybeappliedforpracticalproblemsolving.Inthischapter,wereviewthedevelopmentoftheeldofevolutionarycom-putationsfromstandardgeneticalgorithmstogeneticprogramming,passingbyevolutionstrategiesandevolutionaryprogramming.Foreachoftheseorien-tations,weidentifythemaindierencesfromtheothers.Wealso,describethemostpopularvariantsofgeneticprogramming.Theseincludelineargeneticprogramming(LGP),geneexpressionprogramming(GEP),multi-expressonprogramming(MEP),Cartesiangeneticprogramming(CGP),tracelessge-neticprogramming(TGP),gramaticalevolution(GE)andgeneticglgorithmforderivingsoftware(GADS).A.Abrahametal.:EvolutionaryComputation:fromGeneticAlgorithmstoGeneticProgram-,StudiesinComputationalIntelligence(SCI),1 Springer-VerlagBerlinHeidelberg2006 2AjithAbrahametal.1.1IntroductionInnature,evolutionismostlydeterminedbynaturalselectionordierentindividualscompetingforresourcesintheenvironment.Thoseindividualsthatarebetteraremorelikelytosurviveandpropagatetheirgeneticmaterial.Theencodingforgeneticinformation(genome)isdoneinawaythatadmitsasexualreproductionwhichresultsinospringthataregeneticallyidenticaltotheparent.Sexualreproductionallowssomeexchangeandre-orderingofchromosomes,producingospringthatcontainacombinationofinformationfromeachparent.Thisistherecombinationoperation,whichisoftenreferredtoascrossoverbecauseofthewaystrandsofchromosomescrossoverduringtheexchange.Thediversityinthepopulationisachievedbymutation.Evolutionaryalgorithmsareubiquitousnowadays,havingbeensuccess-fullyappliedtonumerousproblemsfromdierentdomains,includingop-timization,automaticprogramming,machinelearning,operationsresearch,bioinformatics,andsocialsystems.Inmanycasesthemathematicalfunction,whichdescribestheproblemisnotknownandthevaluesatcertainparame-tersareobtainedfromsimulations.Incontrasttomanyotheroptimizationtechniquesanimportantadvantageofevolutionaryalgorithmsistheycancopewithmulti-modalfunctions.Usuallygroupedunderthetermevolutionarycomputation[]orevolu-tionaryalgorithms,wendthedomainsofgeneticalgorithms[],evolutionstrategies[],evolutionaryprogramming[]andgeneticprogrammingprogramming11].Theyallshareacommonconceptualbaseofsimulatingtheevolutionofindividualstructuresviaprocessesofselection,mutation,andreproduc-tion.Theprocessesdependontheperceivedperformanceoftheindividualstructuresasdenedbytheproblem.Apopulationofcandidatesolutions(fortheoptimizationtasktobesolved)isinitialized.Newsolutionsarecreatedbyapplyingreproductionoperators(mutationand/orcrossover).Thetness(howgoodthesolutionsare)oftheresultingsolutionsareevaluatedandsuitableselectionstrategyisthenappliedtodeterminewhichsolutionswillbemaintainedintothenextgeneration.TheprocedureistheniteratedandisillustratedinFig. ReplacementReproductionSelectionPopulationParentsFig.1.1.Flowchartofanevolutionaryalgorithm 1EvolutionaryComputation:fromGAtoGP31.1.1AdvantagesofEvolutionaryAlgorithmsAprimaryadvantageofevolutionarycomputationisthatitisconceptuallysimple.Theproceduremaybewrittenasdierenceequation((t+1]==t]))(1.1)(1.1)t]isthepopulationattimeunderarepresentationisarandomvariationoperator,andistheselectionoperator[Otheradvantagescanbelistedasfollows:Evolutionaryalgorithmperformanceisrepresentationindependent,incon-trastwithothernumericaltechniques,whichmightbeapplicableforonlycontinuousvaluesorotherconstrainedsets.Evolutionaryalgorithmsoeraframeworksuchthatitiscomparablyeasytoincorporatepriorknowledgeabouttheproblem.Incorporatingsuchin-formationfocusestheevolutionarysearch,yieldingamoreecientexplo-rationofthestatespaceofpossiblesolutions.Evolutionaryalgorithmscanalsobecombinedwithmoretraditionalop-timizationtechniques.Thismaybeassimpleastheuseofagradientminimizationusedafterprimarysearchwithanevolutionaryalgorithm(forexamplenetuningofweightsofaevolutionaryneuralnetwork),oritmayinvolvesimultaneousapplicationofotheralgorithms(e.g.,hybridiz-ingwithsimulatedannealingortabusearchtoimprovetheeciencyofbasicevolutionarysearch).Theevaluationofeachsolutioncanbehandledinparallelandonlyselec-tion(whichrequiresatleastpairwisecompetition)requiressomeserialprocessing.ImplicitparallelismisnotpossibleinmanyglobaloptimizationalgorithmslikesimulatedannealingandTabusearch.Traditionalmethodsofoptimizationarenotrobusttodynamicchangesinproblemtheenvironmentandoftenrequireacompleterestartinordertoprovideasolution(e.g.,dynamicprogramming).Incontrast,evolutionaryalgorithmscanbeusedtoadaptsolutionstochangingcircumstance.Perhapsthegreatestadvantageofevolutionaryalgorithmscomesfromtheabilitytoaddressproblemsforwhichtherearenohumanexperts.Althoughhumanexpertiseshouldbeusedwhenitisavailable,itoftenproveslessthanadequateforautomatingproblem-solvingroutines.1.2GeneticAlgorithmsAtypicalowchartofaGeneticAlgorithm(GA)isdepictedinFig..Oneiterationofthealgorithmisreferredtoasageneration.ThebasicGAisverygenericandtherearemanyaspectsthatcanbeimplementeddierentlyaccordingtotheproblem(Forinstance,representationofsolutionorchromo-somes,typeofencoding,selectionstrategy,typeofcrossoverandmutation 4AjithAbrahametal.operators,etc.)Inpractice,GAsareimplementedbyhavingarraysofbitsorcharacterstorepresentthechromosomes.Theindividualsinthepopulationthengothroughaprocessofsimulatedevolution.Simplebitmanipulationoperationsallowtheimplementationofcrossover,mutationandotheropera-tions.Thenumberofbitsforeverygene(parameter)andthedecimalrangeinwhichtheydecodeareusuallythesamebutnothingprecludestheutilizationofadierentnumberofbitsorrangeforeverygene. InitializePopulationEvaluateFitnessFound?ReproductionFig.1.2.FlowchartofbasicgeneticalgorithmiterationWhencomparedtootherevolutionaryalgorithms,oneofthemostim-portantGAfeatureisitsfocusonxed-lengthcharacterstringsalthoughvariable-lengthstringsandotherstructureshavebeenused.1.2.1EncodingandDecodingInatypicalapplicationofGAs,thegivenproblemistransformedintoasetofgeneticcharacteristics(parameterstobeoptimized)thatwillsurviveinthebestpossiblemannerintheenvironment.Example,ifthetaskistooptimizethefunctiongivenin8(1.2) 1EvolutionaryComputation:fromGAtoGP5Theparametersofthesearchareidentiedas,whicharecalledthephenotypesinevolutionaryalgorithms.Ingeneticalgorithms,thephe-notypes(parameters)areusuallyconvertedtogenotypesbyusingacodingprocedure.Knowingtherangesofeachvariableistoberepresentedusingasuitablebinarystring.Thisrepresentationusingbinarycodingmakestheparametricspaceindependentofthetypeofvariablesused.Thegenotype(chromosome)shouldinsomewaycontaininformationaboutsolution,whichisalsoknownasencoding.GAsuseabinarystringencodingasshownbelow.ChromosomeA:ChromosomeB:Eachbitinthechromosomestringscanrepresentsomecharacteristicofthesolution.Thereareseveraltypesofencoding(example,directintegerorrealnumbersencoding).Theencodingdependsdirectlyontheproblem.Permutationencodingcanbeusedinorderingproblems,suchasTravellingSalesmanProblem(TSP)ortaskorderingproblem.Inpermutationencoding,everychromosomeisastringofnumbers,whichrepresentsnumberinase-quence.Achromosomeusingpermutationencodingfora9cityTSPproblemwilllooklikeasfollows:ChromosomeA:ChromosomeB:Chromosomerepresentsorderofcities,inwhichsalesmanwillvisitthem.Specialcareistotakentoensurethatthestringsrepresentrealsequencesaftercrossoverandmutation.Floating-pointrepresentationisveryusefulfornumericoptimization(example:forencodingtheweightsofaneuralnetwork).Itshouldbenotedthatinmanyrecentapplicationsmoresophisticatedgeno-typesareappearing(example:chromosomecanbeatreeofsymbols,orisacombinationofastringandatree,somepartsofthechromosomearenotallowedtoevolveetc.)1.2.2SchemaTheoremandSelectionStrategiesTheoreticalfoundationsofevolutionaryalgorithmscanbepartiallyexplainedbyschematheorem[],whichreliesontheconceptofschemata.Schemataaretemplatesthatpartiallyspecifyasolution(morestrictly,asolutioninthegenotypespace).Ifgenotypesarestringsbuiltusingsymbolsfromanalphabet,schemataarestringswhosesymbolsbelongto{}.Thisextra-symbol*mustbeinterpretedasawildcard,beinglocioccupiedbyitcalledundened.Achromosomeissaidtomatchaschemaiftheyagreeinthedenedpositions.Forexample,thestring10011010matchestheschemata1*******and**011***amongothers,butdoesnotmatch*1*11***becausetheydierinthesecondgene(therstdenedgeneintheschema).Aschemacanbeviewed 6AjithAbrahametal.asahyper-planeina-dimensionalspacerepresentingasetofsolutionswithcommonproperties.Obviously,thenumberofsolutionsthatmatchaschemadependonthenumberofdenedpositionsinit.Anotherrelatedconceptisofaschema,denedasthedistancebetweentherstandthelastdenedpositionsinit.TheGAworksbyallocatingstringstobestschemataexponentiallythroughsuccessivegenerations,beingtheselectionmechanismthemainresponsibleforthisbehaviour.Ontheotherhandthecrossoveroperatorisresponsibleforexploringnewcombinationsofthepresentschematainordertogetthettestindividuals.Finallythepurposeofthemutationoperatoristointroducefreshgenotypicmaterialinthepopulation.1.2.3ReproductionOperatorsIndividualsforproducingospringarechosenusingaselectionstrategyafterevaluatingthetnessvalueofeachindividualintheselectionpool.Eachindividualintheselectionpoolreceivesareproductionprobabilitydependingonitsowntnessvalueandthetnessvalueofallotherindividualsintheselectionpool.Thistnessisusedfortheactualselectionstepafterwards.Someofthepopularselectionschemesarediscussedbelow.RouletteWheelSelectionThesimplestselectionschemeisroulette-wheelselection,alsocalledstochasticsamplingwithreplacement.Thistechniqueisanalogoustoaroulettewheelwitheachsliceproportionalinsizetothetness.Theindividualsaremappedtocontiguoussegmentsofaline,suchthateachindividualssegmentisequalinsizetoitstness.Arandomnumberisgeneratedandtheindividualwhosesegmentspanstherandomnumberisselected.Theprocessisrepeatedun-tilthedesirednumberofindividualsisobtained.AsillustratedinFig.chromosomehasthehighestprobabilityforbeingselectedsinceithasthehighesttness.TournamentSelectionIntournamentselectionanumberofindividualsischosenrandomlyfromthepopulationandthebestindividualfromthisgroupisselectedasparent.Thisprocessisrepeatedasoftenasindividualstochoose.Theseselectedparentsproduceuniformatrandomospring.Thetournamentsizewilloftendependontheproblem,populationsizeetc.Theparameterfortournamentselectionisthetournamentsize.Tournamentsizetakesvaluesrangingfrom2 numberofindividualsinpopulation. 1EvolutionaryComputation:fromGAtoGP7 1 Chromosome2 3 Chromosome4 Fig.1.3.RoulettewheelselectionWhencreatingnewpopulationbycrossoverandmutation,wehaveabigchancethatwewilllosethebestchromosome.Elitismisnameofthemethodthatrstcopiesthebestchromosome(orafewbestchromosomes)tonewpopulation.Therestisdoneinclassicalway.ElitismcanveryrapidlyincreaseperformanceofGA,becauseitpreventslosingthebest-foundsolution.GeneticOperatorsCrossoverandmutationaretwobasicoperatorsofGA.PerformanceofGAverymuchdependsonthegeneticoperators.Typeandimplementationofop-eratorsdependsonencodingandalsoontheproblem.Therearemanywayshowtodocrossoverandmutation.Inthissectionwewilldemonstratesomeofthepopularmethodswithsomeexamplesandsuggestionshowtodoitfordierentencodingschemes.Crossover.Itselectsgenesfromparentchromosomesandcreatesanewo-spring.Thesimplestwaytodothisistochooserandomlysomecrossoverpointandeverythingbeforethispointiscopiedfromtherstparentandtheneverythingafteracrossoverpointiscopiedfromthesecondparent.Asinglepointcrossoverisillustratedasfollows(isthecrossoverpoint):ChromosomeA:ChromosomeB:OspringA:OspringB:AsillustratedinFig.,thereareseveralcrossovertechniques.Inauni-formcrossoverbitsarerandomlycopiedfromtherstorfromthesecond 8AjithAbrahametal. Uniformcrossoverparentparent Two-pointcrossoverparentparent Single-pointcrossoverparentparentFig.1.4.Typesofcrossoveroperatorsparent.SpeciccrossovermadeforaspecicproblemcanimprovetheGAperformance.Aftercrossoveroperation,mutationtakesplace.Mutationchangesrandomlythenewospring.Forbinaryencodingmutationisperformedbychangingafewrandomlychosenbitsfrom1to0orfrom0to1.Mutationdependsontheencodingaswellasthecrossover.Forexamplewhenweareencodingpermutations,mutationcouldbeexchangingtwogenes.Asimplemutationoperationisillustratedasfollows:ChromosomeA:110ChromosomeB:110110 1EvolutionaryComputation:fromGAtoGP9OspringA:110OspringB:110110Formanyoptimizationproblemstheremaybemultiple,equal,orunequaloptimalsolutions.SometimesasimpleGAcannotmaintainstablepopulationsatdierentoptimaofsuchfunctions.Inthecaseofunequaloptimalsolutions,thepopulationinvariablyconvergestotheglobaloptimum.helpstomaintainsubpopulationsnearglobalandlocaloptima.Anicheisviewedasanorganismsenvironmentandaspeciesasacollectionoforganismswithsimilarfeatures.Nichinghelpstomaintainsubpopulationsnearglobalandlocaloptimabyintroducingacontrolledcompetitionamongdierentsolutionsneareverylocaloptimalregion.Nichingisachievedbyasharingfunction,whichcreatessubdivisionsoftheenvironmentbydegradinganorganismstnessproportionaltothenumberofothermembersinitsneighbourhood.Theamountofsharingcontributedbyeachindividualintoitsneighbourisdeterminedbytheirproximityinthedecodedparameterspace(phenotypicsharing)basedonadistancemeasure.1.3EvolutionStrategiesEvolutionStrategy(ES)wasdevelopedbyRechenberg[]atTechnicalUni-versity,Berlin.EStendtobeusedforempiricalexperimentsthatarediculttomodelmathematically.ThesystemtobeoptimizedisactuallyconstructedandESisusedtondtheoptimalparametersettings.Evolutionstrategiesmerelyconcentrateontranslatingthefundamentalmechanismsofbiologicalevolutionfortechnicaloptimizationproblems.Theparameterstobeoptimizedareoftenrepresentedbyavectorofrealnumbers(objectparameters Anothervectorofrealnumbersdenesthestrategyparameters()whichcontrolsthemutationoftheobjectiveparameters.Bothobjectandstrategicparametersformthedata-structureforasingleindividual.Apopulationindividualscouldbedescribedas),wherethechromosomeisdenedasop,sp)with,...,o)and,...,s1.3.1MutationinEvolutionStrategiesThemutationoperatorisdenedascomponentwiseadditionofnormaldis-tributedrandomnumbers.Boththeobjectiveparametersandthestrategyparametersofthechromosomearemutated.Amutantsobject-parametersvectoriscalculatedas),where)istheGaussiandistributionofmean-value0andstandarddeviation.UsuallythestrategyparametersmutationstepsizeisdonebyadaptingthestandarddeviationForinstance,thismaybedoneby),whereisrandomlychosenfromor1dependingonthe 10AjithAbrahametal.valueofequallydistributedrandomvariableof[0,1]with5.Theparameterisusuallyreferredtoasstrategyparametersadaptationvalue1.3.2Crossover(Recombination)inEvolutionStrategiesFortwochromosomes))and))thecrossoveroperatorisdened)with)and).Bydening)andavalueisrandomlyassignedforeither(50%selectionprobabilityfor1.3.3ControlingtheEvolutionbethenumberofparentsingeneration1andletbethenumberofchildreningeneration.TherearebasicallyfourdierenttypesofevolutionP/R,CP/Rasdiscussedbelow.Theymainlydierinhowtheparentsforthenextgenerationareselectedandtheusageofcrossoveroperators.P,Cparentsproducechildrenusingmutation.Fitnessvaluesarecalcu-latedforeachofthechildrenandthebestchildrenbecomenextgener-ationparents.Thebestindividualsofchildrenaresortedbytheirtnessvalueandtherstindividualsareselectedtobenextgenerationparentsparentsproducechildrenusingmutation.Fitnessvaluesarecalcu-latedforeachofthechildrenandthebestindividualsofbothparentsandchildrenbecomenextgenerationparents.Childrenandparentsaresortedbytheirtnessvalueandtherstindividualsareselectedtobenextgenerationparents.P/R,Cparentsproducechildrenusingmutationandcrossover.Fitnessvaluesarecalculatedforeachofthechildrenandthebestchildrenbecomenextgenerationparents.Thebestindividualsofchildrenaresortedbytheirtnessvalueandtherstindividualsareselectedtobenextgenerationparents().ExcepttheusageofcrossoveroperatorthisisexactlythesameasP,Cstrategy. 1EvolutionaryComputation:fromGAtoGP11P/Rparentsproducechildrenusingmutationandrecombination.Fitnessvaluesarecalculatedforeachofthechildrenandthebestofbothparentsandchildrenbecomenextgenerationparents.Childrenandparentsaresortedbytheirtnessvalueandtherstindividualsareselectedtobenextgenerationparents.Excepttheusageofcrossoveroperatorthisisexactlythesameasstrategy.1.4EvolutionaryProgrammingFogel,OwensandWalshsbook[]isthelandmarkpublicationforEvolution-aryProgramming(EP).Inthebook,FinitestateautomataareevolvedtopredictsymbolstringsgeneratedfromMarkovprocessesandnon-stationarytimeseries.Thebasicevolutionaryprogrammingmethodinvolvesthefollow-ingsteps:1.Chooseaninitialpopulation(possiblesolutionsatrandom).Thenumberofsolutionsinapopulationishighlyrelevanttothespeedofoptimiza-tion,butnodeniteanswersareavailableastohowmanysolutionsareappropriate(otherthan1)andhowmanysolutionsarejustwasteful.2.Newospringsarecreatedbymutation.Eachospringsolutionisas-sessedbycomputingitstness.Typically,astochastictournamentisheldtodetermineNsolutionstoberetainedforthepopulationofsolutions.Itshouldbenotedthatevolutionaryprogrammingmethodtypicallydoesnotuseanycrossoverasageneticoperator.Whencomparingevolutionaryprogrammingtogeneticalgorithm,onecanidentifythefollowingdierences:1.GAisimplementedbyhavingarraysofbitsorcharacterstorepresentthechromosomes.InEPtherearenosuchrestrictionsfortherepresentation.Inmostcasestherepresentationfollowsfromtheproblem.2.EPtypicallyusesanadaptivemutationoperatorinwhichtheseverityofmutationsisoftenreducedastheglobaloptimumisapproachedwhileGAsuseapre-xedmutationoperator.Amongtheschemestoadaptthemutationstepsize,themostwidelystudiedbeingthemeta-evolutionarytechniqueinwhichthevarianceofthemutationdistributionissubjecttomutationbyaxedvariancemutationoperatorthatevolvesalongwiththesolution.Ontheotherhand,whencomparingevolutionaryprogrammingtoevolu-tionstrategies,onecanidentifythefollowingdierences:1.Whenimplementedtosolvereal-valuedfunctionoptimizationproblems,bothtypicallyoperateontherealvaluesthemselvesanduseadaptivereproductionoperators. 12AjithAbrahametal.2.EPtypicallyusesstochastictournamentselectionwhileEStypicallyusesdeterministicselection.3.EPdoesnotusecrossoveroperatorswhileES(P/R,CandP/R+Cstrate-gies)usescrossover.Howevertheeectivenessofthecrossoveroperatorsdependsontheproblemathand.1.5GeneticProgrammingGeneticProgramming(GP)techniqueprovidesaframeworkforautomaticallycreatingaworkingcomputerprogramfromahigh-levelproblemstatementoftheproblem[].Geneticprogrammingachievesthisgoalofautomaticpro-grammingbygeneticallybreedingapopulationofcomputerprogramsusingtheprinciplesofDarwiniannaturalselectionandbiologicallyinspiredopera-tions.Theoperationsincludemostofthetechniquesdiscussedintheprevioussections.Themaindierencebetweengeneticprogrammingandgenetical-gorithmsistherepresentationofthesolution.GeneticprogrammingcreatescomputerprogramsintheLISPorschemecomputerlanguagesastheso-lution.LISPisanacronymforLIStProcessorandwasdevelopedbyJohnMcCarthyinthelate1950s[].Unlikemostlanguages,LISPisusuallyusedasaninterpretedlanguage.Thismeansthat,unlikecompiledlanguages,aninterpretercanprocessandresponddirectlytoprogramswritteninLISP.ThemainreasonforchoosingLISPtoimplementGPisduetotheadvantageofhavingtheprogramsanddatahavethesamestructure,whichcouldprovideeasymeansformanipulationandevaluation.Geneticprogrammingistheextensionofevolutionarylearningintothespaceofcomputerprograms.InGPtheindividualpopulationmembersarenotxedlengthcharacterstringsthatencodepossiblesolutionstotheproblemathand,theyareprogramsthat,whenexecuted,arethecandidatesolutionstotheproblem.Theseprogramsareexpressedingeneticprogrammingasparsetrees,ratherthanaslinesofcode.Forexample,thesimpleprogram,a,c)wouldberepresentedasshowninFig..Theterminalandfunctionsetsarealsoimportantcomponentsofgeneticprogramming.Theterminalandfunctionsetsarethealphabetoftheprogramstobemade.Theterminalsetconsistsofthevariables(example,inFig.)andconstants(example,4inFig.Themostcommonwayofwritingdownafunctionwithtwoargumentsistheinxnotation.Thatis,thetwoargumentsareconnectedwiththeoperationsymbolbetweenthemas.Adierentmethodistheprexnotation.Heretheoperationsymboliswrittendownrst,fol-lowedbyitsrequiredargumentsas+.Whilethismaybeabitmoredicultorjustunusualforhumaneyes,itopenssomeadvantagesforcomputationaluses.ThecomputerlanguageLISPusessymbolicexpressions(orS-expressions)composedinprexnotation.ThenasimpleS-expressioncouldbe(operator,argument)whereoperatoristhenameofafunctionand 1EvolutionaryComputation:fromGAtoGP13 Fig.1.5.AsimpletreestructureofGPargumentcanbeeitheraconstantoravariableoreitheranothersymbolicex-pressionas(operator,argumentoperator,argumentoperator,argumentGenerallyspeaking,GPprocedurecouldbesummarizedasfollows:Generateaninitialpopulationofrandomcompositionsofthefunctionsandterminalsoftheproblem;Computethetnessvaluesofeachindividualinthepopulation;Usingsomeselectionstrategyandsuitablereproductionoperatorsproducetwoospring;Procedureisiterateduntiltherequiredsolutionisfoundortheterminationconditionshavereached(speciednumberofgenerations).1.5.1ComputerProgramEncodingAparsetreeisastructurethatgraspstheinterpretationofacomputerpro-gram.Functionsarewrittendownasnodes,theirargumentsasleaves.Asubtreeisthepartofatreethatisunderaninnernodeofthistree.Ifthistreeiscutoutfromitsparent,theinnernodebecomesarootnodeandthesubtreeisavalidtreeofitsown.ThereisacloserelationshipbetweentheseparsetreesandS-expression;infactthesetreesarejustanotherwayofwritingdownexpressions.Whilefunctionswillbethenodesofthetrees(ortheoperatorsintheS-expressions)andcanhaveotherfunctionsastheirarguments,theleaveswillbeformedbyterminals,thatissymbolsthatmaynotbefurtherexpanded.Terminalscanbevariables,constantsorspecicactionsthataretobeperformed.TheprocessofselectingthefunctionsandterminalsthatareneededorusefulforndingasolutiontoagivenproblemisoneofthekeystepsinGP.Evaluation 14AjithAbrahametal.ofthesestructuresisstraightforward.Beginningattherootnode,thevaluesofallsub-expressions(orsubtrees)arecomputed,descendingthetreedowntotheleaves.1.5.2ReproductionofComputerProgramsThecreationofanospringfromthecrossoveroperationisaccomplishedbydeletingthecrossoverfragmentoftherstparentandtheninsertingthecrossoverfragmentofthesecondparent.Thesecondospringisproducedinasymmetricmanner.AsimplecrossoveroperationisillustratedinFig.InGPthecrossoveroperationisimplementedbytakingrandomlyselectedsubtreesintheindividualsandexchangingthem. Fig.1.6.IllustrationofcrossoveroperatorMutationisanotherimportantfeatureofgeneticprogramming.Twotypesofmutationsarecommonlyused.Thesimplesttypeistoreplaceafunctionoraterminalbyafunctionoraterminalrespectively.Inthesecondkindanentiresubtreecanreplaceanothersubtree.Fig.explainstheconceptofmutation.GPrequiresdatastructuresthatareeasytohandleandevaluateandro-busttostructuralmanipulations.Theseareamongthereasonswhytheclass 1EvolutionaryComputation:fromGAtoGP15 Fig.1.7.IllustrationofmutationoperatorinGPofS-expressionswaschosentoimplementGP.Thesetoffunctionsandtermi-nalsthatwillbeusedinaspecicproblemhastobechosencarefully.Ifthesetoffunctionsisnotpowerfulenough,asolutionmaybeverycomplexornottobefoundatall.Likeinanyevolutionarycomputationtechnique,thegenerationofrstpopulationofindividualsisimportantforsuccessfulimple-mentationofGP.Someoftheotherfactorsthatinuencetheperformanceofthealgorithmarethesizeofthepopulation,percentageofindividualsthatparticipateinthecrossover/mutation,maximumdepthfortheinitialindivid-ualsandthemaximumalloweddepthforthegeneratedospringetc.Somespecicadvantagesofgeneticprogrammingarethatnoanalyticalknowledgeisneededandstillcouldgetaccurateresults.GPapproachdoesscalewiththeproblemsize.GPdoesimposerestrictionsonhowthestructureofsolutionsshouldbeformulated.1.6VariantsofGeneticProgrammingSeveralvariantsofGPcouldbeseenintheliterature.SomeofthemareLinearGeneticProgramming(LGP),GeneExpressionProgramming(GEP),MultiExpressionProgramming(MEP),CartesianGeneticProgramming(CGP),TracelessGeneticProgramming(TGP)andGeneticAlgorithmforDerivingSoftware(GADS). 16AjithAbrahametal.1.6.1LinearGeneticProgrammingLineargeneticprogrammingisavariantoftheGPtechniquethatactsonlin-eargenomes[].Itsmaincharacteristicsincomparisontotree-basedGPliesinthattheevolvableunitsarenottheexpressionsofafunctionalprogramminglanguage(likeLISP),buttheprogramsofanimperativelanguage(likec/c++).Thiscantremendouslyhastentheevolutionprocessas,nomatterhowanindividualisinitiallyrepresented,nallyitalwayshastoberepresentedasapieceofmachinecode,astnessevaluationrequiresphysicalexecutionoftheindividuals.Thebasicunitofevolutionhereisanativemachinecodeinstructionthatrunsontheoating-pointprocessorunit(FPU).Sincedif-ferentinstructionsmayhavedierentsizes,hereinstructionsareclubbeduptogethertoforminstructionblocksof32bitseach.Theinstructionblocksholdoneormorenativemachinecodeinstructions,dependingonthesizesoftheinstructions.Acrossoverpointcanoccuronlybetweeninstructionsandispro-hibitedfromoccurringwithinaninstruction.Howeverthemutationoperationdoesnothaveanysuchrestriction.LGPusesaspeciclinearrepresentationofcomputerprograms.ALGPindividualisrepresentedbyavariablelengthsequenceofsimpleClanguageinstructions.Instructionsoperateononeortwoindexedvariables(registers)r,oronconstantscfrompredenedsets.AnimportantLGPparameteristhenumberofregistersusedbyachromo-some.Thenumberofregistersisusuallyequaltothenumberofattributesoftheproblem.Iftheproblemhasonlyoneattribute,itisimpossibletoobtainacomplexexpressionsuchasthequarticpolynomial.Inthatcasewehavetouseseveralsupplementaryregisters.Thenumberofsupplementaryregistersdependsonthecomplexityoftheexpressionbeingdiscovered.Aninappro-priatechoicecanhavedisastrouseectsontheprogrambeingevolved.LGPusesamodiedsteady-statealgorithm.Theinitialpopulationisrandomlygenerated.Thesettingsofvariouslineargeneticprogrammingsystempara-metersareofutmostimportanceforsuccessfulperformanceofthesystem.Thepopulationspacehasbeensubdividedintomultiplesubpopulationordemes.Migrationofindividualsamongthesubpopulationscausesevolutionoftheen-tirepopulation.Ithelpstomaintaindiversityinthepopulation,asmigrationisrestrictedamongthedemes.Moreover,thetendencytowardsabadlocalminimuminonedemecanbecounteredbyotherdemeswithbettersearchdirections.ThevariousLGPsearchparametersarethemutationfrequency,crossoverfrequencyandthereproductionfrequency:Thecrossoveroperatoractsbyexchangingsequencesofinstructionsbetweentwotournamentwin-ners.Steadystategeneticprogrammingapproachwasusedtomanagethememorymoreeectively1.6.2GeneExpressionProgramming(GEP)Theindividualsofgeneexpressionprogrammingareencodedinlinearchro-mosomeswhichareexpressedortranslatedintoexpressiontrees(branched 1EvolutionaryComputation:fromGAtoGP17entities)[].Thus,inGEP,thegenotype(thelinearchromosomes)andthephenotype(theexpressiontrees)aredierententities(bothstructurallyandfunctionally)that,nevertheless,worktogetherforminganindivisiblewhole.Incontrasttoitsanalogouscellulargeneexpression,GEPisrathersimple.ThemainplayersinGEPareonlytwo:thechromosomesandtheExpressionTrees(ETs),beingthelattertheexpressionofthegeneticinformationencodedinthechromosomes.Asinnature,theprocessofinformationdecodingiscalledtranslation.Andthistranslationimpliesobviouslyakindofcodeandasetofrules.Thegeneticcodeisverysimple:aone-to-onerelationshipbetweenthesymbolsofthechromosomeandthefunctionsorterminalstheyrepre-sent.Therulesarealsoverysimple:theydeterminethespatialorganizationofthefunctionsandterminalsintheETsandthetypeofinteractionbetweensub-ETs.GEPuseslinearchromosomesthatstoreexpressionsinbreadth-rstform.AGEPgeneisastringofterminalandfunctionsymbols.GEPgenesarecomposedofaheadanda.Theheadcontainsbothfunctionandterminalsymbols.Thetailmaycontainterminalsymbolsonly.Foreachproblemtheheadlength(denoted)ischosenbytheuser.Thetaillength(denotedbyisevaluatedby:isthenumberofargumentsofthefunctionwithmorearguments.GEPgenesmaybelinkedbyafunctionsymbolinordertoobtainafullyfunctionalchromosome.GEPusesmutation,recombinationandtransposi-tion.GEPusesagenerationalalgorithm.Theinitialpopulationisrandomlygenerated.Thefollowingstepsarerepeateduntilaterminationcriterionisreached:Axednumberofthebestindividualsenterthenextgeneration(elitism).Thematingpoolislledbyusingbinarytournamentselection.Theindividualsfromthematingpoolarerandomlypairedandrecombined.Twoospringareobtainedbyrecombiningtwoparents.Theospringaremutatedandtheyenterthenextgeneration.1.6.3MultiExpressionProgrammingAGPchromosomegenerallyencodesasingleexpression(computerprogram).AMultiExpressionProgramming(MEP)chromosomeencodesseveralexpres-sions[].Thebestoftheencodedsolutionischosentorepresentthechromo-some.TheMEPchromosomehassomeadvantagesoverthesingle-expressionchromosomeespeciallywhenthecomplexityofthetargetexpressionisnotknown.Thisfeaturealsoactsasaproviderofvariable-lengthexpressions.MEPgenesarerepresentedbysubstringsofavariablelength.Thenumberofgenesperchromosomeisconstant.Thisnumberdenesthelengthofthechromosome.Eachgeneencodesaterminalorafunctionsymbol.Agenethatencodesafunctionincludespointerstowardsthefunctionarguments.Func-tionargumentsalwayshaveindicesoflowervaluesthanthepositionofthefunctionitselfinthechromosome. 18AjithAbrahametal.Theproposedrepresentationensuresthatnocycleariseswhilethechro-mosomeisdecoded(phenotypicallytranscripted).Accordingtotheproposedrepresentationscheme,therstsymbolofthechromosomemustbeaterminalsymbol.Inthisway,onlysyntacticallycorrectprograms(MEPindividuals)areobtained.ThemaximumnumberofsymbolsinMEPchromosomeisgivenbytheformula:Number Symbols+1)Number 1)+1isthenumberofargumentsofthefunctionwiththegreatestnum-berofarguments.ThetranslationofaMEPchromosomeintoacomputerprogramrepresentsthephenotypictranscriptionoftheMEPchromosomes.Phenotypictranslationisobtainedbyparsingthechromosometop-down.Aterminalsymbolspeciesasimpleexpression.Afunctionsymbolspeciesacomplexexpressionobtainedbyconnectingtheoperandsspeciedbytheargumentpositionswiththecurrentfunctionsymbol.Duetoitsmultiexpressionrepresentation,eachMEPchromosomemaybeviewedasaforestoftreesratherthanasasingletree,whichisthecaseofGeneticProgramming.1.6.4CartesianGeneticProgrammingCartesianGeneticProgramming(CGP)usesanetworkofnodes(indexedgraph)toachieveaninputtooutputmapping[].Eachnodeconsistsofanumberofinputs,thesebeingusedasparametersinadeterminedmathe-maticalorlogicalfunctiontocreatethenodeoutput.Thefunctionalityandconnectivityofthenodesarestoredasastringofnumbers(thegenotype)andevolvedtoachievetheoptimummapping.Thegenotypeisthenmappedtoanindexedgraphthatcanbeexecutedasaprogram.InCGPthereareverylargenumberofgenotypesthatmaptoidenti-calgenotypesduetothepresenceofalargeamountofredundancy.Firstlythereisnoderedundancythatiscausedbygenesassociatedwithnodesthatarenotpartoftheconnectedgraphrepresentingtheprogram.AnotherformofredundancyinCGP,alsopresentinallotherformsofGPis,functionalredundancy.1.6.5TracelessGeneticProgramming(TGP)ThemaindierencebetweenTracelessGeneticProgrammingandGPisthatTGPdoesnotexplicitlystoretheevolvedcomputerprograms[].TGPisusefulwhenthetrace(thewayinwhichtheresultsareobtained)betweentheinputandoutputisnotimportant.TGPusestwogeneticoperators:crossoverandinsertion.Theinsertionoperatorisusefulwhenthepopulationcontainsindividualsrepresentingverycomplexexpressionsthatcannotimprovethesearch. 1EvolutionaryComputation:fromGAtoGP191.6.6GrammaticalEvolutionGrammaticalevolution[]isagrammar-based,lineargenomesystem.Ingrammaticalevolution,theBackusNaurForm(BNF)specicationofalan-guageisusedtodescribetheoutputproducedbythesystem(acompilablecodefragment).DierentBNFgrammarscanbeusedtoproducecodeauto-maticallyinanylanguage.Thegenotypeisastringofeight-bitbinarynumbersgeneratedatrandomandtreatedasintegervaluesfrom0to255.Thephe-notypeisarunningcomputerprogramgeneratedbyagenotype-phenotypemappingprocess.Thegenotype-phenotypemappingingrammaticalevolutionisdeterministicbecauseeachindividualisalwaysmappedtothesamepheno-type.Ingrammaticalevolution,standardgeneticalgorithmsareappliedtothedierentgenotypesinapopulationusingthetypicalcrossoverandmutationoperators.1.6.7GeneticAlgorithmforDerivingSoftware(GADS)GeneticalgorithmforderivingsoftwareisaGPtechniquewherethegenotypeisdistinctfromthephenotype[].TheGADSgenotypeisalistofintegersrepresentingproductionsinasyntax.Thisisusedtogeneratethephenotype,whichisaprograminthelanguagedenedbythesyntax.Syntacticallyin-validphenotypescannotbegenerated,thoughtheremaybephenotypeswithresidualnonterminals.1.7SummaryThischapterpresentedthebiologicalmotivationandfundamentalaspectsofevolutionaryalgorithmsanditsconstituents,namelygeneticalgorithm,evo-lutionstrategies,evolutionaryprogrammingandgeneticprogramming.Mostpopularvariantsofgeneticprogrammingareintroduced.Importantadvan-tagesofevolutionarycomputationwhilecomparedtoclassicaloptimizationtechniquesarealsodiscussed.1.Abraham,A.,EvolutionaryComputation,In:HandbookforMeasurement,Sys-temsDesign,PeterSydenhamandRichardThorn(Eds.),JohnWileyandSonsLtd.,London,ISBN0-470-02143-8,pp.920 931,2005.2.B¨ack,T.,Evolutionaryalgorithmsintheoryandpractice:EvolutionStrategies,EvolutionaryProgramming,GeneticAlgorithms,OxfordUniversityPress,NewYork,1996.3.Banzhaf,W.,Nordin,P.,Keller,E.R.,Francone,F.D.,GeneticProgramming:AnIntroductiononTheAutomaticEvolutionofComputerProgramsanditsApplications,MorganKaufmannPublishers,Inc.,1998. 20AjithAbrahametal.4.Ferreira,C.,GeneExpressionProgramming:Anewadaptivealgorithmforsolv-ingproblems-ComplexSystems,Vol.13,No.2,pp.87 129,2001.5.Fogel,L.J.,Owens,A.J.andWalsh,M.J.,ArticialIntelligenceThroughSim-ulatedEvolution,JohnWiley&SonsInc.USA,1966.6.Fogel,D.B.(1999)EvolutionaryComputation:TowardaNewPhilosophyofMachineIntelligence.IEEEPress,Piscataway,NJ,Secondedition,1999.7.Goldberg,D.E.,GeneticAlgorithmsinsearch,optimization,andmachinelearn-ing,Reading:Addison-WesleyPublishingCorporationInc.,1989.8.HistoryofLisp,9.Holland,J.AdaptationinNaturalandArticialSystems,AnnHarbor:Univer-sityofMichicanPress,1975.10.Jang,J.S.R.,Sun,C.T.andMizutani,E.,Neuro-FuzzyandSoftComputing:AComputationalApproachtoLearningandMachineIntelligence,PrenticeHallInc,USA,1997.11.Koza.J.R.,GeneticProgramming.TheMITPress,Cambridge,Massachusetts,12.Michalewicz,Z.,GeneticAlgorithms+DataStructures=EvolutionPrograms,Berlin:Springer-Verlag,1992.13.Miller,J.F.Thomson,P.,CartesianGeneticProgramming,ProceedingsoftheEuropeanConferenceonGeneticProgramming,LectureNotesInComputerScience,Vol.1802pp.121 132,2000.14.OlteanM.andGrosanC.,EvolvingEvolutionaryAlgorithmsusingMultiEx-pressionProgramming.ProceedingsofThe7th.EuropeanConferenceonArti-cialLife,Dortmund,Germany,pp.651 658,2003.15.Oltean,M.,SolvingEven-ParityProblemsusingTracelessGeneticProgram-ming,IEEECongressonEvolutionaryComputation,Portland,G.Greenwood,et.al(Eds.),IEEEPress,pp.1813 1819,2004.16.Paterson,N.R.andLivesey,M.,DistinguishingGenotypeandPhenotypeinGeneticProgramming,LateBreakingPapersattheGeneticProgramming1996,J.R.Koza(Ed.),pp.141 150,1996.17.Rechenberg,I.,Evolutionsstrategie:OptimierungtechnischerSystemenachPrinzipienderbiologischenEvolution,Stuttgart:Fromman-Holzboog,1973.18.Ryan,C.,Collins,J.J.andONeill,M.,GrammaticalEvolution:EvolvingPro-gramsforanArbitraryLanguage,ProceedingsoftheFirstEuropeanWork-shoponGeneticProgramming(EuroGP98),LectureNotesinComputerSci-ence1391,pp.83-95,1998.19.Schwefel,H.P.,NumerischeOptimierungvonComputermodellenmittelsderEvolutionsstrategie,Basel:Birkhaeuser,1977.20.T¨ornA.andZilinskasA.,GlobalOptimization,LectureNotesinComputerScience,Vol.350,Springer-Verlag,Berlin,1989.