外文翻译-α-β剪枝& Zobrist散列.docx
《外文翻译-α-β剪枝& Zobrist散列.docx》由会员分享,可在线阅读,更多相关《外文翻译-α-β剪枝& Zobrist散列.docx(8页珍藏版)》请在冰豆网上搜索。
外文文献
Alpha–betapruning&Zobristhashing
Alpha–betapruning
Alpha–betapruningisasearchalgorithmthatseekstodecreasethenumberofnodesthatareevaluatedbytheminimaxalgorithminitssearchtree.Itisanadversarialsearchalgorithmusedcommonlyformachineplayingoftwo-playergames(Tic-tac-toe,Chess,Go,etc.).Itstopscompletelyevaluatingamovewhenatleastonepossibilityhasbeenfoundthatprovesthemovetobeworsethanapreviouslyexaminedmove.Suchmovesneednotbeevaluatedfurther.Whenappliedtoastandardminimaxtree,itreturnsthesamemoveasminimaxwould,butprunesawaybranchesthatcannotpossiblyinfluencethefinaldecision.
Thebenefitofalpha–betapruningliesinthefactthatbranchesofthesearchtreecanbeeliminated.Thisway,thesearchtimecanbelimitedtothe'morepromising'subtree,andadeepersearchcanbeperformedinthesametime.Likeitspredecessor,itbelongstothebranchandboundclassofalgorithms.Theoptimizationreducestheeffectivedepthtoslightlymorethanhalfthatofsimpleminimaxifthenodesareevaluatedinanoptimalornearoptimalorder(bestchoiceforsideonmoveorderedfirstateachnode).
Withan(averageorconstant)branchingfactorofb,andasearchdepthofdplies,themaximumnumberofleafnodepositionsevaluated(whenthemoveorderingispessimal)isO(b*b*...*b)=O(bd)–thesameasasimpleminimaxsearch.Ifthemoveorderingforthesearchisoptimal(meaningthebestmovesarealwayssearchedfirst),thenumberofleafnodepositionsevaluatedisaboutO(b*1*b*1*...*b)forodddepthandO(b*1*b*1*...*1)foreven
depth,or.Inthelattercase,wheretheplyofasearchiseven,the
effectivebranchingfactorisreducedtoitssquareroot,or,equivalently,thesearchcangotwiceasdeepwiththesameamountofcomputation.[10]Theexplanationofb*1*b*1*...isthatallthefirstplayer'smovesmustbestudiedtofindthebestone,butforeach,onlythebestsecondplayer'smoveisneededtorefuteallbutthefirst(andbest)firstplayermove–alpha–betaensuresnoothersecondplayermovesneedbeconsidered.Whennodesareorderedatrandom,theaveragenumberofnodesevaluatedisroughly.
0
Normallyduringalpha–beta,thesubtreesaretemporarilydominatedbyeitherafirstplayeradvantage(whenmanyfirstplayermovesaregood,andateachsearchdepththefirstmovecheckedbythefirstplayerisadequate,butallsecondplayerresponsesarerequiredtotrytofindarefutation),orviceversa.Thisadvantagecanswitchsidesmanytimesduringthesearchifthemoveorderingisincorrect,eachtimeleadingtoinefficiency.Asthenumberofpositionssearcheddecreasesexponentiallyeachmovenearerthecurrentposition,itisworthspendingconsiderableeffortonsortingearlymoves.Animprovedsortatanydepthwillexponentiallyreducethetotalnumberofpositionssearched,butsortingallpositionsatdepthsneartherootnodeisrelativelycheapastherearesofewofthem.Inpractice,themoveorderingisoftendeterminedbytheresultsofearlier,smallersearches,suchasthroughiterativedeepening.
Thealgorithmmaintainstwovalues,alphaandbeta,whichrepresentthemaximumscorethatthemaximizingplayerisassuredofandtheminimumscorethattheminimizingplayerisassuredofrespectively.Initiallyalphaisnegativeinfinityandbetaispositiveinfinity,i.e.bothplayersstartwiththeirlowestpossiblescore.Itcanhappenthatwhenchoosingacertainbranchofacertainnodetheminimumscorethattheminimizingplayerisassuredofbecomeslessthanthemaximumscorethatthemaximizingplayerisassuredof(beta<=alpha).Ifthisisthecase,theparentnodeshouldnotchosethethisnode,becauseitwillmakethescorefortheparentnodeworse.Therefore,theotherbranchesofthenodedonothavetobeexplored.
Additionally,thisalgorithmcanbetriviallymodifiedtoreturnanentireprincipalvariationinadditiontothescore.SomemoreaggressivealgorithmssuchasMTD(f)donoteasilypermitsuchamodification.
Furtherimprovementcanbeachievedwithoutsacrificingaccuracy,byusingorderingheuristicstosearchpartsofthetreethatarelikelytoforcealpha–betacutoffsearly.Forexample,inchess,movesthattakepiecesmaybeexaminedbeforemovesthatdonot,ormovesthathavescoredhighlyinearlierpassesthroughthegame-treeanalysismaybeevaluatedbeforeothers.Anothercommon,andverycheap,heuristicisthekillerheuristic,wherethelastmovethatcausedabeta-cutoffatthesamelevelinthetreesearchisalways
7
examinedfirst.Thisideacanbegeneralizedintoasetofrefutationtables.
Alpha–betasearchcanbemadeevenfasterbyconsideringonlyanarrowsearchwindow(generallydeterminedbyguessworkbasedonexperience).Thisisknownasaspirationsearch.Intheextremecas