/
Evolutionary Computation from Genetic Algorithms to Genetic Programming Ajith Abraham Evolutionary Computation from Genetic Algorithms to Genetic Programming Ajith Abraham

Evolutionary Computation from Genetic Algorithms to Genetic Programming Ajith Abraham - PDF document

kittie-lecroy
kittie-lecroy . @kittie-lecroy
Follow
599 views
Uploaded On 2014-12-16

Evolutionary Computation from Genetic Algorithms to Genetic Programming Ajith Abraham - PPT Presentation

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

abrahamieeeorg httpwwwajithsoftcomputingnet Department Electronics

Share:

Link:

Embed:

Download Presentation from below link

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.


Presentation Transcript

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,its”exibility,andmanyotherfacets.Theevolutionaryapproachcanbeappliedtoproblemswhereheuristicsolutionsarenotavailableorgenerallyleadtounsatisfactoryresults.Asaresult,evolutionarycomputationhavereceivedincreasedinterest,particularlywithregardstothemannerinwhichtheymaybeappliedforpracticalproblemsolving.Inthischapter,wereviewthedevelopmentofthe“eldofevolutionarycom-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,we“ndthedomainsofgeneticalgorithms[],evolutionstrategies[],evolutionaryprogramming[]andgeneticprogrammingprogramming11].Theyallshareacommonconceptualbaseofsimulatingtheevolutionofindividualstructuresviaprocessesofselection,mutation,andreproduc-tion.Theprocessesdependontheperceivedperformanceoftheindividualstructuresasde“nedbytheproblem.Apopulationofcandidatesolutions(fortheoptimizationtasktobesolved)isinitialized.Newsolutionsarecreatedbyapplyingreproductionoperators(mutationand/orcrossover).The“tness(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(forexample“netuningofweightsofaevolutionaryneuralnetwork),oritmayinvolvesimultaneousapplicationofotheralgorithms(e.g.,hybridiz-ingwithsimulatedannealingortabusearchtoimprovetheeciencyofbasicevolutionarysearch).Theevaluationofeachsolutioncanbehandledinparallelandonlyselec-tion(whichrequiresatleastpairwisecompetition)requiressomeserialprocessing.ImplicitparallelismisnotpossibleinmanyglobaloptimizationalgorithmslikesimulatedannealingandTabusearch.Traditionalmethodsofoptimizationarenotrobusttodynamicchangesinproblemtheenvironmentandoftenrequireacompleterestartinordertoprovideasolution(e.g.,dynamicprogramming).Incontrast,evolutionaryalgorithmscanbeusedtoadaptsolutionstochangingcircumstance.Perhapsthegreatestadvantageofevolutionaryalgorithmscomesfromtheabilitytoaddressproblemsforwhichtherearenohumanexperts.Althoughhumanexpertiseshouldbeusedwhenitisavailable,itoftenproveslessthanadequateforautomatingproblem-solvingroutines.1.2GeneticAlgorithmsAtypical”owchartofaGeneticAlgorithm(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-portantGAfeatureisitsfocuson“xed-lengthcharacterstringsalthoughvariable-lengthstringsandotherstructureshavebeenused.1.2.1EncodingandDecodingInatypicalapplicationofGAs,thegivenproblemistransformedintoasetofgeneticcharacteristics(parameterstobeoptimized)thatwillsurviveinthebestpossiblemannerintheenvironment.Example,ifthetaskistooptimizethefunctiongivenin8(1.2) 1EvolutionaryComputation:fromGAtoGP5Theparametersofthesearchareidenti“edas,whicharecalledthephenotypesinevolutionaryalgorithms.Ingeneticalgorithms,thephe-notypes(parameters)areusuallyconvertedtogenotypesbyusingacodingprocedure.Knowingtherangesofeachvariableistoberepresentedusingasuitablebinarystring.Thisrepresentationusingbinarycodingmakestheparametricspaceindependentofthetypeofvariablesused.Thegenotype(chromosome)shouldinsomewaycontaininformationaboutsolution,whichisalsoknownasencoding.GAsuseabinarystringencodingasshownbelow.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,beinglocioccupiedbyitcalledunde“ned.Achromosomeissaidtomatchaschemaiftheyagreeinthede“nedpositions.Forexample,thestring10011010matchestheschemata1*******and**011***amongothers,butdoesnotmatch*1*11***becausetheydierinthesecondgene(the“rstde“nedgeneintheschema).Aschemacanbeviewed 6AjithAbrahametal.asahyper-planeina-dimensionalspacerepresentingasetofsolutionswithcommonproperties.Obviously,thenumberofsolutionsthatmatchaschemadependonthenumberofde“nedpositionsinit.Anotherrelatedconceptisofaschema,de“nedasthedistancebetweenthe“rstandthelastde“nedpositionsinit.TheGAworksbyallocatingstringstobestschemataexponentiallythroughsuccessivegenerations,beingtheselectionmechanismthemainresponsibleforthisbehaviour.Ontheotherhandthecrossoveroperatorisresponsibleforexploringnewcombinationsofthepresentschematainordertogetthe“ttestindividuals.Finallythepurposeofthemutationoperatoristointroducefreshgenotypicmaterialinthepopulation.1.2.3ReproductionOperatorsIndividualsforproducingospringarechosenusingaselectionstrategyafterevaluatingthe“tnessvalueofeachindividualintheselectionpool.Eachindividualintheselectionpoolreceivesareproductionprobabilitydependingonitsown“tnessvalueandthe“tnessvalueofallotherindividualsintheselectionpool.This“tnessisusedfortheactualselectionstepafterwards.Someofthepopularselectionschemesarediscussedbelow.RouletteWheelSelectionThesimplestselectionschemeisroulette-wheelselection,alsocalledstochasticsamplingwithreplacement.Thistechniqueisanalogoustoaroulettewheelwitheachsliceproportionalinsizetothe“tness.Theindividualsaremappedtocontiguoussegmentsofaline,suchthateachindividualssegmentisequalinsizetoits“tness.Arandomnumberisgeneratedandtheindividualwhosesegmentspanstherandomnumberisselected.Theprocessisrepeatedun-tilthedesirednumberofindividualsisobtained.AsillustratedinFig.chromosomehasthehighestprobabilityforbeingselectedsinceithasthehighest“tness.TournamentSelectionIntournamentselectionanumberofindividualsischosenrandomlyfromthepopulationandthebestindividualfromthisgroupisselectedasparent.Thisprocessisrepeatedasoftenasindividualstochoose.Theseselectedparentsproduceuniformatrandomospring.Thetournamentsizewilloftendependontheproblem,populationsizeetc.Theparameterfortournamentselectionisthetournamentsize.Tournamentsizetakesvaluesrangingfrom2…numberofindividualsinpopulation. 1EvolutionaryComputation:fromGAtoGP7 1 Chromosome2 3 Chromosome4 Fig.1.3.RoulettewheelselectionWhencreatingnewpopulationbycrossoverandmutation,wehaveabigchancethatwewilllosethebestchromosome.Elitismisnameofthemethodthat“rstcopiesthebestchromosome(orafewbestchromosomes)tonewpopulation.Therestisdoneinclassicalway.ElitismcanveryrapidlyincreaseperformanceofGA,becauseitpreventslosingthebest-foundsolution.GeneticOperatorsCrossoverandmutationaretwobasicoperatorsofGA.PerformanceofGAverymuchdependsonthegeneticoperators.Typeandimplementationofop-eratorsdependsonencodingandalsoontheproblem.Therearemanywayshowtodocrossoverandmutation.Inthissectionwewilldemonstratesomeofthepopularmethodswithsomeexamplesandsuggestionshowtodoitfordierentencodingschemes.Crossover.Itselectsgenesfromparentchromosomesandcreatesanewo-spring.Thesimplestwaytodothisistochooserandomlysomecrossoverpointandeverythingbeforethispointiscopiedfromthe“rstparentandtheneverythingafteracrossoverpointiscopiedfromthesecondparent.Asinglepointcrossoverisillustratedasfollows(isthecrossoverpoint):ChromosomeA:ChromosomeB:OspringA:OspringB:AsillustratedinFig.,thereareseveralcrossovertechniques.Inauni-formcrossoverbitsarerandomlycopiedfromthe“rstorfromthesecond 8AjithAbrahametal. Uniformcrossoverparentparent Two-pointcrossoverparentparent Single-pointcrossoverparentparentFig.1.4.Typesofcrossoveroperatorsparent.Speci“ccrossovermadeforaspeci“cproblemcanimprovetheGAperformance.Aftercrossoveroperation,mutationtakesplace.Mutationchangesrandomlythenewospring.Forbinaryencodingmutationisperformedbychangingafewrandomlychosenbitsfrom1to0orfrom0to1.Mutationdependsontheencodingaswellasthecrossover.Forexamplewhenweareencodingpermutations,mutationcouldbeexchangingtwogenes.Asimplemutationoperationisillustratedasfollows:ChromosomeA:110ChromosomeB:110110 1EvolutionaryComputation:fromGAtoGP9OspringA:110OspringB:110110Formanyoptimizationproblemstheremaybemultiple,equal,orunequaloptimalsolutions.SometimesasimpleGAcannotmaintainstablepopulationsatdierentoptimaofsuchfunctions.Inthecaseofunequaloptimalsolutions,thepopulationinvariablyconvergestotheglobaloptimum.helpstomaintainsubpopulationsnearglobalandlocaloptima.Anicheisviewedasanorganismsenvironmentandaspeciesasacollectionoforganismswithsimilarfeatures.Nichinghelpstomaintainsubpopulationsnearglobalandlocaloptimabyintroducingacontrolledcompetitionamongdierentsolutionsneareverylocaloptimalregion.Nichingisachievedbyasharingfunction,whichcreatessubdivisionsoftheenvironmentbydegradinganorganisms“tnessproportionaltothenumberofothermembersinitsneighbourhood.Theamountofsharingcontributedbyeachindividualintoitsneighbourisdeterminedbytheirproximityinthedecodedparameterspace(phenotypicsharing)basedonadistancemeasure.1.3EvolutionStrategiesEvolutionStrategy(ES)wasdevelopedbyRechenberg[]atTechnicalUni-versity,Berlin.EStendtobeusedforempiricalexperimentsthatarediculttomodelmathematically.ThesystemtobeoptimizedisactuallyconstructedandESisusedto“ndtheoptimalparametersettings.Evolutionstrategiesmerelyconcentrateontranslatingthefundamentalmechanismsofbiologicalevolutionfortechnicaloptimizationproblems.Theparameterstobeoptimizedareoftenrepresentedbyavectorofrealnumbers(objectparameters…Anothervectorofrealnumbersde“nesthestrategyparameters()whichcontrolsthemutationoftheobjectiveparameters.Bothobjectandstrategicparametersformthedata-structureforasingleindividual.Apopulationindividualscouldbedescribedas),wherethechromosomeisde“nedasop,sp)with,...,o)and,...,s1.3.1MutationinEvolutionStrategiesThemutationoperatorisde“nedascomponentwiseadditionofnormaldis-tributedrandomnumbers.Boththeobjectiveparametersandthestrategyparametersofthechromosomearemutated.Amutantsobject-parametersvectoriscalculatedas),where)istheGaussiandistributionofmean-value0andstandarddeviation.UsuallythestrategyparametersmutationstepsizeisdonebyadaptingthestandarddeviationForinstance,thismaybedoneby),whereisrandomlychosenfromor1dependingonthe 10AjithAbrahametal.valueofequallydistributedrandomvariableof[0,1]with5.Theparameterisusuallyreferredtoasstrategyparametersadaptationvalue1.3.2Crossover(Recombination)inEvolutionStrategiesFortwochromosomes))and))thecrossoveroperatorisde“ned)with)and).Byde“ning)andavalueisrandomlyassignedforeither(50%selectionprobabilityfor1.3.3ControlingtheEvolutionbethenumberofparentsingeneration1andletbethenumberofchildreningeneration.TherearebasicallyfourdierenttypesofevolutionP/R,CP/Rasdiscussedbelow.Theymainlydierinhowtheparentsforthenextgenerationareselectedandtheusageofcrossoveroperators.P,Cparentsproducechildrenusingmutation.Fitnessvaluesarecalcu-latedforeachofthechildrenandthebestchildrenbecomenextgener-ationparents.Thebestindividualsofchildrenaresortedbytheir“tnessvalueandthe“rstindividualsareselectedtobenextgenerationparentsparentsproducechildrenusingmutation.Fitnessvaluesarecalcu-latedforeachofthechildrenandthebestindividualsofbothparentsandchildrenbecomenextgenerationparents.Childrenandparentsaresortedbytheir“tnessvalueandthe“rstindividualsareselectedtobenextgenerationparents.P/R,Cparentsproducechildrenusingmutationandcrossover.Fitnessvaluesarecalculatedforeachofthechildrenandthebestchildrenbecomenextgenerationparents.Thebestindividualsofchildrenaresortedbytheir“tnessvalueandthe“rstindividualsareselectedtobenextgenerationparents().ExcepttheusageofcrossoveroperatorthisisexactlythesameasP,Cstrategy. 1EvolutionaryComputation:fromGAtoGP11P/Rparentsproducechildrenusingmutationandrecombination.Fitnessvaluesarecalculatedforeachofthechildrenandthebestofbothparentsandchildrenbecomenextgenerationparents.Childrenandparentsaresortedbytheir“tnessvalueandthe“rstindividualsareselectedtobenextgenerationparents.Excepttheusageofcrossoveroperatorthisisexactlythesameasstrategy.1.4EvolutionaryProgrammingFogel,OwensandWalshsbook[]isthelandmarkpublicationforEvolution-aryProgramming(EP).Inthebook,FinitestateautomataareevolvedtopredictsymbolstringsgeneratedfromMarkovprocessesandnon-stationarytimeseries.Thebasicevolutionaryprogrammingmethodinvolvesthefollow-ingsteps:1.Chooseaninitialpopulation(possiblesolutionsatrandom).Thenumberofsolutionsinapopulationishighlyrelevanttothespeedofoptimiza-tion,butnode“niteanswersareavailableastohowmanysolutionsareappropriate(otherthan1)andhowmanysolutionsarejustwasteful.2.Newospringsarecreatedbymutation.Eachospringsolutionisas-sessedbycomputingits“tness.Typically,astochastictournamentisheldtodetermineNsolutionstoberetainedforthepopulationofsolutions.Itshouldbenotedthatevolutionaryprogrammingmethodtypicallydoesnotuseanycrossoverasageneticoperator.Whencomparingevolutionaryprogrammingtogeneticalgorithm,onecanidentifythefollowingdierences:1.GAisimplementedbyhavingarraysofbitsorcharacterstorepresentthechromosomes.InEPtherearenosuchrestrictionsfortherepresentation.Inmostcasestherepresentationfollowsfromtheproblem.2.EPtypicallyusesanadaptivemutationoperatorinwhichtheseverityofmutationsisoftenreducedastheglobaloptimumisapproachedwhileGAsuseapre-“xedmutationoperator.Amongtheschemestoadaptthemutationstepsize,themostwidelystudiedbeingthemeta-evolutionaryŽtechniqueinwhichthevarianceofthemutationdistributionissubjecttomutationbya“xedvariancemutationoperatorthatevolvesalongwiththesolution.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.InGPtheindividualpopulationmembersarenot“xedlengthcharacterstringsthatencodepossiblesolutionstotheproblemathand,theyareprogramsthat,whenexecuted,arethecandidatesolutionstotheproblem.Theseprogramsareexpressedingeneticprogrammingasparsetrees,ratherthanaslinesofcode.Forexample,thesimpleprogram,a,c)ŽwouldberepresentedasshowninFig..Theterminalandfunctionsetsarealsoimportantcomponentsofgeneticprogramming.Theterminalandfunctionsetsarethealphabetoftheprogramstobemade.Theterminalsetconsistsofthevariables(example,inFig.)andconstants(example,4inFig.Themostcommonwayofwritingdownafunctionwithtwoargumentsisthein“xnotation.Thatis,thetwoargumentsareconnectedwiththeoperationsymbolbetweenthemas.Adierentmethodisthepre“xnotation.Heretheoperationsymboliswrittendown“rst,fol-lowedbyitsrequiredargumentsas+.Whilethismaybeabitmoredicultorjustunusualforhumaneyes,itopenssomeadvantagesforcomputationaluses.ThecomputerlanguageLISPusessymbolicexpressions(orS-expressions)composedinpre“xnotation.ThenasimpleS-expressioncouldbe(operator,argument)whereoperatoristhenameofafunctionand 1EvolutionaryComputation:fromGAtoGP13 Fig.1.5.AsimpletreestructureofGPargumentcanbeeitheraconstantoravariableoreitheranothersymbolicex-pressionas(operator,argumentoperator,argumentoperator,argumentGenerallyspeaking,GPprocedurecouldbesummarizedasfollows:Generateaninitialpopulationofrandomcompositionsofthefunctionsandterminalsoftheproblem;Computethe“tnessvaluesofeachindividualinthepopulation;Usingsomeselectionstrategyandsuitablereproductionoperatorsproducetwoospring;Procedureisiterateduntiltherequiredsolutionisfoundortheterminationconditionshavereached(speci“ednumberofgenerations).1.5.1ComputerProgramEncodingAparsetreeisastructurethatgraspstheinterpretationofacomputerpro-gram.Functionsarewrittendownasnodes,theirargumentsasleaves.Asubtreeisthepartofatreethatisunderaninnernodeofthistree.Ifthistreeiscutoutfromitsparent,theinnernodebecomesarootnodeandthesubtreeisavalidtreeofitsown.ThereisacloserelationshipbetweentheseparsetreesandS-expression;infactthesetreesarejustanotherwayofwritingdownexpressions.Whilefunctionswillbethenodesofthetrees(ortheoperatorsintheS-expressions)andcanhaveotherfunctionsastheirarguments,theleaveswillbeformedbyterminals,thatissymbolsthatmaynotbefurtherexpanded.Terminalscanbevariables,constantsorspeci“cactionsthataretobeperformed.Theprocessofselectingthefunctionsandterminalsthatareneededorusefulfor“ndingasolutiontoagivenproblemisoneofthekeystepsinGP.Evaluation 14AjithAbrahametal.ofthesestructuresisstraightforward.Beginningattherootnode,thevaluesofallsub-expressions(orsubtrees)arecomputed,descendingthetreedowntotheleaves.1.5.2ReproductionofComputerProgramsThecreationofanospringfromthecrossoveroperationisaccomplishedbydeletingthecrossoverfragmentofthe“rstparentandtheninsertingthecrossoverfragmentofthesecondparent.Thesecondospringisproducedinasymmetricmanner.AsimplecrossoveroperationisillustratedinFig.InGPthecrossoveroperationisimplementedbytakingrandomlyselectedsubtreesintheindividualsandexchangingthem. Fig.1.6.IllustrationofcrossoveroperatorMutationisanotherimportantfeatureofgeneticprogramming.Twotypesofmutationsarecommonlyused.Thesimplesttypeistoreplaceafunctionoraterminalbyafunctionoraterminalrespectively.Inthesecondkindanentiresubtreecanreplaceanothersubtree.Fig.explainstheconceptofmutation.GPrequiresdatastructuresthatareeasytohandleandevaluateandro-busttostructuralmanipulations.Theseareamongthereasonswhytheclass 1EvolutionaryComputation:fromGAtoGP15 Fig.1.7.IllustrationofmutationoperatorinGPofS-expressionswaschosentoimplementGP.Thesetoffunctionsandtermi-nalsthatwillbeusedinaspeci“cproblemhastobechosencarefully.Ifthesetoffunctionsisnotpowerfulenough,asolutionmaybeverycomplexornottobefoundatall.Likeinanyevolutionarycomputationtechnique,thegenerationof“rstpopulationofindividualsisimportantforsuccessfulimple-mentationofGP.Someoftheotherfactorsthatin”uencetheperformanceofthealgorithmarethesizeofthepopulation,percentageofindividualsthatparticipateinthecrossover/mutation,maximumdepthfortheinitialindivid-ualsandthemaximumalloweddepthforthegeneratedospringetc.Somespeci“cadvantagesofgeneticprogrammingarethatnoanalyticalknowledgeisneededandstillcouldgetaccurateresults.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,as“tnessevaluationrequiresphysicalexecutionoftheindividuals.Thebasicunitofevolutionhereisanativemachinecodeinstructionthatrunsonthe”oating-pointprocessorunit(FPU).Sincedif-ferentinstructionsmayhavedierentsizes,hereinstructionsareclubbeduptogethertoforminstructionblocksof32bitseach.Theinstructionblocksholdoneormorenativemachinecodeinstructions,dependingonthesizesoftheinstructions.Acrossoverpointcanoccuronlybetweeninstructionsandispro-hibitedfromoccurringwithinaninstruction.Howeverthemutationoperationdoesnothaveanysuchrestriction.LGPusesaspeci“clinearrepresentationofcomputerprograms.ALGPindividualisrepresentedbyavariablelengthsequenceofsimpleClanguageinstructions.Instructionsoperateononeortwoindexedvariables(registers)r,oronconstantscfromprede“nedsets.AnimportantLGPparameteristhenumberofregistersusedbyachromo-some.Thenumberofregistersisusuallyequaltothenumberofattributesoftheproblem.Iftheproblemhasonlyoneattribute,itisimpossibletoobtainacomplexexpressionsuchasthequarticpolynomial.Inthatcasewehavetouseseveralsupplementaryregisters.Thenumberofsupplementaryregistersdependsonthecomplexityoftheexpressionbeingdiscovered.Aninappro-priatechoicecanhavedisastrouseectsontheprogrambeingevolved.LGPusesamodi“edsteady-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:A“xednumberofthebestindividualsenterthenextgeneration(elitism).Thematingpoolis“lledbyusingbinarytournamentselection.Theindividualsfromthematingpoolarerandomlypairedandrecombined.Twoospringareobtainedbyrecombiningtwoparents.Theospringaremutatedandtheyenterthenextgeneration.1.6.3MultiExpressionProgrammingAGPchromosomegenerallyencodesasingleexpression(computerprogram).AMultiExpressionProgramming(MEP)chromosomeencodesseveralexpres-sions[].Thebestoftheencodedsolutionischosentorepresentthechromo-some.TheMEPchromosomehassomeadvantagesoverthesingle-expressionchromosomeespeciallywhenthecomplexityofthetargetexpressionisnotknown.Thisfeaturealsoactsasaproviderofvariable-lengthexpressions.MEPgenesarerepresentedbysubstringsofavariablelength.Thenumberofgenesperchromosomeisconstant.Thisnumberde“nesthelengthofthechromosome.Eachgeneencodesaterminalorafunctionsymbol.Agenethatencodesafunctionincludespointerstowardsthefunctionarguments.Func-tionargumentsalwayshaveindicesoflowervaluesthanthepositionofthefunctionitselfinthechromosome. 18AjithAbrahametal.Theproposedrepresentationensuresthatnocycleariseswhilethechro-mosomeisdecoded(phenotypicallytranscripted).Accordingtotheproposedrepresentationscheme,the“rstsymbolofthechromosomemustbeaterminalsymbol.Inthisway,onlysyntacticallycorrectprograms(MEPindividuals)areobtained.ThemaximumnumberofsymbolsinMEPchromosomeisgivenbytheformula:Number Symbols+1)Number 1)+1isthenumberofargumentsofthefunctionwiththegreatestnum-berofarguments.ThetranslationofaMEPchromosomeintoacomputerprogramrepresentsthephenotypictranscriptionoftheMEPchromosomes.Phenotypictranslationisobtainedbyparsingthechromosometop-down.Aterminalsymbolspeci“esasimpleexpression.Afunctionsymbolspeci“esacomplexexpressionobtainedbyconnectingtheoperandsspeci“edbytheargumentpositionswiththecurrentfunctionsymbol.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)speci“cationofalan-guageisusedtodescribetheoutputproducedbythesystem(acompilablecodefragment).DierentBNFgrammarscanbeusedtoproducecodeauto-maticallyinanylanguage.Thegenotypeisastringofeight-bitbinarynumbersgeneratedatrandomandtreatedasintegervaluesfrom0to255.Thephe-notypeisarunningcomputerprogramgeneratedbyagenotype-phenotypemappingprocess.Thegenotype-phenotypemappingingrammaticalevolutionisdeterministicbecauseeachindividualisalwaysmappedtothesamepheno-type.Ingrammaticalevolution,standardgeneticalgorithmsareappliedtothedierentgenotypesinapopulationusingthetypicalcrossoverandmutationoperators.1.6.7GeneticAlgorithmforDerivingSoftware(GADS)GeneticalgorithmforderivingsoftwareisaGPtechniquewherethegenotypeisdistinctfromthephenotype[].TheGADSgenotypeisalistofintegersrepresentingproductionsinasyntax.Thisisusedtogeneratethephenotype,whichisaprograminthelanguagede“nedbythesyntax.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.,Arti“cialIntelligenceThroughSim-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.AdaptationinNaturalandArti“cialSystems,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.andONeill,M.,GrammaticalEvolution:EvolvingPro-gramsforanArbitraryLanguage,ProceedingsoftheFirstEuropeanWork-shoponGeneticProgramming(EuroGP98),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.