inside haruka written by ryuichi kawa surveyed by akihiro kishimto
Post on 21-Dec-2015
221 views
TRANSCRIPT
Inside HARUKA
Written by Ryuichi Kawa
Surveyed by Akihiro Kishimto
Obstacles to Go-Playing Programs
• So many exceptions that must be implemented:– E.g. A & B are connected, B & C are
connected, but A & C aren’t
• Static evaluation v.s. search– If possible, evaluate statically– If exceptions frequently appears, perform a
search
Overview of HARUKA’s Search Engine
• 6 routines– Fuseki– Joseki– Life and death– Semeai– Search around center– Local search
• Each routine returns move and evaluation value called deiri(input/output) computation
1. Compute value by my playing first2. Compute value by opponent playing first3. Compute 1. – 2. And return this value
Fuseki Routine
• Inaccurate but looks stable with occasional adjustments– Each fuseki move has evaluation values:
• Three-four point, star point: 18 points
• Kakari: 17 points
• Corner enclosure: 16 points
• Extension, splitting move etc: 8-15 points based on distance and strength of stones
Joseki Routine
• Pattern sized 11 * 11– Immediately makes a move if pattern matches– Randomly choose one if more than one pattern
matches
• Pattern matches with smaller sizes (9 * 9 or 7 * 7)– Regard as promising move– Passed to local search engine
Life and Death/Semeai Routines
• Return status (e.g. win, win for Ko, seki) of life and death/semeai
• Occasionally returns incorrect outcome– E.g. stones outside of region influences on
outcome
• Might be only a part of local search engine?
Search around Center
• Perform 3-ply search for points extending/fighting/breaking moyo around center of the board– # of branches <= 10– Choose point that doesn’t contain any stones
for 8 directions
• Prepared for programs playing like Go++• Currently does not work well
Overview of Local Search
• Search range– (x,y): stone worth considering– R = {(p,q)| |p – x| + |q – y| < 8}– Ladder is an exception
• Alpha-beta search– Maximum number of branches = 10– Depth = direct 3-5 ply search– Spends almost all the time
Overview of Local Search (cont’d)
• How is a local search performed?1. Do a local search around the opponent’s stone played
last time
2. Do a local search around the stone I played last time
3. Compute places that are influenced on by these two stones
4. Perform local searches around these places
5. Previous results are stored and updated
6. Re-searches are performed if necessary
Position Recognition (1 / 3)
• From simple notion to complicated (19 features)– Whether there’s a stone or not, # of empty stones around
a point, ko point– Strings and # of stones, liberties (up to 4) , # of liberties– Characteristics of connections
• 1-point jump, 2-point jump, knight’s move, knight’s big move
– Detect points where opponent can’t cut • kosumi, bamboo, eye, opponent’s suicide point
– Points where ate/nuki is possible– Points where cut/fukurami is possible
Position Recognition (2 / 3)
– Status on whether white and black stones are adjacent
– Points for connections (1-point jump peep, keima-dekiri), double atari
– Capture search
– Kiri(cut) search (reuse capture search)
– Life and death for semi-connected strings and influence computation
– Eye-shape (eye, half-eye, eye with 2 (3, 4, ..) consecutive moves, false-eye)
Position Recognition (3 / 3)
– Detect groups– Compute boundary and size of moyo for each group– Compute how easily group can be escaped and
connection to other groups– Strength, size and importance of group– Compute evaluation values for moves played at the
points adjacent to stones • hane, nobi, attach, ate,cut, tsuki-nuke, pincer-attach, etc
– Compute evaluation values for moves played at the points not adjacent to stones
• 1-point jump, kosumi, keima-gake, hazama, sarusuberi, etc
Capture Search
• Alpha-beta search + TT for string with # of liberties <= 4– # of branches <= 8– Depth <= 64 – # of node limit <= 1000
• Performs well if # of liberties <= 3• Needs a lot of time (sometimes 90% of computation) to
determine outcome• Cannot distinguish unconditional capture from capture for ko• Need to restrict moves and prove strings aren’t captured as
quickly as possible
Kiri Search
• Detect whether target strings are cut at cutting points– Utilize capture search
• Stones dropped at cutting points are captured target strings are not cut
• Perform only at important points (capture search too)– points around stone played in the previous
move
Influence Computation
• Preliminary compute life and death (strength) of stones
• Compute influence: c / d^2– c: strength of stone d: distance– Influenced up to 1-point jump point– Can’t go through other stones and bamboo
• Add up these numbers
Strength and Importance of Groups
• Convert features into # of eye points– # of eye points– Eye-shape– Possibility to escape, extend, and connect– Status of opponent’s stones
Evaluating Points (Not) Adjacent to Stones
• Have value between 0 – 255 tuned by hand– 0: completely bad move– 64: bad move– 128: normal move– …
• Used if all the stones in the region are (mostly) alive
Move Generation
• Moves are generated in the following order:1. Moves having a high priority
• connecting stones around stone played by opponent just before, escaping from atari, 2-line block
2. Double atari, capture, escape3. Semeai moves4. Attacking/defending weak stones5. Moves at points (not) adjacent to stones having high
evaluation values6. Ko threats
• Look at the whole board
Evaluation at Leaf Nodes
1. Position recognition
2. Verifying if one of two strings can be captured
3. Detecting Life and death status for group
4. Adjusting life and death status for group considering connections to other groups
5. Adjusting life and death status for group considering opponent’s groups and semeai
6. Territory computation
Other Issues
• Adjustment to search results– Adding 1-4 points for sente move– Effective for yose
Near Future Work
• Play moves that prevents opponent’s moyo• Adjust evaluation values for yose
considering double-sente, sente, double-gote
• Have a strategy for detecting a loss• Perform 5-ply search without degrading
speed (realization probability?)• Improve capture search
Things that Must be Done in the Long Run
• Strategies based on position evaluation– There’s no difference of losses between 0.5
point and 100 points
• Human-like playing style– Consistency, moves when in a disadvantageous
position
• Special scheme for ko fights– Seems to be impossible with searches only