1 / 11

Games with Chance Other Search Algorithms

Explore AI strategies for analyzing games with chance elements using minimax trees and state diagrams. Learn how to maximize/minimize expected values and handle chance nodes in game playing. Discover methods like depth-limited search and heuristic functions for more informed search. Adapted from lecture notes by Robert Lightfoot and Yoonsuck Choe.

jgreco
Download Presentation

Games with Chance Other Search Algorithms

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. Games with ChanceOther Search Algorithms CSCE 315 – Programming Studio Spring 2019 Project 2, Lecture 3 Robert Lightfoot Adapted from slides of YoonsuckChoe, John Keyser

  2. Game Playing with Chance • Minimax trees work well when the game is deterministic, but how about games with an element of chance • Solitaire: Shuffles are random • Monopoly: Next move depends on die rolling outcome • How do we analyze games with chance? • Include Chance nodes in tree • Try to maximize/minimize the expected value • Or, play pessimistic/optimistic approach

  3. Tree with Chance Nodes Max • For each die roll (red lines), evaluate each possible move (blue lines) Chance … Min Chance

  4. Expected Value • For variable x, the Expected Value is: where Pr(x) is the probability of x occurring • Example 1: When you roll a dice, what is average value on the face? • Example 2: How about rolling a pair of dice?

  5. Evaluating Tree Max • Choosing a Maximum (same idea for Minimum): • Evaluate same move from ALL chance nodes • Find Expected Value for that move • Choose largest expected value Chance … Min Chance

  6. More on Chance • Rather than expected value, could use another approach • Maximize worst case value • Avoid catastrophe • Give high weight if a very good position is possible • “Knockout” move • Form hybrid approach, weighting all of these options • Note: time complexity increased to O(bmnm)where n is the number of possible choices (m is depth)

  7. AI in Larger-Scale and Modern Computer Games • The idealized situations described often don’t extend to extremely complex, and more continuous games. • Even just listing possible moves can be difficult • Example: Walking 10 steps to the right or 11, or 1000 • Example: Hide and seek • Larger situation can be broken down into subproblems • Hierarchical approach • Use of state diagrams • Some subproblems are more easily solved • e.g. path planning

  8. General State Diagrams • List of possible states one can reach in the game (nodes) • Can be abstracted, general conditions • Describe ways of moving from one state to another (edges) • Not necessarily a set of move, could be a general approach • Forms a directed (and often cyclic) graph • Our minimax tree is a state diagram, but we hide any cycles • Sometimes want to avoid repeated states

  9. State Diagram State C State I State A State B State D State J State E State H State G State K State F

  10. Exploring the State Diagram • Explore for solutions using BFS, DFS • Depth limited search: • DFS but to limited depth in tree • Iterative Deepening search: • As described before, but with DFS on graph, not just tree • If a specific goal state, can use bidirectional search • Search forward from start and backward from goal – try to meet in the middle. • Think of maze puzzles

  11. More Informed Search • Traversing links, goal states not always equal • Can have a heuristic function: h(x) = how close the state x is to the “goal” state. • Kind of like board evaluation function/utility function in game play • Can use this to: • order other searches • create greedy approaches

More Related