summary how to play go project details demo results conclusions
TRANSCRIPT
Summary
Our project is to create an agent that will be able to play the game of Go on a competitive level against the members in our group. The decision making process of the agent will involve using a MAXIMIN tree to evaluate the strengths of each possible move.
How to Play GoThere are 3 simple rules to remember:
• Two players (black and white) take turns, placing one stone on the board at a time. • A stone must be placed on the intersection of the vertical and horizontal lines. • Once a stone is placed, you can't move it, although under some conditions it may be removed.
Objective:• The objective of Go is to make your "territory" larger than that of your
opponent. One way to make territory is to "capture" opponent's stones.• Stones that are surrounded are removed from the board and are
handed to the opponent as prisoners.• Each prisoner will be worth one point.
Capturing Stones
With one more move, the white stone will be completely surrounded and will be removed.
Stones that can be removed with one more move are said to be in "Atari".
Illegal Moves
You can play almost anywhere on the board. However, there are some places where the rules say can't play.
Black can't make a move at A. (White can.)
Because, if black played there, that stone would be already surrounded.
Such suicide behavior is forbidden.
Illegal Moves
However, black can play on B.
With a black stone on B, the two white stones nearby will be surrounded and be removed.
Ko (eternity)The moves which produce the same board position are prohibited. This concept is called Ko (eternity). However, you can take the Ko stone back once you play somewhere else.
To win the Ko fight:• Find a place where you can gain a
lot by making 2 successive moves.• If the opponent doesn't allow it, the
Ko fight continues.• If he ignores your threat, you can
make 2 successive moves while your opponent wins the Ko.
Project Details The agent uses a MAXIMIN tree
evaluation algorithm to find the best moves
It uses a heuristic to evaluate the strength of each board
MAXIMIN Tree
PA
SS
Score: -32
Score: 8
Score: 8
Score: -32
•Will first evaluate the board as if a pass was taken•Set MaxScore to score of the passing branch
MaxScore : -32
Best Move (so far)
MAXIMIN Tree
Old nodes are removed and the next branch is investigated
MaxScore : -16
Score: 24Score: 24
Score: -16
Score: -16
Score: -32 Best Move (so far)
MAXIMIN Tree
MaxScore : 66
Score: 66
Score: 66 Score: 66
Score: 66
Best Move
Score: -16
If many branches have the same max or min score a move will be chosen randomly.
Scoring HeuristicOur AI uses the following heuristic to evaluate the strength of a move.
H(move) = 32 myC + 16 myAT + 4 myLT – 8 oAT – 32 oC
myC = Total stones I captured from opponent myAT = My actual territorymyLT = My loose territory oAT = Opponent’s actual territoryoC = Total stones Opponent captured from me
Actual TerritoryAny group of empty vertices surrounded by a single color is considered actual territory of that color.
Loosely Owned Territory
Problem Not all moves capture Opponent Stones Not all moves gain Territory
How we calculate: We say we loosely own a territory if we have
another stone within 3 territories from us that can possible be used to surround.
Meaning if we have a Wall or Similar Stone within 3 Territories in any direction of our stone then we loosely own the area in between them.
Results
Ending being able to only search a depth of 2Going deeper significantly slowed down
Gobot Was able to calculate loosely and
actually owned territory as well as captures
Played better than random, with a tree depth of only 1 and some people when the Gobot used a depth of 2
Successes
Able to defend by seeing when the opponent will attempt a capture
Able to see when stones cannot be saved
Able to make moves that increase territory even if not immediately
Knows when to pass Intelligent sacrifices and captures
Problems to Improve Upon
Supposes that the opponent will make the optimal move according to our heuristicSome times our heuristic is wrongHumans will make suboptimal moves
Evaluating the tree at a depth of 3 causes the Gobot to be almost unplayable because of time
Tree Depth 1 vs. Tree Depth 2
We played the Gobot against itself using different tree depths to see how it would perform.
Average Time
Depth 2
Depth 1
0:00:00 0:00:17 0:00:34 0:00:51 0:01:09 0:01:26 0:01:43
•Each depth increases the time by a factor of about 80.•At depth 2 each move took about 3 seconds.•At depth 3 each move would take about 4 minutes!•So to go even 1 more depth would take the game almost 2 hours!
Random vs. Our Tree
On average, Tree Depth 1 scored 7.1 higher than Random
We played our Gobot against a Gobot making random legal moves to see how it would perform.
Tree Depth 2 fared much better against Random