版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
-
PAGE
2
-
AGenericParallelGeneticAlgorithm
by
RoderickMurphy(B.E.)
AThesissubmittedto
TheUniversityofDublin
forthedegreeof
M.Sc.inHighPerformanceComputing
DepartmentofMathematics
UniversityofDublin
TrinityCollege
October2003
DECLARATION
Ideclarethat:
1. Thisworkhasnotbeensubmittedasanexerciseforadegreeatthisor anyotheruniversity.
2. Thisworkismyownexceptwherenotedinthetext.
3. Thelibraryshouldlendorcopythisworkuponrequest.
__________________________________
RoderickMurphy(October20th2003)
ABSTRACT
Geneticalgorithmshavebeenproventobebothanefficientandeffectivemeansofsolvingcertaintypesofsearchandoptimisationproblems.Thisprojectprovidesalibraryoffunctionsthatenableausertoimplementvariationsofcommonlyusedgeneticalgorithmoperators,includingfitnessfunctionscaling,selection,crossover,mutationandmigration,withwhichtheycansolvetheirspecifiedproblem.ThemainfunctionisparallelisedusingPthreads.Usingtheprisoners’dilemmaasanexampleproblem,resultsshowasignificantspeed-upcomparedwithapurelyserialimplementation.
ACKNOWLEDGEMENTS
FirstlyIwouldliketothankMrDermotFrostforhisguidanceandintroductiontothisextremelyinterestingtopic.IwouldalsoliketothankmyHPCclassfortheirpearlsofwisdomandtipsforusingthemanyusefulapplicationsthatmadethisprojectareality.InparticularIowemygratitudetoPaddyforthehourshespenthelpingmedebugmycodeandfindthenumeroustpyeosinthisthesis.AlsoDave,Rachel,MadeleineandBrianforthenumerouscupsofcoffeeandhelpfuldebateonawiderangeofbothusefulanduselesstopics.FinallyIwouldliketothankmyfamilyfortheirloveandsupportthroughouttheyear.
Contents
1.0. IntroductiontoGeneticAlgorithms
1.1. Introduction
1.2. SearchSpaces
1.3. ASimpleExample
1.4. ComparisonbetweenBiologicalandGATerminology
1.5. ApplicationsofGeneticAlgorithms
1.6. HoworwhydoGeneticAlgorithmswork?
2.0. GAOperatorsinFurtherDepth
2.1. Introduction
2.2. EncodingaProblem
2.3.0. Selection
2.3.1 FitnessProportionalSelection
2.3.2 RankSelection
2.3.3. TournamentSelection
2.4.0. FitnessScaling
2.4.1. LinearScaling
2.4.2. SigmaTruncation
2.3.3. PowerLawScaling
2.5. Elitism
2.6.0. Crossover
2.6.1. Single-pointcrossover
2.6.2. Multi-pointcrossover
2.6.3. ParameterizedUniformCrossover
2.7. Mutation
2.8. Inversion
2.9. ParameterValuesforGeneticAlgorithms
2.10. Conclusion
3.0. ParallelGeneticAlgorithmOperators
3.1. Introduction
3.2. MasterSlaveparallelGAprototype
3.3. Distributed,AsynchronousConcurrentparallelGA prototype
3.4. NetworkparallelGA
3.5. IslandModel
3.5. Conclusion
4.0. ImplementationofParallelGeneticAlgorithm
4.1. Introduction
4.2. ObjectiveValuefunction
4.3. ParallelGeneticAlgorithmFunction
4.4.0. ImplementationofMigrationOperators
4.4.1. WhatTechnologyWasUsed?
4.4.2. ThreadedImplementation
4.5. Conclusion
5.0. Results
5.1. Introduction
5.2.0. ThePrisonersDilemmausingParallelGA[MI96]
5.2.1. Encoding
5.2.2. GeneticAlgorithm
5.2.3. SerialImplementation
5.2.4. Results
5.3. Conclusion
6.0. ConclusionsandFutureDirections
6.1. Introduction
6.2. FutureDirections
6.3. Conclusion
References
1.0. IntroductiontoGeneticAlgorithms
1.1. Introduction
Goldberg[GO89]describesGeneticAlgorithmsas:searchproceduresbasedonthemechanicsofnaturalselectionandnaturalgenetics.I.e.theyaregeneralsearchandoptimisationalgorithmsthatusethetheoriesofevolutionasatooltosolveproblemsinscienceandengineering.Thisinvolvesevolvingapopulationofcandidatesolutionstotheparticularproblem,usingoperationsinspiredbynaturalgeneticvariationandnaturalselection.
GeneticAlgorithmsare'weak'optimisationmethods.Thatistheydonotusedomain-specificknowledgeintheirsearchprocedure.Forthisreasontheycanbeusedtosolveawiderangeofproblems.Thedisadvantage,ofcourse,isthattheymaynotperformaswellasalgorithmsdesignedspecificallytosolveagivenproblem.
Fromtheverybeginning,computerscientistshavethoughtofsystemsthatwouldmimiconeormoreattributesoflife.However,itwasn'tuntilthe1960sthatGeneticAlgorithms(GAs)wereformallydevelopedbyJohnHolland,alongwithhisstudentsandcolleaguesfromtheUniversityofMichigan.Holland’soriginalgoal,however,wasnottodesignalgorithmstosolvespecificproblems,asinotherevolutionaryprogramming,buttostudythephenomenonofadaptationasitoccursinnatureandtodevelopwaysinwhichthemechanismsofnaturaladaptationmightbeimportedintocomputersystems.
Holland’sGAisamethodofmovingfromonepopulationofchromosomes(stringsofonesandzeros)toanewpopulationusingakindofnaturalselection,togetherwiththegenetics-inspiredoperationsofcrossover,mutationandinversion.
Atypicalalgorithmmightconsistofthefollowing:
Anumberofrandomlychosenguessesofthesolutiontotheproblem–theinitialpopulation.
Ameansofcalculatinghowgoodorbadeachguessiswithinthepopulation–apopulationfitnessfunction.
Amethodformixingfragmentsofthebettersolutionstoformnewandonaverageevenbettersolutions–crossover.
Anoperatortoavoidpermanentlossof(andtointroducenew)diversitywithinthesolutions–mutation.
WiththesebeingthebasiccomponentsofmostGAsitcanbeseenthattheyareasimplemethodtosolveaspecificproblem.Thedownside,however,isthattherearemanydifferentwaysofperformingthesesteps.InthisdissertationIhaveattemptedtoprovideapackagethatgivestheuserachoiceofusingsomeofthemorecommonmethodstosolvetheirparticularproblem.
NotethatHolland’sinversionoperationisrarelyusedinGAstodaysinceitsbenefits,ifany,arenotwellestablished.
1.2. SearchSpaces
Formanysearchoroptimisationproblemsinscience,engineeringandelsewhere,thereareahugeoreveninfinitenumberofpossiblesolutions.Thismeansthatinmostcasesitisimpossibletocheckeachandeverypossiblesolutioninordertofindtheoptimumorrequiredone.Oneapproachistolimitthenumberofpossibilitiestowithinachosenrangewithacertainstepsizeordistancebetweeneachone.Thismethodisusedinallproblemssolvedusingacomputer,sinceafterallthereisalimittothegranularityatwhichadigitalcomputercanrepresentaproblem.Thesetofpossiblesolutionsiscalleda“searchspace”.
Associatedwiththeideaofasearchspaceistheconceptofa“fitnesslandscape”(definedbythebiologistSewellWrightin1931).Thefitnesslandscapeisameasureofthesuccess,orfitness,ofeachsolutionwithinthesearchspace.ItisthisfitnessthatisusedtodeterminewhichsolutionsoftheGApopulationgoforwardtoproducethenewsolutions.
Theselandscapescanhavesurprisinglycomplextopographies.Forasimpleproblemoftwovariables(adjustableparameters),thefitnesslandscapecanbeviewedasathree-dimensionalplotshowingthevariationofthefitnessforvaryinginputparameters.Thisplotcanhaveanumberofpeaks(maxima)andtroughs(minima).Thehighestpeakisusuallyreferredtoastheglobalmaximumorglobaloptimum.Thelesserpeaksarereferredtoaslocalmaximaorlocaloptima.Formanysearchproblemsthegoalistofindtheglobaloptimum.However,therearesituationswhereforexampleanypointaboveacertainthresholdwillsuffice.Inotherproblemsforexampleinaestheticdesign,alargenumberofhighlyfityetdistant,andthereforedistinct,solutionsmightberequired.
ThereisonecaveatwiththenotionoffitnesslandscapewithrespecttoGAs.Justasinthenaturalworld,thefitnessofanyorganismdependsontheotherorganismsarounditandnotjustonitssurroundingsalone.ThismeansthatthefitnesslandscapeofmanytypesofGAsisinaconstantstateofchange.
IngeneralGAsattempttofindthehighestpeakinthefitnesslandscapeofagivenproblem.Theydothisusingacombinationofexploitationandexploration.Thatis,whenthealgorithmhasfoundanumberofgoodcandidatesolutionsitexploitsthembycombiningdifferentpartsofeachsolutiontoformnewcandidatesolutions.Thisprocessisknownascrossover.GAsalsoexplorethefitnesslandscapethroughthecreationofnewcandidatesolutionsbyrandomlychangingpartsofoldsolutions.Thisprocessisknownasmutation.
1.3. ASimpleExample
InordertoclarifyhowGAsworkIwillpresentasimpleexample[fromMI96].Firstlygivenaspecificproblemwemustchooseameansofencodingeachsolution.Themostcommonapproachistorepresenteachsolutionasabinarystringoflengthlbits.
Westartbyrandomlygeneratingnsuchstrings.Thesearethecandidatesolutionstotheproblem.
Bydecodingeachstringtosomevaluex,calculateitsfitness,f(x).Repeatthefollowingstepsuntilnoffspring(newpopulationmembers)havebeencreated.
Select,withreplacement(i.e.withthepossibilityofselectingthemagain),twoparentsfromthepopulationwithprobabilityproportionaltotheirfitness.
Withprobabilitypc(“crossoverprobability”)swapthebitsofthepairbeforesomerandomlychosenpointtoproducetwooffspring.
Withprobabilitypm(“mutationprobability”)changethevalueofindividualbitsoftheoffspringstring.
Ifthenumberofpopulationmembersisoddoneoftheoffspringcanbediscarded.
Replacetheoldpopulationwiththenoffspring.Calculatethefitnessofthenewmembersandstarttheprocessagain.
Eachiterationofthisprocessiscalledageneration.Fiftyto100generationsaretypicallycarriedouttosolveaproblemusingaGAandtheentiresetofgenerationsiscalledarun.Thefittestmemberovertheentirerunistypicallytakenastherequiredsolution.
Theareanumberofdetailstobefilledinwithregardtoeachstepofthealgorithmaswellasthevaluessuchasthenumberofmembersinthepopulationandtheprobabilitiesofcrossoverandmutation.Thesedetailswillbedealtwithinthenextchapter.
1.4. ComparisonbetweenBiologicalandGATerminology
NotsurprisinglymuchofthelanguageusedbytheGAcommunityhasitsoriginsinthatusedbybiologists.Someoftheanalogiesaresomewhatstrained,sinceGAsaregenerallygreatlysimplifiedcomparedwiththerealworldgeneticprocesses.
Alllivingorganismsconsistofcellswitheachcellcontainingthesamesetofoneormorechromosomes,orstringsofDNAthatserveas“ablueprint”forthatindividualorganism.Thebinary(orother)stringusedintheGAsdescribedabovecanbeconsideredtobeachromosome,butsinceonlyindividualswithasinglestringareconsideredinmostGAs,thechromosomeisalsothegenotype(Thegenotypeisthenamegiventothetotalnumberofchromosomesofanorganism,forexample,thehumangenotypeiscomprisedof23pairsofchromosomes).
Eachchromosomecanbesubdividedintogenes,eachofwhich,roughlyspeaking,encodeaparticulartraitintheorganism(e.g.eyecolour).Eachofthepossiblevaluesagenecantakeoniscalledanallele(e.g.blue,green,brownorhazel).Thepositionofageneinthechromosomeiscalleditslocus.
InGAterminology,ifweconsideramulti-variableproblem,agenecanbeconsideredasthebitsthatencodeaparticularparameterandanallele,anallowablevaluethatparametercanhave.
Theorganismorphenotypeistheresultproducedbytheexpressionofthegenotypewithinitsenvironment.InGAsthiswillbeaparticularsetofunknownparameters,oranindividualsolutionvector.
Organisms,suchashumans,whosechromosomesarearrangedinpairs,arecalleddiploid.Organismswhosechromosomesareunpairedarecalledhaploid.Mostsexuallyreproducingspeciesarediploid,however,forsimplicitymostGAsonlyconsiderunpairedchromosomes.
Innaturemutationoccurswhensinglenucleotides(elementarymoleculesofDNA)getchangedwhenbeingcopiedfromparenttooffspring.InGAsmutationconsistsofflippingbinarydigitsatarandomlychosenlocusinthechromosome.
1.5. ApplicationsofGeneticAlgorithms
Thelistsoffieldsandtypesofproblemstowhichgeneticalgorithmshavebeensuccessfullyappliedareevergrowing.Thefollowingarejustafewexamples:
Optimisationtasks:includingnumericaloptimisationandsuchcombinatorialoptimisationtaskssuchascircuitlayoutandjobscheduling.
AutomaticProgramming:theyhavebeenusedtoevolvecomputerprogramsforspecifictasks,andtodesignothercomputationalstructuressuchasautomataandsortingnetworks.
Machinelearning:GAshavebeenusedforoperationssuchasclassificationandpredictiontasksinweatherforecastingorproteinstructure.Theyhavealsobeenusedtoevolveaspectsofparticularmachinelearningsystemssuchasweightsforneuralnetworks,rulesforlearningclassifiersystemsorsymbolicproductionsystemsandsensorsforrobots.
Economics:theyhavebeenusedtomodelprocessesofinnovation,thedevelopmentofbiddingstrategies,andtheemergenceofeconomicmarkets.
Immunesystems:theyhavebeenusedtomodelaspectsofnaturalimmunesystems.
Ecology:GAshavebeenusedtomodelbiologicalarmsraces,host-parasiteco-evolution,symbiosisandresourceflow.
Populationgenetics:ThiswasHolland’soriginalreasonforthedevelopmentofGAs.Ithasbeenusedtostudyquestionssuchas“Underwhatconditionswillagenebeevolutionarilyviableforrecombination?”
Socialsystems:GAshavebeenusedtostudytheevolutionarybehaviourofsocialsystems,suchasthatininsectcoloniesandmoregenerallytheevolutionofco-operationandcommunicationinmulti-agentsystems.
TheabovelistgivesaflavourofthekindofproblemsGAsarebeingusedtosolve,butitdoesnotconclusivelyanswerthequestionofthetypeofproblemstheyshouldbeusedtosolve.
ItwaspreviouslystatedthattheGAisa‘search’tool,butwhatexactlydoes‘search’mean?MelanieMitchell[MI96]describesthreeconceptsforthemeaningofthewordsearch:
Searchforstoreddata.Thisisthetraditionallyadoptedmeaningofasearch.Itinvolvessearchingalargedatabaseofrecordsforsomepieceofdata,likelookingforaphonenumberandaddressinaphonebook.
Searchforpathstogoals.Theobjectivehereistoefficientlyfindasetofactionsthatmoveasystemfromsomeinitialstatetosomeendgoal.Anexampleofthistypeofsearchisthe“Travellingsalesmanproblem”wherethegoalistofindtheshortestroundtripbetweenNcities,visitingeachcityonlyonce.
Searchforsolutions.Thisisamoregeneralclassofsearchthansearchforpathstogoals.Thismethodinvolvesefficientlyfindingthesolutiontoaproblemfromaverylargesetofcandidatesolutions.ItisthistypeofsearchmethodforwhichGAsaremostcommonlyused.
However,evenifaparticularproblemfallsintothethirdcategory,thisdoesn'tguaranteethataGAwillbeanefficientsearchalgorithm.UnfortunatelythereisnorigorousanswerastoexactlywhatkindofproblemsGAscansolveefficiently.Thereare,however,afewguidelinesthatresearchershavefoundtoholdtrue.TheefficiencyofaGAisrelatedtothesearchspaceoftheparticularproblem.Generally,aGAwillperformwellinproblemsthathavelargesearchspaceswhoselandscapesarenotsmoothorunimodal(i.e.,consistingofasinglesmoothhill).Thatisthatthesearchspacesarenotwellunderstoodorarenoisy.GAsalsoperformwellincaseswhereitismoreimportanttofindagoodsolutionratherthantheabsoluteoptimalsolution.
Obviouslyifthesearchspaceisnotlargeallsolutionscanbesearchedexhaustivelyandthebestonecanbefound,whereasaGAmightconvergeonalocaloptimumratherthantheglobaloptimum.Ifthesearchspaceissmoothorunimodalthenagradientascentalgorithm,suchassteepestascenthillclimbingwill,bemoreefficientthanaGA.Iftheproblemiswellunderstoodthensearchmethodsthatusedomain-specificinformationcanbedesignedtooutperformanygeneral-purposemethodsuchasaGA.Somesearchmethodsasinsimplehillclimbingmightbeleadastrayinthepresenceofnoise,butbecauseGAsworkbyaccumulatingfitnessstatisticsovermanygenerationstheywillperformwellinthepresenceofasmallamountofnoise.
However,takingtheaboveintoaccountthemethodwithwhichthecandidatesolutionsareencodedcanpredominantlydictatetheperformanceoftheGA.
1.6. HoworwhydoGeneticAlgorithmswork?
ThereisnoabsolutelyconclusiveexplanationastowhyGAsdoorevenshouldworksoeffectivelyassearchalgorithms.Thereare,however,anumberoftheories,themostwidelyaccepted(atleastuntilrecently)istheschematatheoryintroducedbyHolland[HO75]andpopularisedbyGoldberg[GO89].
Thetheoryofschemas(orschemata)isbasedontheideathatGAsworkbydiscovering,emphasising,andrecombininggood“buildingblocks”ofsolutions.Thatisthatgoodsolutionstendtobecomprisedofgoodcombinationsofbitvaluesthatconferhigherfitnessonthestringsinwhichtheyarepresent.
Soaschemaisasetofbitstringsthatcanbedescribedasatemplatemadeupofones,zerosandasterisks,whereasterisksrepresent“don’tcare”values.E.g.theschema:
H=1****1
representsthesetofall6-bitstringsthatbeginandendwith1.Thestrings100101and101011arecalledinstancesoftheschemaH.
Wecanestimatethefitnessofacertainschemaastheaveragefitnessofallinstancesofthatschemapresentinthepopulationatanytime,t(averagefitness=û(H,t)).Thuswecancalculatetheapproximateincreaseordecreaseofanygivenschemaoversuccessivegenerations.Aschemawhosefitnessisaboveaveragewillproduceanexponentiallyincreasingnumberofsamples.See[MI96]pp27-30foramoreindepthanalysis.
2.0. GAOperatorsinFurtherDepth
2.1. Introduction
Havingexplainedthebasicmechanismsofgeneticalgorithmsinthepreviouschapter,inthischapterIwillattempttoexplainsomeofthesubtlerdetailsofsomeGAoperatorsandalsodelveintotheimplementationofthesefunctions.
2.2. EncodingaProblem
PerhapsthemostimportantaspectforanyGAtobesuccessfulisthemannerinwhichthecandidatesolutionsareencoded.Althoughunnatural,HollandandhisstudentsconcentratedonbinaryencodingandmuchoftheGAworldhasfollowedsuit.Thusmostofthetheoryhasbeendevelopedaroundthistypeofencoding(althoughmuchofitcanbeextendedtonon-binaryapproaches),alsotheheuristicparametersettings,suchascrossoverandmutationrates,havebeendevelopedforGAsusingbinaryencoding.
Theproblemwithbinary-valuedencodingariseswhentherangeofrealworld(phenotype)valuesarenotapowerof2,somesortofclippingorscalingisrequiredsothatallbinarygeneorchromosomecombinationsrepresentsomerealworldvalue.
Themostfrequentlyusedmethodofbinaryencodingisstandardbinarycoding(000=0,001=1,101=5etc).Analternativemethod,however,isGraycoding.Thisissimilartobinaryencodingexceptthateachsuccessivenumberonlydiffersbyonebit.Thishastheadvantagethatsinglebitchangesduringmutationhavelessofaneffectonthefitnessofthestring.Itsdisadvantageisthatitslowsexploration,theprocessofcreatingnewsolutionsthatarenotmadefrompartsofothersolutions.
Amorenaturalformofencodingistousemulti-characterorrealvaluedalphabetstoformthechromosomes.UnderHolland'sschematheory,however,multicharacterencodedstringsshouldperformworsethanthoseencodedinbinary.However,thishasbeenshownnottobetrue.ItseemstheperformancedependsontheproblemandthedetailsoftheGA–thisposesadilemmasince,ingeneral,GAsareusedtosolveproblemsaboutwhichnotenoughisknowntosolvetheminotherwaysthus,thetypeofencodingthatwillworkbestcannotbeknown.Onewayaroundthisistousethesameencodingthatwasusedforasimilarproblem.
Anothermethodistreeencoding[MI96pp35-44].Thisallowssearchspacestobeopen-endedsincethereisnolimittothesizeofthetree.However,thiscanalsoleadtopitfalls–thetreescangrowtoolargeandbecomeuncontrolled,preventingtheformationofmorestructuredcandidatesolutions.
[MI96]proposeshavingtheencodingadaptitselfsothattheGAfindstheoptimummethod.Thisalsosolvestheproblemoffixed-lengthencodinglimitingthecomplexityofthecandidatesolutions.
2.3.0. Selection
Selectionistheoperationwherebycandidatesolutions(chromosomes)areselectedforreproduction.Ingeneraltheprobabilityofselectionshouldbeproportionaltothefitnessofthechromosomeinquestion.Tomakethispossiblewemustmakethefollowingassumptions:firstly,theremustbesomemeasurablequalityinordertosolvetheproblem-thefitness,secondly,thatthesolutioncanbefoundbymaximisingthefitness,andlastly,thatallfitnessvalues,bothgoodandbad,shouldbepositive.Withtheseconditionssatisfiedthereareanumberofdifferentwaysinwhichwecanselectmembersfromthepopulationforcrossover.Themostcommonoftheseisfitnessproportionateselection.
2.3.1. FitnessProportionateSelection
Iffiisthefitnessofindividualiandistheaveragepopulationfitness,whereNisthepopulationsize,thentheprobabilityofanindividualibeingselectedforcrossoveris:
Thiscanbeimplementedusingtheroulettewheelalgorithm.Asthenamesuggestsawheelisconstructedwithamarkerforeachmemberinthepopulation,thesizeofeachmarkerbeingproportionaltothatindividual'sfitness.Thusasthewheelisspuntheprobabilityoftheroulettelandingonthemarkerforindividualiispi.
Thisalgorithmcanbesimulatedusingthecumulativedistributionrepresentation-Arandomnumber,r,isgeneratedbetweenzeroandthesumofeachindividual'sfitnessvalue.Thefirstpopulationmemberwhosefitness,addedtothefitnessoftheprecedingmembers,isgreaterthanorequaltorisreturned.
Thereare,however,problemswiththismethodofselectionundercertainconditions.Considerthecasewhenacertainindividual'sfitnessisverymuchgreaterthattheaveragepopulationfitness.Underfitnessproportionateselectionthismemberwillbechosenmuchmorefrequentlythanothermembersinthepopulation.Thus,overafewgenerationsthegenepoolwillbecomesaturatedwithitsgenes.Ifthismember'sphenotyperesidesclosetoalocalmaximum,andnottheglobalmaximum,inthefitnesslandscapethentheGA,withoutthehelpofmutationorevenhyper-mutation(mutationwithaveryhighmutationrate-discussedlater),canbecomestuckatthislocalmaximum.Thisisknownasprematureconvergence.
Anotherproblemwithfitnessproportionateselectionisthatofstagnation.Thisgenerallyoccurstowardstheendofarun,althoughitcanhappenatanytime.Ifallindividualshavesimilarfitnesses,thenfitnessproportionateselectionwillimposelessselectionpressureandsowillbealmostaslikelytopickthefittestmembersastheleastfitmembers.
Boththeseproblemscanbesolvedusingfitnessscalingtechniques,whichwillbediscussedin§2.4.However,therearedifferentselectionmethodsavailablethatdonotsufferfromtheaboveproblems.
2.3.2. RankSelection
Inthisselectionoperationallindividualsaresortedbyincreasingvaluesoffitness.Eachindividualisthenassignedaprobability,pi,ofbeingselectedfromsomepriorprobabilitydistribution.Typicaldistributionsinclude:
Linear: pi=ai+b, (a<0)
and
Negativeexponential: pi=ae(bi+c)
Fig2.1 Plotoflinearandnegativeexponentialdistributionsusedforrankselection.
Thevaluesofaandbarecalculatedbysatisfyingthefollowingconditions:
Thesumoverallmembersofeachindividual'sselectionprobabilitymustbeone.
Theratioofthehighesttolowestprobabilitiesisc.
Theseresultinthefollowingequations:
whereNisthepopulationsize.Bychoosinganappropriatevalueforcwecandictatehowselectioniscarriedout.Generallycistakenas~2.
Rankselectionsolvestheproblemofprematureconvergenceandstagnationandthesizeofthegapsbetweenfitnessesbecomeirrelevant.However,thereislittleevidenceofthisselectionmethodoccurringinnature,makingitsusedifficulttojustify.Thereorderingprocessalsointroducesacomputationaloverheadmakingitlessengaging.
2.3.3. TournamentSelection
Thiscanbeviewedasanoisyversionofrankselection.Theselectionprocessisthus:selectagroupofN(N2)members,thenselectthefittestmemberofthisgroupanddiscardtherest.
Tournamentselectioninheritstheadvantagesofrankselectionbutdoesnotrequiretheglobalreorderingofthepopulationandismoreinspiredbynature.
2.4.0. FitnessScaling
Thetwoundesirablecharacteristicsoffitnessproportionateselection,prematureconvergenceandstagnation,cancauseproblemswiththeselectionprocedure.Ratherthanchoosinganalternativeselectionmethod,onecanchoosetoscalethefitnessvaluessoastoreducetheseunwantedeffects,whilestillusingfitnessproportionateselectionmethodssuchasroulettewheelselection.TherearethreemaintypesofscalingusedbytheGAcommunity.
2.4.1. LinearScaling
Thefitnessofeachindividual,f,isreplacedbyf'=a.f+b
whereaandbarechosensothat:
1. Thescaledaveragefitnessisequaltotherawaveragefitness().
2. Themaximumvalueofthescaledfitnessissomeconstanttimesthe averagefitness.Thisconstant,c,isthenumberofexpectedcopies desiredforthebestindividual(usuallyc=2).
Theseconditionsresultinthefollowingequationsforaandb:
Oneproblemwithlinearscaling,particularlyifisclosetofmaxorifagivenfitnessisverymuchlessthan,isthatfitnessvaluescanbecomenegative.Tosolvethiswecansetanynegativefitnessvaluestozero.This,however,isobviouslyundesirablesincethismeansthattheseindividualswillneverbeselected.Anotherwaytosolvethisproblemistouseanalternativescalingmethodsuchassigmatruncation.
2.4.2. SigmaTruncation
Withsigmatruncation,fisreplacedbyf'=f-(-c.).Whereisthepopulationstandarddeviation,c,isareasonablemultipleof(Usually1c3).Sigmatruncationremovestheproblemofscalingtonegativevalues.Truncatedfitness
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 音乐专业职业方向规划
- 心血管疾病及危险因素管理患者教育
- (正式版)T∕CIQA 127-2025 陆路进口煤炭采信检验规程
- 2026新疆第十师北屯市总工会社会招聘工会社会工作者4人考试备考试题及答案解析
- 金属屋面系统安装专项施工方案
- 2026年大连理工大学外国语学院自聘综合办公室职员招聘笔试备考试题及答案解析
- 2026年及未来5年市场数据中国铜包铝行业市场全景监测及投资前景展望报告
- 2026江西省江投海油新能源有限公司招聘4人笔试模拟试题及答案解析
- 酒吧消防制度
- 2026江苏苏州工业园区司法工作办公室辅助人员招聘4人笔试模拟试题及答案解析
- 建筑工程设计进度计划及控制措施
- 消防应急通信课件
- JG/T 395-2012建筑用膜材料制品
- 纯化水培训试题及答案
- 私车租给公司合同协议
- 二轮电化学专题复习
- GB/T 45298-2025土壤制图1∶25 000~1∶500 000土壤质地、酸碱度、盐渍化图的图式、用色及图例规范
- 博士研究生教育中心建设方案及其可行性分析
- FOCUS-PDCA改善案例-提高术前手术部位皮肤准备合格率医院品质管理成果汇报
- 2024装配式轻钢轻混结构技术规程
- 《 油菜花开春》4-6岁幼儿园小学少儿美术教育绘画课件创意教程教案
评论
0/150
提交评论