1 / 8

Chapter 5

Chapter 5. Game Playing. Games as search. Board games (e.g., Chess, Checkers, Go) Two player games High branching factors Opponent player Contingency problem Opponent is assumed to do their best (our worst) Game environment Accessible complete access to the environment state

Leo
Download Presentation

Chapter 5

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 5 Game Playing

  2. Games as search • Board games (e.g., Chess, Checkers, Go) • Two player games • High branching factors • Opponent player • Contingency problem • Opponent is assumed to do their best (our worst) • Game environment • Accessible • complete access to the environment state • Deterministic • Next state determined by move and current state • Episodic: no; Static: yes (for us); Discrete: yes

  3. Game search problem • Initial state • Configuration of board at start, and which player starts • Operators • Legal moves that a player can make • Goal or “terminal” test • goal states called terminal states • Utility function • quality value for terminal states from rules of game • not an estimate if game play reaches this state • Mini-max algorithm can be used to propagate values up search tree for estimates of utility of non-terminal states

  4. Game trees • Root node • player 1 or “max” • trying to maximize score • Immediate children of root • player 2, or “min” • trying to minimize score • Next layer, max • Next layer, min, etc. • A layer or possible move by a player is a “ply”

  5. Problems • Complexity too high for practical game playing • Could use • Depth limited search • Iterative deepening • Means that we cannot generally use minimax propagation of utility values • Use heuristic evaluation instead • Quiescent states • States that are unlikely to exhibit large changes • Next state can be a checkmate, not quiescent • Horizon problem • Failing to take action because of depth limit on search

  6. Evaluation functions • Evaluation function: h(n) for games • Heuristic estimate of the expected utility of a given game state • Material advantage function in chess • Integer value for type of board piece • Quality of game state given by sum of material advantage values of all pieces • Example of a weighted linear sum EVAL(s) = w1p1 + w2p2 + w3p3 + … w’s are the weights; p’s are the counts of a piece type • E.g., p1 = 3 pawns w1 for pawn is 1; p2 = 2 knight or rook, w2 for knight or rook is 3

  7. Pruning • Eliminating branches from tree in search • Alpha-beta pruning • pruning with mini-max • don’t follow branches that cannot influence decision • still accurate within evaluation function • Principle: “If you have an idea that is surely bad, do not take time to see how truly awful it is.” (P. H. Winston)

  8. 8 1 1 7 2 3 5 3 2 9 3 9 7 1 9 6 2 2 16 6 2 5 4 6 1 4 2 max min max Example from P. H. Winston

More Related