generational

更新时间:2022-12-28 05:38:32 阅读: 评论:0


2022年12月28日发(作者:开学第一课2014完整版)

Whatisageneticalgorithm?

Methodsofreprentation

Methodsoflection

Methodsofchange

Otherproblem-solvingtechniques

Concilystated,ageneticalgorithm(orGAforshort)is

aprogrammingtechniquethatmimicsbiologicalevolutionasa

specificproblemtosolve,the

inputtotheGAisatofpotentialsolutionstothatproblem,

encodedinsomefashion,andametriccalledafitnessfunction

candidatesmaybesolutionsalreadyknowntowork,withtheaim

oftheGAbeingtoimprovethem,butmoreoftentheyaregenerated

atrandom.

TheGAthenevaluateachcandidateaccordingtothefitness

lofrandomlygeneratedcandidates,ofcour,

mostwillnotworkatall,r,

purelybychance,afewmayholdpromi-theymayshowactivity,

evenifonlyweakandimperfectactivity,towardsolvingthe

problem.

Thepromisingcandidatesarekeptandallowedtoreproduce.

Multiplecopiesaremadeofthem,butthecopiesarenotperfect;

digitaloffspringthengoontothenextgeneration,forminga

newpoolofcandidatesolutions,andaresubjectedtoacond

andidatesolutionswhichwere

worned,ormadenobetter,bythechangestotheircodeareagain

deleted;butagain,purelybychance,therandomvariations

introducedintothepopulationmayhaveimprovedsomeindividuals,

makingthemintobetter,morecompleteormoreefficient

hewinningindividuals

arelectedandcopiedoverintothenextgenerationwithrandom

changes,ectationisthatthe

averagefitnessofthepopulationwillincreaeachround,and

sobyrepeatingthisprocessforhundredsorthousandsofrounds,

verygoodsolutionstotheproblemcanbediscovered.

Asastonishingandcounterintuitiveasitmayemtosome,

geneticalgorithmshaveproventobeanenormouslypowerfuland

successfulproblem-solvingstrategy,dramaticallydemonstrating

calgorithmshave

beenudinawidevarietyoffieldstoevolvesolutionsto

problemsasdifficultasormoredifficultthanthofacedby

er,thesolutionstheycomeupwithare

oftenmoreefficient,moreelegant,ormorecomplexthananything

cas,genetic

algorithmshavecomeupwithsolutionsthatbafflethe

programmerswhowrotethealgorithmsinthefirstplace!

Methodsofreprentation

Beforeageneticalgorithmcanbeputtoworkonanyproblem,

amethodisneededtoencodepotentialsolutionstothatproblem

monapproachisto

encodesolutionsasbinarystrings:quencesof1'sand0's,

wherethedigitateachpositionreprentsthevalueofsome

r,similarapproachistoencode

solutionsasarraysofintegersordecimalnumbers,witheach

positionagainreprentingsomeparticularaspectofthe

proachallowsforgreaterprecisionand

complexitythanthecomparativelyrestrictedmethodofusing

binarynumbersonlyandoften"isintuitivelyclortothe

problemspace"(FlemingandPurshou2002,p.1228).

Thistechniquewasud,forexample,intheworkofSteffen

Schulze-Kremer,whowroteageneticalgorithmtopredictthe

three-dimensionalstructureofaproteinbadonthequence

ofaminoacidsthatgointoit(Mitchell1996,p.62).

Schulze-Kremer'sGAudreal-valuednumberstoreprentthe

so-called"torsionangles"betweenthepeptidebondsthatconnect

aminoacids.(Aproteinismadeupofaquenceofbasicbuilding

blockscalledaminoacids,whicharejoinedtogetherlikethe

ltheaminoacidsarelinked,theprotein

foldsupintoacomplexthree-dimensionalshapebadonwhich

aminoacidsattracteachotherandwhichonesrepeleachother.

Theshapeofaproteindeterminesitsfunction.)Genetic

algorithmsfortrainingneuralnetworksoftenuthismethodof

encodingalso.

AthirdapproachistoreprentindividualsinaGAas

stringsofletters,whereeachletteragainstandsforaspecific

mpleofthistechniqueisHiroaki

Kitano's"grammaticalencoding"approach,whereaGAwasputto

thetaskofevolvingasimpletofrulescalledacontext-free

grammarthatwasinturnudtogenerateneuralnetworksfora

varietyofproblems(Mitchell1996,p.74).

Thevirtueofallthreeofthemethodsisthattheymake

iteasytodefineoperatorsthatcautherandomchangesinthe

lectedcandidates:flipa0toa1orviceversa,addorsubtract

fromthevalueofanumberbyarandomlychonamount,orchange

onelettertoanother.(SeethectiononMethodsofchangefor

moredetailaboutthegeneticoperators.)Anotherstrategy,

developedprincipallybyJohnKozaofStanfordUniversityand

calledgeneticprogramming,reprentsprogramsasbranching

datastructurescalledtrees(Kozaetal.2003,p.35).Inthis

approach,randomchangescanbebroughtaboutbychangingthe

operatororalteringthevalueatagivennodeinthetree,or

replacingonesubtreewithanother.

Figure1:Threesimpleprogramtreesofthekindnormallyud

hematicalexpressionthateachone

reprentsisgivenunderneath.

Itisimportanttonotethatevolutionaryalgorithmsdonotneed

toreprentcandidatesolutionsasdatastringsoffixedlength.

Somedoreprenttheminthisway,butothersdonot;forexample,

Kitano'sgrammaticalencodingdiscusdabovecanbeefficiently

scaledtocreatelargeandcomplexneuralnetworks,andKoza's

geneticprogrammingtreescangrowarbitrarilylargeasnecessary

tosolvewhateverproblemtheyareappliedto.

Methodsoflection

Therearemanydifferenttechniqueswhichageneticalgorithm

canutolecttheindividualstobecopiedoverintothenext

generation,butlistedbelowaresomeofthemostcommonmethods.

Someofthemethodsaremutuallyexclusive,butotherscanbe

andoftenareudincombination.

Elitistlection:Themostfitmembersofeachgeneration

areguaranteedtobelected.(MostGAsdonotupureelitism,

butinsteaduamodifiedformwherethesinglebest,orafew

ofthebest,individualsfromeachgenerationarecopiedintothe

nextgenerationjustincanothingbetterturnsup.)

Fitness-proportionatelection:Morefitindividualsare

morelikely,butnotcertain,tobelected.

Roulette-wheellection:Aformoffitness-proportionate

lectioninwhichthechanceofanindividual'sbeinglected

isproportionaltotheamountbywhichitsfitnessisgreateror

lessthanitscompetitors'fitness.(Conceptually,thiscanbe

reprentedasagameofroulette-eachindividualgetsaslice

ofthewheel,butmorefitonesgetlargerslicesthanlessfit

elisthenspun,andwhicheverindividual"owns"the

ctiononwhichitlandachtimeischon.)

Scalinglection:Astheaveragefitnessofthepopulation

increas,thestrengthofthelectivepressurealsoincreas

thod

canbehelpfulinmakingthebestlectionlateronwhenall

individualshaverelativelyhighfitnessandonlysmall

differencesinfitnessdistinguishonefromanother.

Tournamentlection:Subgroupsofindividualsarechon

fromthelargerpopulation,andmembersofeachsubgroupcompete

eindividualfromeachsubgroupis

chontoreproduce.

Ranklection:Eachindividualinthepopulationisassigned

anumericalrankbadonfitness,andlectionisbadonthis

advantageofthismethodisthatitcanpreventveryfit

individualsfromgainingdominanceearlyattheexpenofless

fitones,whichwouldreducethepopulation'sgeneticdiversity

andmighthinderattemptstofindanacceptablesolution.

Generationallection:Theoffspringoftheindividuals

lectedfromeachgenerationbecometheentirenextgeneration.

Noindividualsareretainedbetweengenerations.

Steady-statelection:Theoffspringoftheindividuals

lectedfromeachgenerationgobackintothepre-existinggene

pool,replacingsomeofthelessfitmembersoftheprevious

dividualsareretainedbetweengenerations.

Hierarchicallection:Individualsgothroughmultiple

-levelevaluationsare

fasterandlessdiscriminating,whilethothatsurviveto

antageof

thismethodisthatitreducesoverallcomputationtimebyusing

faster,lesslectiveevaluationtoweedoutthemajorityof

individualsthatshowlittleornopromi,andonlysubjecting

thowhosurvivethisinitialtesttomorerigorousandmore

computationallyexpensivefitnesvaluation.

Methodsofchange

Oncelectionhaschonfitindividuals,theymustbe

randomlyalteredinhopesofimprovingtheirfitnessforthenext

retwobasicstrategiestoaccomplishthis.

mutationin

livingthingschangesonegenetoanother,somutationina

geneticalgorithmcaussmallalterationsatsinglepointsin

anindividual'scode.

Thecondmethodiscalledcrossover,andentailschoosing

twoindividualstoswapgmentsoftheircode,producing

artificial"offspring"thatarecombinationsoftheirparents.

Thisprocessisintendedtosimulatetheanalogousprocessof

recombinationthatoccurstochromosomesduringxual

formsofcrossoverincludesingle-point

crossover,inwhichapointofexchangeistatarandomlocation

inthetwoindividuals'genomes,andoneindividualcontributes

allitscodefrombeforethatpointandtheothercontributesall

itscodefromafterthatpointtoproduceanoffspring,and

uniformcrossover,inwhichthevalueatanygivenlocationin

theoffspring'sgenomeiitherthevalueofoneparent'sgenome

atthatlocationorthevalueoftheotherparent'sgenomeatthat

location,chonwith50/50probability.

Figure2:vediagrams

illustratetheeffectofeachofthegeneticoperatorson

erdiagram

showstwoindividualsundergoingsingle-pointcrossover;the

pointofexchangeistbetweenthefifthandsixthpositions

inthegenome,producinganewindividualthatisahybridofits

onddiagramshowsanindividualundergoing

mutationatposition4,changingthe0atthatpositioninits

genometoa1.

Otherproblem-solvingtechniques

Withtheriofartificiallifecomputingandthe

developmentofheuristicmethods,othercomputerized

problem-solvingtechniqueshaveemergedthatareinsomeways

ctionexplainssomeof

thetechniques,inwhatwaystheyrembleGAsandinwhatways

theydiffer.

Neuralnetworks

Aneuralnetwork,orneuralnetforshort,isaproblem-solvingmethodbad

l

networkconsistsoflayersofprocessingunitscallednodesjoinedby

directionallinks:oneinputlayer,oneoutputlayer,andzeroormorehidden

ialpatternofinputisprentedtotheinputlayerof

theneuralnetwork,andnodesthatarestimulatedthentransmitasignaltothe

umofallthe

inputnteringoneofthevirtualneuronsishigherthanthatneuron's

so-calledactivationthreshold,thatneuronitlfactivates,andpassonits

ternofactivationtherefore

spreadsforwarduntilitreachestheoutputlayerandistherereturnedasa

inthenervoussystemofbiological

organisms,neuralnetworkslearnandfine-tunetheirperformanceovertime

viarepeatedroundsofadjustingtheirthresholdsuntiltheactualoutput

ocesscanbesupervid

byahumanexperimenterormayrunautomaticallyusingalearningalgorithm

(Mitchell1996,p.52).Geneticalgorithmshavebeenudbothtobuildandto

trainneuralnetworks.

Figure3:Asimplefeedforwardneuralnetwork,withoneinput

layerconsistingoffourneurons,onehiddenlayerconsistingof

threeneurons,andoneoutputlayerconsistingoffourneurons.

Thenumberoneachneuronreprentsitsactivationthreshold:

diagramshowstheneuralnetworkbeingprentedwithaninput

stringandshowshowactivationspreadsforwardthroughthe

networktoproduceanoutput.

Hill-climbing

Similartogeneticalgorithms,thoughmoresystematicandlessrandom,a

hill-climbingalgorithmbeginswithoneinitialsolutiontotheproblemathand,

ingisthenmutated,andifthemutation

resultsinhigherfitnessforthenewsolutionthanforthepreviousone,the

newsolutioniskept;otherwi,orithm

isthenrepeateduntilnomutationcanbefoundthatcausanincreainthe

currentsolution'sfitness,andthissolutionisreturnedastheresult(Kozaetal.

2003,p.59).(Tounderstandwherethenameofthistechniquecomesfrom,

imaginethatthespaceofallpossiblesolutionstoagivenproblemis

tof

solutionsthatarebetterarehigherinaltitude,forminghillsandpeaks;tho

thatareworarelowerinaltitude,formingvalleys.A"hill-climber"isthen

analgorithmthatstartsoutatagivenpointonthelandscapeandmoves

inexorablyuphill.)Hill-climbingiswhatisknownasagreedyalgorithm,

meaningitalwaysmakesthebestchoiceavailableateachstepinthehope

rast,methods

suchasgeneticalgorithmsandsimulatedannealing,discusdbelow,arenot

greedy;themethodssometimesmakesuboptimalchoicesinthehopesthat

theywillleadtobettersolutionslateron.

Simulatedannealing

Anotheroptimizationtechniquesimilartoevolutionaryalgorithmsisknown

aborrowsitsnamefromtheindustrialprocess

ofannealinginwhichamaterialisheatedtoaboveacriticalpointtosoftenit,

thengraduallycooledinordertoeradefectsinitscrystallinestructure,

producingamorestableandregularlatticearrangementofatoms(Hauptand

Haupt1998,p.16).Insimulatedannealing,asingeneticalgorithms,thereisa

fitnessfunctionthatdefinesafitnesslandscape;however,ratherthana

populationofcandidatesasinGAs,thereisonlyonecandidatesolution.

Simulatedannealingalsoaddstheconceptof"temperature",aglobal

stepofthe

algorithm,thesolutionmutates(whichiquivalenttomovingtoanadjacent

pointofthefitnesslandscape).Thefitnessofthenewsolutionisthen

comparedtothefitnessoftheprevioussolution;ifitishigher,thenew

i,thealgorithmmakesadecisionwhethertokeepor

emperatureishigh,asitisinitially,

evenchangesthatcausignificantdecreasinfitnessmaybekeptandud

asthebasisforthenextroundofthealgorithm,butastemperaturedecreas,

thealgorithmbecomesmoreandmoreinclinedtoonlyaccept

y,thetemperaturereacheszeroandthe

system"freezes";whateverconfigurationitisinatthatpointbecomesthe

tedannealingisoftenudforengineeringdesign

applicationssuchasdeterminingthephysicallayoutofcomponentsona

computerchip(Kirkpatrick,GelattandVecchi1983).

本文发布于:2022-12-28 05:38:32,感谢您对本站的认可!

本文链接:http://www.wtabcd.cn/fanwen/fan/90/44961.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

下一篇:ly
标签:generational
相关文章
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图