Úvod
Geneticprogrammingisaspecialmachinelearningtechnologythatusesevolutionaryalgorithms.Itstartsfromagroupof"crowds"composedofmillionsofrandomlygeneratedcomputerprograms,andthenDeterminethesuitabilityofaprogrambasedontheabilityofaprogramtocompleteagiventask.Darwin’snaturalselection(survivalofthefittest)isusedtodeterminethewinningprogram.Computerprogramsalsosimulategendercombination,mutation,geneduplication,genedeletion,etc.Evolvefromgenerationtogenerationuntilapredeterminedstoppingconditionisreached.Thebasicideaofgeneticprogrammingalsodrawsonthebiologicalevolutiontheoryandtheprincipleofheredityinnature,andisamethodofautomaticallyandrandomlygeneratingsearchprograms.Asanewglobaloptimizationsearchalgorithm,thisalgorithmissimple,versatile,robust,andshowsstrongabilitytosolvenonlinearcomplexproblems,soithasbeensuccessfullyappliedinmanydifferentfields,andInrecentyears,morein-depthresearchhasbeenobtained.
Rozsah použití a vlastnosti
TheapplicationrangeofGPisverywide.Intheory,anyfunctionthatobtainsavaluebasedonmultipleinputvalues,suchas:forf(x1,x2,...,xn)SuchfunctionscanbegeneratedusingGP.Whentheprogramisrelativelysimpleinlogic,itcanbedirectlywrittenbyhand,andthereisnoneedtouseGPtogenerateit,butforsomelogicallycomplexprograms,itcanbeusedtoautomaticallyevolveandgenerateaprogram.
Forexample,itisverydifficulttogeneratecontrolprogramsforagentsthathavemorecontrolresponses.Theyoftengeneratecorrespondingdecisions(actions)basedonmultipleexternalstimuli.ThistypeofprogramcanbeusedGPtogenerate.
Inthespecificimplementation,ithasthefollowingcharacteristics:
(1)Co řeší GPjeprogram (orální goritmus), který popisuje problém.
(2)GPisusuallyrepresentedbyatreestructure,andthedescriptionisrelativelycomplicated.
(3)Délka (hloubka) jednotlivců každé generace GP je obecně odlišná, i když délka (hloubka) mezi jednotlivci ve stejné generaci je různá.
(4)TheresourcesconsumedbyGPareuncontrollable(uncontrollableheremeansthatitcannotbeaccuratelydescribed),itneedstoconsumealotofmemoryspace,sotheevolutionofeachgenerationisrelativelyslow.
Proces implementace
Výběr jazyka
Geneticprogramminghasdifferentimplementationmethodsindifferentlanguages.Theprogramgeneratedbygeneticprogrammingcanberegardedasbothprogramanddata.Intheprocessofgeneticprogramming,itisdata,whichneedstoberandomlygenerated,crossed,mutated,andevaluated;aftergeneticprogramming,itisaprogramandneedstobeexecuted.Lisplanguageisverysuitableforgeneticprogramming,becauseLisplanguagecanoperateontheprogramitselfandthenexecuteit.
Metoda reprezentace programu
Programcanhavetworepresentationmethods:treestructurerepresentationandstringrepresentation.Thetreestructurerepresentationmethodhasaclearstructure.Itisrelativelysimpletoperformcrossoverandmutationoperations,butrequiresalargestoragespace.Sincegeneticprogrammingrequiresalargenumberoftreestructuresforeachgeneration,thestorageoverheadisverylarge.Spacecomplexityisatopicthatneedstobestudiedingeneticprogramming;expressingprogramswithstringscansavealotofstoragespace,butitismoredifficulttoperformgeneticoperations,suchascomparisonwhenselectingrandomintersectionsormutationpointsof"parents"Complexandneedtobeconverted.
FortheLisplanguage,itisastringitself,soitismoresuitabletouseastringtorepresentgeneticprograms;fortheClanguage,thesetwomethodscanbeselected.Sothereare4waysofcombining:Clanguage+treestructure,Clanguage+stringrepresentation,Lisp+treestructure,Lisp+stringrepresentation,ofwhichthethirdmethodisnotcommonlyused(theClanguagereferredtoheremeansinadditiontoLispMostoftheothercommonlanguages).
ItisseldomusedtoexpresstreestructureinLisplanguage,becauseitisnotnecessary.IftheClanguageisusedtorepresentthestringstructure,itissimilartotheLisplanguage,anditisrelativelysimple.YoucantreatthegeneticprogramasdataandexpresstheprogramasapseudoLisplanguage.Aftertheinheritanceisover,youcanuseitasaprogram.Ofcourse,itshouldbeexecutedasaprogramduringperformanceevaluation,whichwillbedescribedindetailbelow.
Způsob provádění programu
ForLisplanguage,programexecutionisrelativelysimple,becausethedatageneratedbygeneticsistheprogramandcanbeexecutedimmediately.FortheClanguage,itisverycomplicated,becausetheprogramsgeneratedbytheClanguagearejustdataandcannotbeexecuted.Forthisreason,aninterpretermustbedesignedtointerpretthegeneratedprogram,anddifferentinterpretersneedtobegeneratedforthetreestructureandthestringstructure.Butdifferentapplicationsneeddifferentinterpretationmethods,sotheexecutionmethodsafterinterpretationarealsodifferent.Inordertobeuniversal,anexecutioninterfaceisdesigned.Forallapplications,thesameinterpretercanbeused,whichiscalledavirtualmachine.Onlytheexecutionpartcanbechanged.Fordifferentapplications,differentexecutionfunctionsarecalled.
Výběr funkce hodnocení
Fordifferentapplications,differentevaluationfunctionsneedtobeselected,soauniversalevaluationfunctioncannotbemadeintheprogramdesign.Theselectionoftheevaluationfunctioniscurrentlyasubjectthatneedstobestudied,andthereiscurrentlynouniversalandeffectivesettingmethod.Inthiscase,youcansetageneralinterface(usingthepolymorphismoftheclass),andsetdifferentevaluationfunctionsfordifferentapplications(usingasubclasstoimplementthisinterface).
Vývojový proces
ThefirstexperimentsongeneticprogrammingwerepublishedbyStephenSmith(1980)andCramm(1985).JohnKoza(1992)alsowroteafamousbooktointroducegeneticprogramming.
Computerprogramsusinggeneticprogrammingcanbewritteninmanyprogramminglanguages.Intheearly(ortraditional)implementationofGP,programinstructionsanddatavalueswereorganizedinatreestructure,sothoseprogramminglanguagesthatoriginallyprovidedatreestructureweremostsuitableforGP,suchastheLisplanguageusedbyKoza.OtherformsofGPhavealsobeenpromotedandimplemented,suchasrelativelysimplelineargeneticprogrammingsuitablefortraditionalprogramminglanguages(suchasFortran,BASIC,andC).TherearecommercialGPsoftwarethatcombineslineargeneticprogrammingwithassemblylanguagetoobtainbetterperformance,andsomeimplementationmethodsdirectlygenerateassemblyprograms.
Theamountofcalculationrequiredforgeneticprogramming(processingalargenumberofcandidatecomputerprograms)issolargethatitcouldonlybeusedtosolvesomesimpleproblemsinthe1990s.Inrecentyears,withthedevelopmentofgeneticprogrammingtechnologyandtheexponentialincreaseinthecomputingpowerofthecentralprocessingunit,GPhasbeguntoproducealargenumberofsignificantresults.Forexample,around2004,GPachievednearly40achievementsinvariousfields:quantumcomputing,electronicdesign,gamecompetition,sorting,searchandsoon.Someofthesecomputer-generatedprograms(algorithms)areverysimilartoartificialinventionsafter2000,andeventworesultshaveresultedinnewinventionsthatcanbepatented.
Inthe1990s,itwasgenerallybelievedthatitwasverydifficulttodevelopatheoryforgeneticprogramming,andGPwasalsoatadisadvantageinvarioussearchtechnologies.After2000,thetheoryofGPhasmadesignificantdevelopment,andithasbecomepossibletoestablishanexactGPprobabilitymodelandMarkovchainmodel.Geneticprogramminghasawiderrangeofapplicationsthangeneticalgorithms(actuallyincludinggeneticalgorithms)
JuergenSchmidhuberfurtherproposedmacrogeneticprogramming,atechnologythatusesgeneticprogrammingtogenerateageneticprogrammingsystem.Somecommentsthinkthatmacro-geneticprogrammingisnotfeasibleintheory,butmoreresearchisneededtoconfirmit.