It turns out that games that most humans can become reasonably good at after some practic e such as GO Chess or Checkers are actually di64259cult for computers t o solve In exploring how we could make machines play the games we play we are forced t ID: 33318
Download Pdf The PPT/PDF document "Introduction to AI Techniques Game Searc..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
IntroductiontoAITechniquesGameSearch,Minimax,andAlphaBetaPruningJune8,2009IntroductionOneofthebiggestareasofresearchinmodernArticialIntelligenceisinmakingcomputerplayersforpopulargames.Itturnsoutthatgamesthatmosthumanscanbecomereasonablygoodataftersomepractice,suchasGO,Chess,orCheckers,areactuallydicultforcomputerstosolve.Inexploringhowwecouldmakemachinesplaythegamesweplay,weareforcedtoaskourselveshowweplaythosegames.Althoughitseemsthathumansusesomenotionof\intelligence"inplayingagamelikechess,ourapproachesinsolvingsuchgameshavenotprogressedmuchfartherthanthesortofbruteforceapproachesthatweexperimentedwithinthe50s.Unfor-tunately,presentcomputerplayersusuallyrelyonsomesortofsearchoverpossiblegameoutcomestondtheoptimalmove,ratherthanusingwhatwewoulddeemintelligentbehavior.Inthisdiscussionwewillseesomeoftheideasbehindthesecomputerplay-ers,aswellasfuturedirectionstheeldmighttake,andhowthesecomputerapproachescanbothhelpuslearntoplaythegamesbetteraswellaspointoutsomefundamentaldierencesbetweenhumanplayandmachineplay.Asaquicktimelinetoshowhow(notvery)farwehavecomesinceClaudeShannon's(afamousMITprofessor,thefatherofInformationTheory,etc.)ProgrammingaComputerPlayingChess,1948:1948ClaudeShannon1 SP.268AITechniquesForSolvingGames 1951AlanTuringworksoutaplanonpaperforachess-playingcom-puterprogram.1966-1967MacHack6,developedatMIT,rstchessprogramtobeatapersonintournamentplay1997DeepBluebeatsKasparov,thereigningworldchesschampionatthetime,inabestoutof6match.Thiswasseenasalandmarkinthechessprogramworld,butreallyDeepBluewasjustlikepreviouschessplayingmachineswithbiggerandbettercomputingpower,andnomore\intelligence"thananypreviousmodel.Well-knownPlayersThemostpopularrecentgametobesolvedischeckers,whichhadupto200processorsrunningnightanddayfrom1989to2007.Checkershas51020possiblepositionsonits8by8board.Itisnowknownthatperfectplaybyeachsideresultsinadraw.YoucanplayaroundwiththedatabaseontheChinookproject'swebsite:www.cs.ualberta.ca/chinook/.Thegameisstronglysolved,andforeverymoveChinooktellsyouwhetheritleadstoawinningstrategy,alosingstrategy,oradraw.AnotherfamouscomputerplayerisDeepBlue,whobeatchessworldcham-pionGarryKasparovin1997,whichwascapableofevaluating200millionpositionspersecond.HowToSolveaGame?Whatifwejustgivethecomputersimplerulestofollowinwhatisknownasaknowledgebasedapproach.Thisishowalotofbeginnerandsometimesadvancedhumanplayersmightplaycertaingames,andinsomegamesitactuallyworks(we'lltakeacloserlookusingConnectFournexttime).Takethefollowingrulesfortic-tac-toe,forinstance.Yougiveitthefollowinginstructionstoblindlyfollowinorderofimportance:1.Ifthereisawinningmove,takeit.2.Ifyouropponenthasawinningmove,takethemovesohecan'ttakeit.2 SP.268AITechniquesForSolvingGames 3.Takethecentersquareoveredgesandcorners.4.Takecornersquaresoveredges.5.Takeedgesiftheyaretheonlythingavailable.Let'sseewhathappenswhenthecomputerplaysthisgame(picturetakenfromVictorAllis'sConnectFourThesis): Thisapproachclearlywillnotalwayswork.Therearesomanyexceptionstorulesthatforagamelikechessenumeratingallthepossiblerulestofollowwouldbecompletelyinfeasible.Thenextlogicaloptiontotryissearch.Ifaplayercouldpredicthowtheotherplayerwouldrespondtothenextmove,andhowhehimselfwouldrespondtothat,andhowthenextplayerwouldrespondnext,etc.,thenclearlyourplayerwouldhaveahugeadvantageandwouldbeabletoplaythebestmovepossible.Sowhydon'twejustbuildourcomputerplayerstosearchallthepossiblenextmovesdownthegametree(whichwewillseeinmoredetailsoon)andchoosesthebestmovefromtheseresults?Icanthinkofatleasttwoofmanygoodreasons:Complexity-Aswewillseebelow,ifagameoersplayersbdierentpossiblemoveseachturn,andthegametakesdmovestotal,thenthepossiblenumberofgamesisaroundbd.That'sanexponentialsearchspace,notlookinggood!Fortic-tac-toe,thereareabout255,168possiblegames.Denitelyreasonable.Butforchess,thisnumberisaround3640,somethinglikemorethanthenumberofparticlesintheuniverse.Nogood.It'snotintelligence!Brutecomputationalforceisnotexactlyintell-gience.Notveryexcitingsciencehere,atleastnotforustheoretical3 SP.268AITechniquesForSolvingGames people.Maybeexcitingforthehardwareguysthatbuildfasterpro-cessorsandsmallermemorytothatwehavethecomputationalpowertosolvethesegames,butotherthanthatnotverycool...Itwouldbemuchmoreexcitingtocomeupwitha\thinking"player.Sowhatshouldwedo?Wecan'tusejustsimplerules,butonlyusingsearchdoesn'treallyworkouteither.Whatifwecombineboth?Thisiswhatisdonemostofthetime.Partofthegametreeissearched,andthenanevaluation,akindofheuristic(tobediscussedmoresoon)isused.Thisapproachworksrelativelywell,andthereisagooddealofintelligenceneededindesigningtheevaluationfunctionsofgames.GamesasTreesFormostcasesthemostconvenientwaytorepresentgameplayisonagraph.Wewillusegraphswithnodesrepresentinggame\states"(gameposition,score,etc.)andedgesrepresentingamovebyaplayerthatmovesthegamefromonestatetoanother: Usingtheseconventions,wecanturntheproblemofsolvingagameintoaversionofgraphsearch,althoughthisproblemdiersfromothertypesofgraphsearch.Forinstance,inmanycaseswewanttondasinglestateinagraph,andthepathfromourstartstatetothatstate,whereasingamesearchwearenotlookingforasinglepath,butawinningmove.Thepathwetakemightchange,sincewecannotcontrolwhatouropponentdoes.Belowisasmallexampleofagamegraph.Thegamestartsinsomeini-tialstateattherootofthegametree.Togettothenextlevel,playeronechoosesamove,A,B,C,orD.Togettothenextlevel,playertwomakesamove,etc.Eachlevelofthetreeiscalledaply.4 SP.268AITechniquesForSolvingGames Soifweareplayerone,ourgoalistondwhatmovetotaketotrytoensurewereachoneofthe\W"states.Notethatwecannotjustlearnastrategyandspecifyitbeforehand,becauseouropponentcandowhateveritwantsandmessupourplan.Whenwetalkaboutgamegraphssometermsyoumightwanttobefamiliarwithare:Branchingfactor(b)Thenumberofoutgoingedgesfromasinglenode.Inagamegraph,thiscorrespondstothenumberofpossiblemovesaplayercanmake.Soforinstance,ifweweregraphingtic-tac-toe,thebranchingfactorwouldbe9(orless,sinceafterapersonmovesthepossiblemovesarelimited,butyougettheidea)PlyAlevelofthegametree.Whenaplayermakesamovethegametreemovestothenextply.Depth(d)Howmanyplysweneedtogodownthegametree,orhowmanymovesthegametakestocomplete.Intic-tac-toethisisprobablysomewherearound6or7(justmadethatup...).Inchessthisisaround40.5 SP.268AITechniquesForSolvingGames MinimaxThemostusedgametreesearchistheminimaxalgorithm.Togetasenseforhowthisworks,considerthefollowing:HelenandStavrosareplayingagame.Therulesofthisgameareverymysterious,butweknowthateachstateinvolvesHelenhavingacertainnumberofdrachmasateachstate.PoorStavrosnevergetsanydrachmas,buthedoesn'twantHelentogetanyricherandkeepbossinghimaround.SoHelenwantstomaximizeherdrachmas,whileStavroswantstominimizethem.Whatshouldeachplayerdo?AteachlevelHelenwillchoosethemoveleadingtothegreatestvalue,andStavroswillmovetotheminimum-valuedstate,hencethename\minimax."Formally,theminimaxalgorithmisdescribedbythefollowingpseudocode:defmax-value(state,depth):if(depth==0):returnvalue(state)v=-infiniteforeachsinSUCCESSORS(state):v=MAX(v,min-value(s,depth-1))returnvdefmin-value(state,depth):if(depth==0):returnvalue(state)v=infiniteforeachsinSUCCESSORS(state):v=MIN(v,max-value(s,depth-1))returnv6 SP.268AITechniquesForSolvingGames Wewillplayoutthisgameonthefollowingtree: Thevaluesattheleavesaretheactualvaluesofgamescorrespondingtothepathsleadingtothosenodes.WewillsayHelenistherstplayertomove.Soshewantstotaketheoption(A,B,C,D)thatwillmaximizeherscore.ButsheknowsinthenextplydownStavroswilltrytominimizethescore,etc.Sowemustllinthevaluesofthetreerecursively,startingfromthebottomup.Helenmaximizes: Stavrosminimizes:7 SP.268AITechniquesForSolvingGames Helenmaximizes: SoHelenshouldchooseoptionCasherrstmove.Thisgametreeassumesthateachplayerisrational,orinotherwordstheyareassumedtoalwaysmaketheoptimalmoves.IfHelenmakesherdecisionbasedonwhatshethinksStavroswilldo,isherstrategyruinedifStavrosdoessomethingelse(nottheoptimalmoveforhim)?Theanswerisno!HelenisdoingthebestshecangivenStavrosisdoingthebesthecan.IfStavrosdoesn'tdothebesthecan,thenHelenwillbeevenbettero!Considerthefollowingsituation:HelenissmartandpicksC,expectingthataftershepicksCthatStavroswillchooseAtominimizeHelen'sscore.ButthenHelenwillchooseBandhaveascoreof15comparedtothebestshecoulddo,10,ifStavrosplayedthebesthecould.Sowhenwegotosolveagamelikechess,atreelikethis(exceptwithmanymorenodes...)wouldhaveleavesasendgameswithcertainscoresassignedtothembyanevaluationfunction(discussedbelow),andtheplayertomove8 SP.268AITechniquesForSolvingGames wouldndtheoptimalstrategybyapplyingminimaxtothetree.Alpha-BetaPruningWhiletheminimaxalgorithmworksverywell,itendsupdoingsomeextrawork.ThisisnotsobadforHelenandStavros,butwhenwearedealingwithtreesofsize3640wewanttodoaslittleworkaspossible(myfavoritemottoofcomputerscientists...wetrytobeaslazyaspossible!).Intheexampleabove,Helenreallyonlycaresaboutthevalueofthenodeatthetop,andwhichoutgoingedgesheshoulduse.Shedoesn'treallycareaboutanythingelseinthetree.Isthereawayforhertoavoidhavingtolookattheentirething?Toevaluatethetopnode,Helenneedsvaluesforthethreenodesbelow.Sorstshegetsthevalueoftheoneontheleft.(wewillmovefromlefttorightasconvention).Sincethisistherstnodeshe'sevaluating,therearen'treallyanyshortcuts.Shehastolookatallthenodesontheleftbranch.Soshendsavalueof7andmovesontothemiddlebranch.AfterlookingattherstsubbranchofherBoption,Helenndsavalueof7.Butwhathappensthenextlevelup?StavroswilltrytominimizethevaluethatHelenmaximized.Theleftnodeisalready7,soweknowStavroswillnotpickanythinggreaterthan7.ButwealsoknowHelenwillnotpickanythinginthemiddlebranchlessthan7.Sothereisnopointinevaluatingtherestofthemiddlebranch.Wewilljustleaveitat7: Helenthenmovesontotherightmostbranch.Shehastolookatthe10andthe11.Shealsohastolookatthe2and15.Butonceshendsthe15,sheknowsthatshewillmakethenextnodeupatleast15,andStavrosisgoing9 SP.268AITechniquesForSolvingGames tochoosetheminimum,sohewilldenitelychoosethe10.Sothereisnoneedtoevaluatethe7. Sowesavedevaluating6outof26nodes.Notbad,andoftenalpha-betadoesalotbetterthanthat.Formally,thealpha-betapruningoptimizationtotheminimaxalgorithmisasfollows:a=bestscoreformax-player(helen)b=bestscoreformin-player(stavros)initially,wecallmax-value(initial,-infinite,infinite,max-depth)defmax-value(state,a,b,depth):if(depth==0):returnvalue(state)forsinSUCCESSORS(state):a=max(a,min-value(s,a,b,depth-1))ifa=b:returna\\thisiaacutoffpointreturnadefmin-value(state,a,b,depth):if(depth==0):returnvalue(state)forsinSUCCESSORS(state):b=min(b,max-value(s,a,b,depth-1))ifb=a:returnb\\thisisacutoffpointreturnbThereareacouplethingsweshouldpointoutaboutalpha-betacomparedtominimax:10 SP.268AITechniquesForSolvingGames Areweguaranteedacorrectsolution?Yes!Alpha-betadoesnotactuallychangetheminimaxalgorithm,ex-ceptforallowingustoskipsomestepsofitsometimes.Wewillalwaysgetthesamesolutionfromalpha-betaandminimax.Areweguaranteedtogettoasolutionfaster?No!Evenusingalpha-beta,wemightstillhavetoexploreallbdnodes.ALOTofthesuccessofalpha-betadependsontheorderinginwhichweexploredierentnodes.PessimalorderingmightcausesustodonobetterthanManama's,butanoptimalorderingofalwaysexploringthebestoptionsrstcangetustoonlythesquarerootofthat.Thatmeanswecangotwiceasfardownthetreeusingnomoreresourcesthanbefore.Infact,themajorityofthecomputationalpowerwhentryingtosolvegamesgoesintocleverlyorderingwhichnodesareex-ploredwhen,andtherestisusedonperformingtheactualalpha-betaalgorithm.InterestingSideNote-Konig'sLemmaIwillusethisopportunitytointroduceaninterestingtheoremfromgraphtheorythatappliestoourgamegraphs,calledKonig'sLemma:Theorem:Anygraphwithanitebranchingfactorandaninnitenum-berofnodesmusthaveaninnitepath.Proof:Assumewehaveagraphwitheachnodehavingnitelymanybranchesbutinnitelymanynodes.Startattheroot.Atleastoneofitsbranchesmusthaveaninnitenumberofnodesbelowit.Choosethisnodetostartourinnitepath.Nowtreatthisnewnodeastheroot.Repeat.Wehavefoundaninnitepath.Howdoesthisapplytoourgametrees?Thistellsusthatforeverygame,either:1.Itispossibleforthegametoneverend.2.Thereisanitemaximumnumberofmovesthegamewilltaketoterminate.11 SP.268AITechniquesForSolvingGames Notethatweareassuminganitebranchingfactor,orinotherwords,eachplayerhasonlynitelymanyoptionsopentothemwhenitishisorherturn.ImplementationAswehavesaidoverandoveragain,actuallyimplementingthesehugegametreesisoftenahugeifnotimpossiblechallenge.Clearlywecannotsearchallthewaytothebottomofasearchtree.Butifwedon'tgotothebottom,howwillweeverknowthevalueofthegame?Theansweriswedon't.Well,weguess.Mostsearcheswillinvolvesearch-ingtosomepresetdepthofthetree,andthenusingastaticevaluationfunctiontoguessthevalueofgamepositionsatthatdepth.Usinganevaluationfunctionisanexampleofaheuristicapproachtosolv-ingtheproblem.Togetanideaofwhatwemeanbyheuristic,considerthefollowingproblem:RobbytherobotwantstogetfromMITtoWaldenPond,butdoesn'tknowwhichroadstotake.Sohewillusethesearchalgorithmhewrotetoexploreeverypossiblecombinationofroadshecouldtakelead-ingoutofCambridgeandtaketheroutetoWaldenPondwiththeshortestdistance.Thiswillwork...eventually.ButifRobbysearcheseverypossiblepath,someotherpathswillendupleadinghimtoQuincy,sometoProvidence,sometoNewHampshire,allofwhicharenowherenearwhereheactuallywantstogo.SowhatifRobbyreneshissearch.Hewillassignaheuristicvalue,theairplane(straightline)distancetoeachnode(roadintersection),anddirecthissearchsoastochoosenodeswiththeminimumheuristicvalueandhelpdirecthissearchtowardthegoal.TheheuristicactsasanestimatethathelpsguideRobby.Similarly,ingamesearch,wewillassignaheuristicvaluetoeachgamestatenodeusinganevaluationfunctionspecictothegame.Whenwegetasfaraswesaidwewoulddownthesearchtree,wewilljusttreatthenodesatthatdepthasleavesevaluatingtotheirheuristicvalue.12 SP.268AITechniquesForSolvingGames EvaluationFunctionsEvaluationfunctions,besidestheproblemaboveofndingtheoptimalor-deringofgamestatestoexplore,isperhapsthepartofgamesearch/playthatinvolvesthemostactualthought(asopposedtobruteforcesearch).Thesefunctions,givenastateofthegame,willcomputeavaluebasedonlyonthecurrentstate,andcaresnothingaboutfutureorpaststates.Asanexampleevaluation,consideroneofthetypethatShannonusedinhisoriginalworkonsolvingchess.Hisfunction(fromWhite'sperspective)calculatesthevalueforwhiteas:+1foreachpawn+3foreachknightorbishop+5foreachrook+9foreachqueen+somemorepointsbasedonpawnstructure,boardspace,threats,etc.itthencalculatesthevalueforblackinasimilarmanner,andthevalueofthegamestateisequaltoWhite'svalueminusBlack'svalue.Thereforethehigherthevalueofthegame,thebetterforwhite.Formanygamestheevaluationofcertaingamepositionshavebeenstoredinahugedatabasethatisusedtotryto\solve"thegame.Acoupleexamplesare:OHex-partialsolutionstoHexgamesChinook-databaseofcheckerspositionsAsyoucansee,thesefunctionscangetquitecomplicated.Rightnow,eval-uationfunctionsrequiretediousrenementsbyhumansandaretestedrig-orouslythroughtrialanderrorbeforegoodonesarefound.Therewassomeworkdone(cs.cmu.edu/jab/pubs/propo/propo.html)onwaysformachinesto\learn"evaluationfunctionsbasedonmachinelearningtechniques.Ifma-chinesareabletolearnheuristics,thepossibilitiesforcomputergameplaying13 SP.268AITechniquesForSolvingGames willbegreatlybroadenedbeyondourcurrentpuresearchstrategies.Laterwe'llseeadierentwayofevaluatinggames,usingaclassofnum-berscalledthesurrealnumbers,developedbyJohnConway.SolvingaGameWeoftentalkaboutthenotionof\solving"agame.Therearethreebasictypesof\solutions"togames:1.Ultra-weakTheresultofperfectplaybyeachsideisknown,butthestrategyisnotknownspecically.2.WeakTheresultofperfectplayandstrategyfromthestartofthegamearebothknown.3.StrongTheresultandstrategyarecomputedforallpossiblepositions.HowfardoweneedtoSearch?Howfardoweneedtosearchdownthetreeforourcomputerplayertobesuccessful?Considerthefollowinggraph(theverticalaxisisachessabilityscore): (takenfrom6.034coursenotes).DeepBlueused32processors,searched50-10billionmovesin3minutes,andlookedat13-30plyspersearch.Clearly,toapproachthechess-playinglevelofworldchampionhumans,14 SP.268AITechniquesForSolvingGames withcurrenttechniquessearchingdeeperisthekey.Alsoobvious,isthatrealplayerscouldn'tpossiblybesearching13movesdeep,sotheremustbesomeotherfactorinvolvedinbeinggoodatchess.Isgame-playallabouthowmanymovesweseeahead?Ifsearchingdeepintothegametreeissohard,howarehumansabletoplaygameslikeChessandGOsowell?Doweplaybymentallydrawingoutagameboardandperformingminimax?Itseemsthatinsteadhumansusesuperiorheuristicevaluations,andbasetheirmovesonexperiencefrompreviousgameplayorsomesortofintuition.Goodplayersdolookahead,butonlyacoupleofplys.Thequestionstillremainsastohowhumanscandosowellcomparedtomachines.Whyisithardestforamachinetodowhatiseasiestforahuman?AlternativeSearchMethodsTherearecountlesstweaksandalternativestothemaximinandalpha-betapruningsearchalgorithms.Wewillgooverone,theproof-numbersearch,here,andleaveanothervariation,conspiracynumbersearch,forourdiscus-sionnextweekonconnectfour.PN-searchWhilealpha-betasearchdealswithassigningnodesofthegametreecon-tinuousvalues,proofnumbersearchdecideswhetheragivennodeisawinoraloss.Informally,pn-searchcanbedescribedaslookingfortheshortestsolutiontotellwhetherornotagivengamestateisawinoralossforourplayerofinterest.Beforewetalkaboutproofnumbersearch,weintroduceAND-ORtrees.Thesearetwolevelalternatingtrees,wheretherstlevelisanORnode,thesecondlevelconsistsofANDnodes,etc.Thetreebelowisanexample:15 SP.268AITechniquesForSolvingGames Ifweassignalltheleavestovalues(T)rueor(F)alse,wecanmoveupthetree,evaluatingeachnodeaseithertheANDofitsleavesortheORofitsleaves.Eventuallywewillgetthevalueoftherootnode,whichiswhatwearelookingfor. Foranygivennode,wehavethefollowingdenitions:PN-number:Theproofnumberofanodeistheminimumnumberofchildrennodesrequiredtobeexpandedtoprovethegoal.{AND:pn=(pnofallthechildrennodes){OR:pn=(argmin(pnofchildrennodes))DN-number:Thedisproofnumberistheminimumnumberofchil-drennodesrequiredtodisprovethegoal.{AND:dn=argmin(dnofchildrennodes){OR:dn=(dnofchildrennodes)16 SP.268AITechniquesForSolvingGames Whenwegettoaleaf,wewillhave(pn,dn)either(0;1),(1;0),or(1,1),sincethegameiseitherasurewinorsurelossatthatpoint,withitselfasitsproofset.Thetreeisconsideredsolvedwheneitherpn=0(theansweristrue)ordn=0(theanswerisfalse)fortherootnode.Whenwetakeastepbackandthinkaboutit,anAND/ORtreeisverymuchaminimaxtree.TherootstartsoutasanORnode.Sotherstplayerhashischoiceofoptions,andhewillpickonethatallowshisrootnodetoevaluatetotrue.ThesecondplayermustplayatanANDnode:unlesshecanmakehisnodeTnomatterwhat,(soFforplayer1),thenplayeronewilljusttakeoneofthefavorableoptionsleftforhim.SoanAND/ORtreeisjustamin/maxtreeinasense,withORsreplacingtheMAXlevelsandANDreplacingtheMINlevels.PNsearchiscarriedoutusingthefollowingroughoutline:1.Expandnodes,updatepnanddnnumbers.2.Takethenodewiththelowestpnordn,propagatethevaluesbackupuntilyoureachtherootnode.3.Repeatuntiltherootnodehaspn=0ordn=0.Theslightlytrickypartofthisisthesecondstep.WhatwereallywanttondistheMostProvingNode.Formally,thisisdenedasthefrontiernodeofanAND/ORtree,whichbyobtainingavalueofTruereducesthetree'spnvalueby1,andobtainingavalueofFalsereducesthednby1.Soevaluatingthisnodeisguaranteedtomakeprogressineitherprovingordisprovingthetree.Animportantobservationisthatthesmallestproofsettodisproveanodeandthesmallestproofsettoproveanodewillalwayshavesomenodesincommon.Thatis,theirintersectionwillnotbeempty.Whyisthis?Inabriefsketchofaproofbycontradiction,assumeforthecontrarythattheyhadcompletelydisjointsetsofnodes.Thenwecouldtheoreticallyhaveacompleteproofsetandacompletedisproofsetatthesametime.Butwecannotbothproveanddisproveanode!Sothesetsmustsharesomenodesincommon.17 SP.268AITechniquesForSolvingGames Whatwegetoutofallofthisisthatwedon'treallyhavetodecidewhetherwewillworkonprovingordisprovingtherootnode,aswecanmakeprogressdoingboth.Sonowwecanbecertainofwhatwewilldoateachstepofthealgorithm.Therevisedstep2fromaboveis:AtanORlevel,choosethenodewiththesmallestpntoexpand.AtanANDlevel,choosethenodewiththesmallestdntoexpand.Thetreebelowisanexampleofpnsearch,takenfromVictorAllis's\Search-ingforSolutions,"inwhich\R"isthe\most-provingnode." OthersIwilljustbrie\rymentionacoupleofothervariationsongamesearchthathavebeentried,manywithgreatsuccess.Alpha-beta,choosingaconstrainedrangeforalphaandbetabefore-hand.MonteCarlowithPNsearch:randomlychoosesomenodestoexpand,andthenperformpn-searchonthistreeMachinelearningofheuristicvaluesGroupedgesofthesearchtreeinto\macros"(wewillseethis)Agazillionmore.18 SP.268AITechniquesForSolvingGames NextTime:ConnectFourandConspiracyNumberSearch!ReferencesVictorAllis,SearchingforSolutions,http://fragrieu.free.fr/SearchingForSolutions.pdfIntelligentSearchTechniques:ProofNumberSearch,MICC/IKATUniversiteitMaastrichtVariousyearsof6.034lecturenotes19