Download presentation

Presentation is loading. Please wait.

1
**Prepare for 4x4x4 tic-tac-toe**

Advanced Game Play Prepare for 4x4x4 tic-tac-toe

2
**Checkers is Solved! Checkers has approximately 500 billion positions**

Jonathan Schaeffer Retrograde analysis All combinations of 1-10 pieces (endgame positions) Standard openings (first ~10 moves) “middle game” solved using search with heuristics

3
**Transposition Tables - Hash Tables**

After a position is analyzed, an entry is made in a hash table so that if that position is encountered again, its value can be immediately reported Often the limiting factor is the size of the available hash table The same moves made in a different order will often generate the same positions Hash tables should usually contain the position, the evaluation, and the level of that evaluation

4
**Zobrist Hashing Source: http://research. cs. wisc**

Zobrist Hashing was developed specifically for games in which game states differ slightly from move to move. Utilizes properties of XOR (ri uniform random) ri XOR (rj XOR rk) = (ri XOR rj) XOR rk ri XOR rj = rj XOR ri ri XOR ri = 0 If (si = r1 XOR r2 XOR r3 XOR r4… XOR ri) then si is a random sequence {si} is uniformly distributed

5
**Step 1 – Create a bit string for every possible combination of piece and square**

Example – tic-tac-toe (standard game) There are nine squares Each square can be in one of three states Empty Contain an “X” Contain an “O” There are 9*3 = 27 piece-square combinations Create 27 bit strings, one for each piece-square combination.

6
**Step 1 (continued) BitString squarePiece[N_Squares][N_Pieces];**

For(int square=0;square<N_Squares;square++) For(int piece=0;piece<N_Pieces;pieces++) squarePiece[square][piece] = randomBitString()

7
**Step 2 Initialize the board to empty zorbristHash = 0;**

For every square on the board zorbristHash = zorbristHash XOR squarePiece[square][EMPTY_SQUARE];

8
**Step 3 Each time a player makes a move**

Remove the old state for that square zorbristHash = zorbristHash XOR squarePiece[square][currentOccupant]; Add the new state for that square zorbristHash = zorbristHash XOR squarePiece[square][newOccupant]; Example – x moves in the center zorbristHash =zorbristHash XOR squarePiece[4][Empty]; zorbristHash = zorbristHash XOR squarePiece[4][X];

9
4x4x4 Tic-Tac-Toe 64 Squares 3 states/Square 3*64 unique bit strings

10
**Symmetry in simple tic-tac-toe**

4 rotations 2 reflection

11
**4x4x4 tic-tac-toe Number of positions 64 squares**

Each square can be empty, have a white stone, or a black stone 364 is approximately 1030! Lots of symmetry – but only the 4 rotations are obvious.

12
**Exploiting Equivalence**

Convert all positions to a “normalized” form For example: When a position is encountered Find the equivalent position with the smallest hash value All equivalent positions use the same representation

13
Killer Move Heuristic Moves that are strong in one position tend to be strong in other positions too. Remember the moves that are strong at each depth Try these moves first, as they are likely to cause alpha-beta pruning

14
**Null-move Heuristic Used in alpha-beta search**

Player to move “forfeits” a move and continues search to a shallow depth to see if the position is “so good” that alpha-beta will still cut it off. Extra time is spent doing the shallow search if it does not provide a cut-off. When it does provide a cut-off, the branch can be abandoned without deeper search.

15
**Aspiration Window Search**

Alpha-beta search with a guess at the range of the value of the position Make the range as narrow as you can with a high probability that the true value is inside that range. Typically, center the range on the expected value If the returned value is within the range The value is the same as what you would have achieved with normal alpha-beta, but there was probably better pruning If the value is at or above beta The position is better than expected If the value is at or below alpha We were too optimistic – another search is needed.

Similar presentations

OK

1 Adversary Search Ref: Chapter 5. 2 Games & A.I. Easy to measure success Easy to represent states Small number of operators Comparison against humans.

1 Adversary Search Ref: Chapter 5. 2 Games & A.I. Easy to measure success Easy to represent states Small number of operators Comparison against humans.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on aircraft landing gear system Ppt on 60 years of indian parliament fight Ppt on different cultures of the world Ppt on sources of energy for class 8 Ppt on world bank and imf Ppt on kinetic energy and potential energy Download ppt on life processes for class 10 cbse Ppt on our nation india Ppt on eia of cement industry Ppt on classical economics quotes