Presentation is loading. Please wait.

Presentation is loading. Please wait.

Intelligence for Games and Puzzles1 The Game of Go Two players, Black and White, take turns placing.

Similar presentations


Presentation on theme: "Intelligence for Games and Puzzles1 The Game of Go Two players, Black and White, take turns placing."— Presentation transcript:

1 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles1 The Game of Go Two players, Black and White, take turns placing a stone on virtually any empty point on a board (usually 19x19) or passing Neighbouring stones of the same colour connected along a line (but not a diagonal) share a common fate: they form a “block”; they live together, or are captured together A capture occurs when no stone in an enemy block is neighbour to an empty point on the board. captured stones are removed it is permitted to play on the empty points left behind after a capture

2 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles2 Restrictions on moves Two rules prohibit certain moves 1. Suicide is not allowed (ok in Taiwan rules) You cannot play on a point if the block you would make has no liberties (neighbouring empty points) Any capture of enemy stones happens first, a capture will give you liberties, so not suicide 2. Repeating a previous position is not allowed The commonest case is “ko”, where opponent has just captured one stone if you played another stone there now, you would capture back just that opponent stone then he could … you could … for ever    

3 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles3 Object of the game; Scoring a game The object of the game is to control more of the board than your opponent. There are two major scoring systems, which almost always give the same result (if game is played to the finish): Japanese: each player counts the territory he has surrounded, minus prisoners captured. Players are expected to recognise when certain stones on the board have no hope of survival, and treat them as prisoners. Chinese: each player adds the territory he has surrounded to the stones he has on the board. Doomed stones must actually be captured. Territory means empty points in which the opponent could not profitably play, any stones he did play there would end up being captured.

4 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles4 Phases of the game The game in practice usually goes through four phases: Opening (“fuseki”) Players lay claim first to corners, then edges of the board, typically playing on the third and fourth lines counting from edges. It is easiest to make territory in corners, hardest in the centre. Skilled players know many standard sequences (“joseki”) for playing in the corners. Middle game (“chusan”) Players attack each other’s groups of stones, threatening captures, sometimes on a large scale. In attacking they also seek to exert control over larger areas of empty points, thus building territory. Endgame (“yose”) Players seek to win themselves a couple of points here, deny the opponent a couple there. There are seldom significant captures in the endgame. Filling in “dame” - points of no value to either side. When both players pass, they then “tidy up” before counting the score.

5 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles5 Levels of skill Human players, amateur and professional, are ranked on a scale such that a player at one point on the scale expects to win about 2/3 of his games against a player one point lower. “kyu” ranks go from 35k (absolute beginner) to 1k; but you quickly climb to around 16 k with a couple of dozen games “dan” (expert amateur) go from 1d to 6d (or thereabouts); “professional” goes from 1p to 9p; 1p  6d absolute beginners who just know the rules me on a good day the very best player I know the meijinthe best programs

6 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles6 Handicaps In games between equally-ranked players, chance dictates who takes Black and goes first; White receives an allowance (komi, usu. 6.5 points) to compensate. In friendly games between players one rank apart, the weaker one always gets the advantage of playing Black, komi might be 0.5. When players are two or more ranks apart, the weaker player is given free stones at the beginning, in fixed positions, and White makes the first real move. The number of free stones corresponds to the difference in ranks. Up to nine stones are common. If more than nine stones are needed, usually White has to win by a margin of 10 points per extra rank difference (and usually succeeds) Players of radically different strengths can still enjoy a challenge.

7 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles7 What makes Go hard for computers and AI? High Branching factor: On a 19x19 board, for much of the game there are 100-350 moves Game length: Games commonly last for 200-300 moves; sometimes even 350+ Difficulty of evaluation: easily the most significant: It is hard even to design algorithms for determining the Japanese scoring of a game that players agree is over: one must determine which stones are dead, either by search, by pattern recognition, or a mixture of those two. It is hard to design algorithms for determining that there are no more moves worth making - i.e. that the game is over and counting should begin Crucially, it is hard to evaluate the worth of a position, hence the (minimax) score for a move.  What players want in positions has little to do with either the positions of individual stones, or the number of prisoners captured.

8 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles8 6d commentator says “the game is over”!

9 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles9 Tactical possibilities Players must be sensitive to the tactical chances of both sides - particularly sequences of moves that will capture a block of stones sequences of moves that can make a block of stones uncapturable Some of the many tactics for capture are ladders - keeping an enemy block in atari - having just one liberty - until eventually capturing it nets - surrounding a block a little more loosely, so that whichever way an escape is attempted it can be prevented. Tactics for securing a block of stones are forming eyes - empty points wholly surrounded by a block. Such points can be played by the enemy only if capturing. With two eyes, neither can be played by the enemy because of the no-suicide rule making seki - a local stalemate where neither side can safely make the first move to capture the other

10 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles10 Ladder example

11 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles11 Ladder example

12 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles12 Ladder example

13 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles13 Ladder example

14 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles14 Ladder example

15 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles15 Ladder example

16 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles16 Ladder example

17 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles17 Ladder example

18 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles18 Ladder example

19 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles19 Ladder example

20 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles20 Ladder example

21 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles21 Ladder example

22 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles22 Ladder example

23 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles23 Ladder example

24 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles24 Ladder example

25 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles25 Ladder example

26 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles26 Ladder example

27 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles27 Ladder example

28 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles28 Ladder example

29 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles29 Ladder example

30 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles30 Ladder example

31 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles31 Ladder example

32 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles32 Ladder example

33 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles33 Net example

34 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles34 Net example

35 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles35 Net example

36 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles36 Net example

37 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles37 Net example

38 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles38 Other standard tactics There are plenty of other tactics sufficiently commonplace to have names: Loose ladder; Broken ladder; Ladder Breaker Nets of several varieties: geta, knight’s-move, … Sacrifices of various kinds: Snapback, Throw-In, … Connections of various kinds: Bamboo joint, One-space jump, … Ko fight: distant threats forcing responses, bypassing the ko rule Blocks that surround one empty area of 1-6 empty points may not be safe, some configurations of empty space can be filled in by the opponent to kill by nakade. Whether a block (or a group of blocks) can be captured or secured may be determined Dynamically, by search of possible moves Statically (sometimes), using patterns and/or algorithmic analysis

39 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles39 Strategic elements In addition to recognizing the opportunity/threat of tactical combinations, players recognize and reason with various high-level concepts: ko threat - a forcing move, played to permit a subsequent move forbidden by ko moyos - empty areas where one player has staked a rather insecure claim walls - (nearly) straight lines of stones bordering a (significantly) large and (almost) empty area semeai - capturing races where two opposing groups can only survive by killing the other seki - stalemates where two opposing groups can survive only because the other cannot afford the move to make atari shape - good shape is a property of groups of stones that can easily acquire two or more eyes. overconcentration - too many stones of one player in an area sente (initiative) - freedom to initiate activity in another part of the board

40 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles40 Moyos and Territories Moyo Territory

41 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles41 Planning, and Multipurpose moves Skilful players are good at finding multipurpose moves - moves that make progress towards fulfilling more than one goal at the same time. Attacking enemy stones or positions Securing own stones or positions Reducing enemy moyo or territory Expanding own moyo or territory Splitting enemy position into weak fragments to be attacked later Connecting own fragments into stronger, more resilient whole A program capable of finding such moves must do planning in the AI sense: formulate goals, formulate plans for achieving them recognise opponent moves as forming part of opponent plan, seek moves to thwart those plans find moves, possibly less than optimal for any one plan, yet multipurpose

42 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles42 Perception of fuzzily-defined structures & relationships Skilled players describe positions in terms of high-level concepts: some are tactical but most are strategic, like wall, moyo, connection, sente, influence. Recognising these is challenging for an algorithm, since many of the relationships and structures are hard even to define except in a fuzzy way. Recognising them when the stones involved are not yet played is harder still! Experimental psychological studies (using think-aloud protocols; measurement of speed & accuracy of position recall; eye-tracking etc) beginning with the early Reitman paper, have sought to elucidate what expert players perceive, so that algorithms can be developed to perceive the same or similar. (Reitman, 1976: Skilled perception in Go: Deducing Memory Structures from inter-response times. Cognitive Psychology vol 8 pp336-356)

43 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles43 Revertible data structures? Chess programs need to represent the pieces on the board, and little else. Chess programs with fast search methods work well when combined with static evaluation functions that examine the locations of pieces on the board. Go programs appear to need to represent structures much more complex than the stones on the board. Most of these structures will be unaffected by any particular move. Should a program use revertible data structures, which can be incrementally updated and downdated?  Complex coding but perhaps cheap to use in backtracking search Or should it build structures from scratch for every move?  Simpler coding, less bug-prone, arguably (Wilcox) equally cheap.

44 http://csiweb.ucd.ie/Staff/acater/comp4031.htmlArtificial Intelligence for Games and Puzzles44 Use of machine learning techniques Computer Go is second only to Computer Chess in terms of the research and programming effort that has been put in - with far less success. There are numerous attempts to use machine learning, with and without neural networks, to extract and refine the implicit knowledge of human experts. Go Servers (IGS, KGS, NNGS, …) allow remote players to play online, they keep records which can be mined. Professional and top-level amateur games are (manually) recorded, and commented, and distributed via internet. If a professional played this move it must be good … learn to predict the move the professional chose, you have learnt something!


Download ppt "Intelligence for Games and Puzzles1 The Game of Go Two players, Black and White, take turns placing."

Similar presentations


Ads by Google