Въведение
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.
Обхват на приложение и характеристики
TheapplicationrangeofGPisverywide.Intheory,anyfunctionthatobtainsavaluebasedonmultipleinputvalues,suchas:forf(x1,x2,...,xn)SuchfunctionscanbegeneratedusingGP.Whentheprogramisrelativelysimpleinlogic,itcanbedirectlywrittenbyhand,andthereisnoneedtouseGPtogenerateit,butforsomelogicallycomplexprograms,itcanbeusedtoautomaticallyevolveandgenerateaprogram.
Forexample,itisverydifficulttogeneratecontrolprogramsforagentsthathavemorecontrolresponses.Theyoftengeneratecorrespondingdecisions(actions)basedonmultipleexternalstimuli.ThistypeofprogramcanbeusedGPtogenerate.
Inthespecificimplementation,ithasthefollowingcharacteristics:
(1) Какво GP решава е програма (или алгоритъм), която описва проблема.
(2)GPisusuallyrepresentedbyatreestructure,andthedescriptionisrelativelycomplicated.
(3) Дължината (дълбочината) на индивидите от всяко поколение на GP обикновено е различна, дори дължината (дълбочината) между индивидите от едно и също поколение също е различна.
(4)TheresourcesconsumedbyGPareuncontrollable(uncontrollableheremeansthatitcannotbeaccuratelydescribed),itneedstoconsumealotofmemoryspace,sotheevolutionofeachgenerationisrelativelyslow.
Процес на внедряване
Избор на език
Geneticprogramminghasdifferentimplementationmethodsindifferentlanguages.Theprogramgeneratedbygeneticprogrammingcanberegardedasbothprogramanddata.Intheprocessofgeneticprogramming,itisdata,whichneedstoberandomlygenerated,crossed,mutated,andevaluated;aftergeneticprogramming,itisaprogramandneedstobeexecuted.Lisplanguageisverysuitableforgeneticprogramming,becauseLisplanguagecanoperateontheprogramitselfandthenexecuteit.
Метод на програмно представяне
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.
Метод за изпълнение на програмата
ForLisplanguage,programexecutionisrelativelysimple,becausethedatageneratedbygeneticsistheprogramandcanbeexecutedimmediately.FortheClanguage,itisverycomplicated,becausetheprogramsgeneratedbytheClanguagearejustdataandcannotbeexecuted.Forthisreason,aninterpretermustbedesignedtointerpretthegeneratedprogram,anddifferentinterpretersneedtobegeneratedforthetreestructureandthestringstructure.Butdifferentapplicationsneeddifferentinterpretationmethods,sotheexecutionmethodsafterinterpretationarealsodifferent.Inordertobeuniversal,anexecutioninterfaceisdesigned.Forallapplications,thesameinterpretercanbeused,whichiscalledavirtualmachine.Onlytheexecutionpartcanbechanged.Fordifferentapplications,differentexecutionfunctionsarecalled.
Избор на функция за оценка
Fordifferentapplications,differentevaluationfunctionsneedtobeselected,soauniversalevaluationfunctioncannotbemadeintheprogramdesign.Theselectionoftheevaluationfunctioniscurrentlyasubjectthatneedstobestudied,andthereiscurrentlynouniversalandeffectivesettingmethod.Inthiscase,youcansetageneralinterface(usingthepolymorphismoftheclass),andsetdifferentevaluationfunctionsfordifferentapplications(usingasubclasstoimplementthisinterface).
Процес на развитие
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.