artificial intelligence
play

Artificial Intelligence Game Playing Continued Lecture 9 CS 444 - PowerPoint PPT Presentation

Artificial Intelligence Game Playing Continued Lecture 9 CS 444 Spring 2019 Dr. Kevin Molloy Department of Computer Science James Madison University Outline Moving forward with game playing How to play games of chance Example


  1. Artificial Intelligence Game Playing Continued Lecture 9 CS 444 – Spring 2019 Dr. Kevin Molloy Department of Computer Science James Madison University

  2. Outline • Moving forward with game playing • How to play games of chance • Example Problem • Project 2

  3. Review of ! - " Pruning Pruning is an example of metareasoning – computing about what to compute This type of pruning does not impact optimality of the decision (but does mean some of the nodes may not have the correct values). Even with perfect ordering, time complexity = O(b m/2 ) ( m is max depth) Chess is still impossible (35 50 possibilities) Idea: obtain value of a state (move) without reaching the leaf states

  4. Resource Limits Standard approach: Use Cutoff-Test instead of Terminal-Test (e.g., depth limited search) • Use Eval instead of Utility (heuristic evaluation) • Chess Example: Suppose we have 100 seconds, explore 10 4 nodes/seconds 10 6 nodes per move ≈ 35 8/2 ! - " reaches depth 8 ⟹ pretty good chess program

  5. Evaluation Functions For chess, typically linear weighted sum of features: Eval(s) = w 1 f 1 (s) + w 2 f 2 (s) + … + w n f n (s) e.g. w 1 = 9 with f 1 (s) (difference in the # of queens) Behavior is preserved under any monotonic transformation of eval. Only order matters.

  6. Deterministic games in practice Chess: Deep blue defeated Gary Kasparov in a six-game match in 1997. The computer searched 200 million positions per second, and was able to extend some search lines up to 40 ply. Go: branching factor is between 250 and 361 (compared to chess at 35). Pattern knowledge is used instead of search trees. AlphaGo, which employs deep learning , is now competing at the world championship level. (https://deepmind.com/research/alphago/).

  7. Nondeterministic Games:

  8. Nondeterministic Games In nondeterministic games, chance is introduced by dice, card-shuffling, etc. Here is a simplified example with coin-flipping: New type of node in our tree We will call this a chance node.

  9. Minimax ⟹ ExpectiMiniMax for Nondeterministic Games Just like MiniMax, except we must also handle chance nodes: If state is a Max node then return highest ExpectiMiniMax-Value of Successor(state) If state is a Min node then return lowest ExpectiMiniMax-Value of Successor(state) If state is a chance node then return average ExpectiMiniMax-Value of Successor(state)

  10. Nondeterministic Games in Practice Dice rolls increase b : 21 possible distinct rolls with 2 dice. Backgammon ≈ 20 legal moves (can be 6,000 in 1-1- roll) Depth 4 = 20 x (21 x 20) 3 ≈ 1.2 x 10 9 Time complexity: O( b m n m ), where n is the number of distinct roll Does it pay to look ahead? As depth increases, probability of reaching a given node shrinks, thus, its value is diminished. Thus, ! - " pruning is not as effective. TDGammon uses depth-2 search and good EVAL and plays at the World champion level

  11. Careful EVAL: Exact Values DO matter • Notice the difference between these two trees.

  12. Monte Carlo Simulation Monte Carlo simulation can be used to “evaluate” a state From a start date, have the algorithm play against itself, using random dice rolls Imperfect Information: From a start date, have the algorithm play against itself, using random dice rolls. Ideas for poker? Generate random hands for your opponent and count how many times you win.

  13. ExpectiMinMax Problem to Solve Ghost makes the best move 2/3 of the time, but 1/3 of the time makes the worst move. Fill in the blank nodes

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend