Artificial Intelligence in Game Design

Slides:



Advertisements
Similar presentations
Adversarial Search Chapter 6 Sections 1 – 4. Outline Optimal decisions α-β pruning Imperfect, real-time decisions.
Advertisements

Adversarial Search Chapter 6 Section 1 – 4. Types of Games.
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,
Adversarial Search We have experience in search where we assume that we are the only intelligent being and we have explicit control over the “world”. Lets.
Adversarial Search Reference: “Artificial Intelligence: A Modern Approach, 3 rd ed” (Russell and Norvig)
Games & Adversarial Search Chapter 5. Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent’s reply. Time.
Games & Adversarial Search
Adversarial Search Chapter 6 Section 1 – 4. Warm Up Let’s play some games!
CS 484 – Artificial Intelligence
CSC 423 ARTIFICIAL INTELLIGENCE
Adversarial Search Chapter 5.
Application of Artificial intelligence to Chess Playing Capstone Design Project 2004 Jason Cook Bitboards  Bitboards are 64 bit unsigned integers, with.
Adversarial Search Chapter 6.
Artificial Intelligence in Game Design Heuristics and Other Ideas in Board Games.
Adversarial Search 對抗搜尋. Outline  Optimal decisions  α-β pruning  Imperfect, real-time decisions.
An Introduction to Artificial Intelligence Lecture VI: Adversarial Search (Games) Ramin Halavati In which we examine problems.
1 Adversarial Search Chapter 6 Section 1 – 4 The Master vs Machine: A Video.
Games CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Artificial Intelligence in Game Design
Artificial Intelligence in Game Design Intelligent Decision Making and Decision Trees.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 580 Artificial Intelligence Ch.6: Adversarial Search Fall 2008 Marco Valtorta.
Game Tree Search based on Russ Greiner and Jean-Claude Latombe’s notes.
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,
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.
Adversarial Search Chapter 6 Section 1 – 4. Outline Optimal decisions α-β pruning Imperfect, real-time decisions.
Game Playing. Towards Intelligence? Many researchers attacked “intelligent behavior” by looking to strategy games involving deep thought. Many researchers.
Games. Adversaries Consider the process of reasoning when an adversary is trying to defeat our efforts In game playing situations one searches down the.
Artificial Intelligence in Game Design N-Grams and Decision Tree Learning.
Artificial Intelligence in Game Design
Artificial Intelligence in Game Design Complex Steering Behaviors and Combining Behaviors.
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.
Artificial Intelligence in Game Design Lecture 17: Goal Oriented Action Planning.
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)
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.
Adversarial Search Chapter 5 Sections 1 – 4. AI & Expert Systems© Dr. Khalid Kaabneh, AAU Outline Optimal decisions α-β pruning Imperfect, real-time decisions.
ADVERSARIAL SEARCH Chapter 6 Section 1 – 4. OUTLINE Optimal decisions α-β pruning Imperfect, real-time decisions.
Goal-Oriented Game AI Purpose and Utilizations Research Organized by: Evan Schipellite.
Control of Dynamic Discrete-Event Systems Lenko Grigorov Master’s Thesis, QU supervisor: Dr. Karen Rudie.
Iterative Deepening A*
Artificial Intelligence in Game Design
Artificial Intelligence in Game Design
Adversarial Search Chapter 5.
Games & Adversarial Search
Games & Adversarial Search
Adversarial Search.
Artificial Intelligence
Alpha-Beta Search.
Games & Adversarial Search
Games & Adversarial Search
Artificial Intelligence
Alpha-Beta Search.
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
Adversarial Search Chapter 6 Section 1 – 4.
Presentation transcript:

Artificial Intelligence in Game Design Goal-Oriented Action Planning

Goals Complex characters have goals What if goals conflict? Actions appear motivated instead of reflexive Player must be aware of character motivations Example: Napoleon “boss” NPC Capture other cities Protect own cities Increase gold level What if goals conflict? Get gold Avoid player ???

Goals and the Sims Overall goals for player to meet Positive and negative goals Transient goals based on physical needs Hunger Energy Fun Etc. Characters automatically choose actions to meet needs

Goals and Actions Goals have actions than fulfill need Key questions: Which actions should NPC take to fulfill which goals? Hunger Eat snack Cook dinner Energy Nap in chair Sleep in bed Fun Go to concert Paint Read

Insistence of Needs Needs may have “degree of urgency” (insistence) How critical is need? How important is this need relative to others? How much of an action is needed to fulfill need? Represented as number Higher = greater need Zero = no need Need Insistence Hunger 5 Energy Fun 3

Actions and Goals Actions can permanently fulfill goals Replaced with another related goal (Sims) Ends game (Napoleon captures all cities in world) Actions can temporarily lessen needs Action: Need – n (lessens that need by n) Hunger Eat snack: Hunger – 1 Cook dinner: Hunger – 5 Energy Nap in chair: Energy – 1 Sleep in bed: Energy – 5 Fun Go to concert: Fun – 4 Paint: Fun – 2 Read: Fun – 1

Choosing Actions Simple approach: Choose goal with highest insistence Choose action that gives largest decrease Need Insistence Hunger 6 Energy Fun 3 Greatest need Best action Eat Eat snack: Hunger – 1 Cook dinner: Hunger – 5 Energy Nap in chair: Energy – 1 Sleep in bed: Energy – 5 Fun Go to concert: Fun – 4 Paint: Fun – 2

Side Effects Actions can effect multiple goals Side effect Drink Coffee Hunger – 1 Energy – 1 Eat at Restaurant Hunger – 4 Fun – 3 Cook Gourmet Meal Hunger – 5 Fun – 1 Energy + 1 Side effect Fulfilling one goal increases other needs

Overall Utility Utility-based decision making Determine effect of each action on total needs Choose action that has best overall effect One criteria: sum of all needs Need Current level After Cook Gourmet Meal After Drink Coffee After Eat at Restaurant After Sleep in Bed Hunger 3 2 Energy 1 Fun 4 Total effect 6 7 Best action

Overall Utility Problem: This can ignore very severe needs Behavior does not appear rational! Need Current level After Eat at Restaurant After Sleep in Bed Hunger 3 Energy 10 5 Fun Total effect 11 Will be chosen, even though Sim is very tired!

Overall Squared Utility Common solution: Total discontentment = sum of square of needs Need Current level After Eat at Restaurant After Sleep in Bed Hunger 3 02 32 Energy 10 102 52 Fun Total effect 100 43

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 85 81 107 169 Best action if single action allowed Effect on Fun Effect on Energy Paint -2 +1 Go to Concert -9 +3 Nap in Chair Sleep in Bed +5 -10 Need Current level After Paint After Go to Concert After Nap in Chair After Sleep in Bed Fun 8 62 02 92 132 Energy 6 72 42 Total effect 100 85 81 107 169 Best action if single action allowed Will be very tired afterward!

Planning Example Better approach for two large needs: Example: 107 49 Take fast action to relieve one Then take another action to relieve other Example: Take nap before concert Need Current level After Nap in Chair Then After Go to Concert Fun 8 92 02 Energy 6 42 72 Total effect 100 107 49 Better than taking single action

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

Planning and Search Trees an possible paths to test Given a possible actions Given n possible levels Expanding search tree is costly 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 an leafs in tree, so choose n so this can be computed in reasonable time At each leaf, compute 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 Can possibly save search time (but no guarantee) Character dead No path can be better than best found so far, so no further search Discontentment = 172