Artificial Intelligence in Game Design Lecture 17: Goal Oriented Action Planning.

Slides:



Advertisements
Similar presentations
Heuristic Search techniques
Advertisements

Games & Adversarial Search Chapter 5. Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent’s reply. Time.
Games & Adversarial Search
Artificial Intelligence Adversarial search Fall 2008 professor: Luigi Ceccaroni.
Game Playing (Tic-Tac-Toe), ANDOR graph By Chinmaya, Hanoosh,Rajkumar.
CS 484 – Artificial Intelligence
CSC 423 ARTIFICIAL INTELLIGENCE
Adversarial Search Chapter 5.
Lecture 12 Last time: CSPs, backtracking, forward checking Today: Game Playing.
Adversarial Search Chapter 6.
Artificial Intelligence in Game Design Heuristics and Other Ideas in Board Games.
Games CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
G51IAI Introduction to AI Minmax and Alpha Beta Pruning Garry Kasparov and Deep Blue. © 1997, GM Gabriel Schwartzman's Chess Camera, courtesy IBM.
Artificial Intelligence in Game Design
Artificial Intelligence in Game Design Intelligent Decision Making and Decision Trees.
This time: Outline Game playing The minimax algorithm
1 Using Search in Problem Solving Part II. 2 Basic Concepts Basic concepts: Initial state Goal/Target state Intermediate states Path from the initial.
Game Playing CSC361 AI CSC361: Game Playing.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 580 Artificial Intelligence Ch.6: Adversarial Search Fall 2008 Marco Valtorta.
Games & Adversarial Search Chapter 6 Section 1 – 4.
Alpha-Beta Search. 2 Two-player games The object of a search is to find a path from the starting position to a goal position In a puzzle-type problem,
Game Trees: MiniMax strategy, Tree Evaluation, Pruning, Utility evaluation Adapted from slides of Yoonsuck Choe.
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning CPSC 315 – Programming Studio Spring 2008 Project 2, Lecture 2 Adapted from slides of Yoonsuck.
Lecture 5 Note: Some slides and/or pictures are adapted from Lecture slides / Books of Dr Zafar Alvi. Text Book - Aritificial Intelligence Illuminated.
Game Playing.
Artificial Intelligence in Game Design Smart Terrain.
Backtracking. N-Queens The object is to place queens on a chess board in such a way as no queen can capture another one in a single move –Recall that.
October 3, 2012Introduction to Artificial Intelligence Lecture 9: Two-Player Games 1 Iterative Deepening A* Algorithm A* has memory demands that increase.
BackTracking CS335. N-Queens The object is to place queens on a chess board in such as way as no queen can capture another one in a single move –Recall.
Instructor: Vincent Conitzer
Games. Adversaries Consider the process of reasoning when an adversary is trying to defeat our efforts In game playing situations one searches down the.
For Wednesday Read chapter 7, sections 1-4 Homework: –Chapter 6, exercise 1.
Artificial Intelligence in Game Design N-Grams and Decision Tree Learning.
Artificial Intelligence in Game Design
Monte-Carlo methods for Computation and Optimization Spring 2015 Based on “N-Grams and the Last-Good-Reply Policy Applied in General Game Playing” (Mandy.
Artificial Intelligence in Game Design Complex Steering Behaviors and Combining Behaviors.
Artificial Intelligence in Game Design
Artificial Intelligence in Game Design Goal-Oriented Behavior.
Adversarial Search Chapter Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent reply Time limits.
1 Solving problems by searching Chapter 3. Depth First Search Expand deepest unexpanded node The root is examined first; then the left child of the root;
Basic Problem Solving Search strategy  Problem can be solved by searching for a solution. An attempt is to transform initial state of a problem into some.
Artificial Intelligence in Game Design Lecture 8: Complex Steering Behaviors and Combining Behaviors.
ARTIFICIAL INTELLIGENCE (CS 461D) Princess Nora University Faculty of Computer & Information Systems.
Adversarial Search Chapter 6 Section 1 – 4. Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent reply Time.
Adversarial Search 2 (Game Playing)
Artificial Intelligence in Game Design Lecture 20: Hill Climbing and N-Grams.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 5 Adversarial Search (Thanks Meinolf Sellman!)
Artificial Intelligence in Game Design Board Games and the MinMax Algorithm.
Understanding AI of 2 Player Games. Motivation Not much experience in AI (first AI project) and no specific interests/passion that I wanted to explore.
1 Chapter 6 Game Playing. 2 Chapter 6 Contents l Game Trees l Assumptions l Static evaluation functions l Searching game trees l Minimax l Bounded lookahead.
Goal-Oriented Game AI Purpose and Utilizations Research Organized by: Evan Schipellite.
Instructor: Vincent Conitzer
Iterative Deepening A*
Artificial Intelligence in Game Design
Artificial Intelligence in Game Design
Games & Adversarial Search
Alpha-Beta Search.
Games & Adversarial Search
Alpha-Beta Search.
Instructor: Vincent Conitzer
Introduction to Artificial Intelligence Lecture 9: Two-Player Games I
Alpha-Beta Search.
A General Backtracking Algorithm
Game Playing Fifth Lecture 2019/4/11.
Alpha-Beta Search.
Based on slides by: Rob Powers Ian Gent
Games & Adversarial Search
Alpha-Beta Search.
Games & Adversarial Search
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning
Presentation transcript:

Artificial Intelligence in Game Design Lecture 17: Goal Oriented Action Planning

Planning Creating series of actions to meet some goal Planning actions to meet multiple needs –Chosen so final state has highest utility –Intermediate states after part of sequence should not be unacceptable –Allows fast actions to be chosen in logical circumstances Planning actions with multiple steps before payoff –Purchase ingredients –Cook ingredients in oven –Eat meal –No effect on hunger until after last step

Planning Example ActionEffect on FunEffect on Energy Paint-2+1 Go to Concert-9+3 Nap in Chair+1-2 Sleep in Bed+5-10 NeedCurrent level After PaintAfter Go to Concert After Nap in Chair After Sleep in Bed Fun Energy Total effect Best action if single action allowed Will be very tired afterward!

Planning Example Better approach for two large needs: –Take fast action to relieve one –Then take another action to relieve other Example: –Take nap before concert NeedCurrent levelAfter Nap in ChairThen After Go to Concert Fun Energy Total effect Better than taking single action

Planning and Utility Why choose this order? –Why take nap before concert instead of going to concert first? Goal: Minimize “total discontentment” over time Σ discontentment at time t t NeedTime 0Time 1 (concert) Time 2 (concert) Time 3 (concert) Time 4 (nap) Fun Energy Total Total discontentment: 273 Total discontentment: 240 NeedTime 0Time 1 (nap) Time 2 (concert) Time 3 (concert) Time 4 (concert) Fun Energy Total

Planning and Search Trees Must try all possible combinations of actions –Compute total discontentment for each path –Choose path with lowest total root Sleep in Bed Nap in Chair Go to Concert Paint Go to Conc ert Paint Nap in Chair Paint Sleep in Bed Go to Conc ert Paint Go to Conc ert Nap in Chair Go to Conc ert Sleep in Bed Nap in Chair Paint Nap in Chair Go to Conc ert Nap in Chair Sleep in Bed Paint Sleep in Bed Go to Conc ert Sleep in Bed Nap in Chair Sleep in Bed

Planning and Search Trees Expanding search tree is costly –Given a possible actions –Given n possible levels a n possibilities to test –Will only be able to test small number of action combinations (lookahead limit) –Even two actions enough to seem intelligent Looks like character thinking ahead

Planning and Search Trees Algorithm: depth limited search –Depth-first search to some fixed limit n a n leafs in tree –At each leaf, compute total discontentment –Just keep track of best path found so far Storage cost: n Best sequence of actions found so far Current path being tested

Pruning and Search Trees Can cut off search down obviously bad branches –Branches with intermediate state unacceptably bad –Branches with total discontentment more than best sequence found so far –Can possibly save search time (but no guarantee) Total discontentment = 172 Total discontentment to this point = 180 No path can be better than best found so far, so no further search Discontentment at this state= 150 Unacceptably bad, so no further search

Planning and Preconditions Actions may have preconditions before they can be taken Multiple actions required to meet needs Action PreconditionsPostconditions Action Preconditions which character meets Postconditions Action PreconditionsPostconditions meet need meets

Planning and Preconditions Example: Microwaving food Get food Uncooked food in fridge Have uncooked food Cook food in microwave Have uncooked food Have microwave Have cooked food meets Eat food Have cooked food Hunger - 5 meets

Planning Methods Depth-limited search –Try all combinations of actions up to lookahead limit –Can prune branches with actions whose preconditions not met Expensive –Design world so actions require few steps (2 or 3 at most) Get food Cook food in microwave Prerequisite not met

Planning Methods Scripted action sequences –Actually single action with what appears to be multiple steps –Long animated sequence Very simple to implement (no planning needed!) Weaknesses: –Cannot interrupt sequence without starting over entirely Phone rings while cooking –Cannot start plan until all preconditions met Get food Cook food in microwave Eat food Have uncooked food Have microwave Hungry - 5

Opportunistic Planning What if not all preconditions for plan exist? –Can get uncooked food –No microwave to cook food (yet) –Should still buy the food if hungry! Opportunistic planning: Taking actions which may pay off in future –Meets one of several prerequisites for action –Other prerequisites can then become goals for character Tell player to buy microwave for character Search for microwave… Get food from fridge Cook food in microwave Eat food Have uncooked food Have microwave Hungry - 5