othello2

othello2 - A Step Up from SimpleAI Inspiring Ideas Play a...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
A Step Up from SimpleAI
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Inspiring Ideas z Play a few games against SimplePlayer/ConstantTimePlayer z Think about what helps you win z Piece location z Thinking ahead
Background image of page 2
Significance of Piece Location z Corners are key z Corner pieces cannot be recaptured z They are a point from which to launch attacks z Lead to “safe” pieces z Near-corner spaces are risky z Allow for opponent to jump into the corner
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Incorporating Piece Location z Quantify the significance of owning a spot(s) z Evaluate the state of the board using some function F(B) z Pick the move which maximizes the evaluation function where B n is the resultant board after making one of your n possible legal moves move m such that F H B m L = max n @ F H B n LD
Background image of page 4
A Heuristic Approach z Assign a score for each square on the board z Evaluate the board by taking the difference between your piece score and the opponent’s piece score where z Use trial and error to determine a good A z ConstantTimePlayer uses a similar strategy Let A = 8 x 8 F H B L = i = 0 7 j = 0 7 B ij A B = i k j j j j j j 1, you - 1 , opponent 0 , otherwise
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Thinking Ahead z Like in all board games, trying to anticipate the next moves is a necessary strategy z Use recursion to look ahead to a depth n z Inductive step: current depth < n z Pick the best move z Base Case: depth == n z Return board score z While it’s not possible to go all the way to the end of a game (early on), going a few moves ahead and evaluating your positions gives definite improvement Depth 0 Depth 1 Depth 2
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/25/2010 for the course CS 002 taught by Professor Barr,a during the Winter '08 term at Caltech.

Page1 / 20

othello2 - A Step Up from SimpleAI Inspiring Ideas Play a...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online