Artificial Intelligence in Game Design Intelligent Decision Making and Decision Trees.

Slides:



Advertisements
Similar presentations
Skills and Techniques Lesson One.
Advertisements

7.1. O SCARS & A RTIFICIAL I NTELLIGENCE Interim awards and introduction to game AI.
1 videos for before swarm.flv (art. intelligence swarmites 1:20) endorphin2.5.flv (2:38) antfarmsimulator.flv (3:30) for very early – swarmflocking.mp4.
Us vs. It. Tanks vs. Robot ● Cooperative “Boss Fight” ● Tank players must destroy the Robot before it reaches the city limits. ● Robot is controlled by.
Pathfinding Basic Methods.
Artificial Intelligence in Game Design Representing NPCs as Finite State Machines.
CSC 423 ARTIFICIAL INTELLIGENCE
Artificial Intelligence in Game Design Heuristics and Other Ideas in Board Games.
Games and Simulations O-O Programming in Java The Walker School
Multiagent Probabilistic Smart Terrain Dr. John R. Sullins Youngstown State University.
Artificial Intelligence in Game Design Introduction to Learning.
Chapter 12: Expert Systems Design Examples
Us vs. It. Tanks vs. Robot ● Cooperative “Boss Fight” ● Tank players must destroy the Robot before it reaches the city limits. ● Robot is controlled by.
Artificial Intelligence in Game Design Hierarchical Finite State Machines.
RED DEAD REVOLVER Artificial Intelligence Critique By Mitchell C. Dodes CIS 588.
AI Critique: Dustin Kelley. MGS3 AI Intro Tactical espionage missions while avoiding elite Russian soldiers Development team underwent field training.
Artificial Intelligence in Game Design Probabilistic Finite State Machines.
Artificial Intelligence in Game Design Representing NPCs as Finite State Machines.
Intelligent Pac-Man Ghost AI
Tactical AI in Real Time Supervisor: Aleks Jakulin Crew: Damir Arh, Matija Jekovec, Mitja Luštrek Gregor Leban, Martin Žnidaršič, Uroš Čibej Translation:
Decision Trees & Rule-based AI. Decision Tree Advantages ▫Fast and easy to implement, Simple to understand ▫Modular, Re-usable ▫Can be learned  can be.
Artificial Intelligence in Game Design Event and Sense Management.
Raven Robin Burke GAM 376. Soccer standings Burke, 7 Ingebristen, 6 Buer, 6 Bukk, 6 Krishnaswamy, 4 Lobes, 3 Borys, 2 Rojas, 2 Bieneman, 2.
Artificial Intelligence in Game Design Problems and Goals.
TECHNOLOGY. Computer games have always been driven by technology. For many years it was advances in graphics that changed the way computer games were.
Artificial Intelligence in Game Design
Game Playing.
Artificial Intelligence in Game Design Lecture 22: Heuristics and Other Ideas in Board Games.
Artificial Intelligence in Game Design Behavior Trees.
Artificial Intelligence in Game Design
Artificially Intelligent Smart Objects in Modern Computer Games Presentation by: Venetsian T. Jakimov.
Art 315 Lecture 6 Dr. J. Parker. Variables Variables are one of a few key concepts in programming that must be understood. Many engineering/cs students.
Artificial Intelligence in Game Design Lecture 6: Fuzzy Logic and Fuzzy State Machines.
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
Artificial Intelligence in Game Design
Artificial Intelligence in Game Design Cooperative Movement.
Motion Planning in Games Mark Overmars Utrecht University.
Artificial Intelligence in Game Design N-Grams and Decision Tree Learning.
Artificial Intelligence in Game Design Dynamic Path Planning Algorithms.
Artificial Intelligence in Game Design
Jumping, Climbing, and Tactical Reasoning Section 2.5 Tom Schaible CSE 497 – AI & Game Programming.
Artificial Intelligence in Game Design Complex Steering Behaviors and Combining Behaviors.
AI in games Roger Crawfis CSE 786 Game Design. AI vs. AI for games AI for games poses a number of unique design challenges AI for games poses a number.
Artificial Intelligence in Game Design
CIS 588 AI Evaluation for World of Warcraft Jonathan Schmoll February 14, 2005.
Artificial Intelligence in Game Design Goal-Oriented Behavior.
Artificial Intelligence for Games Finite State Machines
AI Evaluation David Nowell CIS 588 2/14/05 Baldur’s Gate.
Artificial Intelligence in Game Design Lecture 17: Goal Oriented Action Planning.
F.E.A.R. Game AI Evaluation by Robert Rak. What is F.E.A.R. ? FEAR is a First Person Shooter game Player takes on the role of an elite strike force team.
Artificial Intelligence in Game Design Influence Maps and Decision Making.
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.
Will Britt and Bryan Silinski
Game AI Matthew Hsieh Meng Tran. Computer Games Many different genres  Action  Role Playing  Adventure  Strategy  Simulation  Sports  Racing Each.
Artificial Intelligence in Game Design Lecture 20: Hill Climbing and N-Grams.
Finite State Machines Logical and Artificial Intelligence in Games Lecture 3a.
Team Member AI in an FPS and Goal Oriented Action Planning.
Decision Making: Decision Tree & State Machines Session 07
Artificial Intelligence in Game Design
Application of Artificial Intelligence and Graphics to Support a Three-Dimensional Game Chris Cummings.
Movement in a full and dynamic environment using a limited influence map Paulo Lafeta Ferreira Artificial Intelligence for Games – CS 580 Professor: Steve.
Enemy and Friendly AIs Richard Gesick.
Artificial Intelligence in Game Design
Games with Chance Other Search Algorithms
CIS 488/588 Bruce R. Maxim UM-Dearborn
Transparency & magic pixel
Us vs. It.
Us vs. It.
Us vs. It.
Presentation transcript:

Artificial Intelligence in Game Design Intelligent Decision Making and Decision Trees

Decision Making Based on internal and external information Defines a current action (“eat food”) Changes world and internal state “I am hungry”“There is food nearby” “I am not hungry”“Food nearby is gone”

“Intelligent Agent” Approach Reflex agent No memory, just “if-then” rules Memory-based agent Also based on current state Goal-based agent Chooses actions that best help meet current goal Utility-based agent Balances multiple weighted goals, choosing actions that give best overall state Sims Goal-based planning input rules action input rules action memory

Reflex Agents Example: “orc” reflex agent if hitPoints < 5 then run away from player if distance to player < 2 units then attack player if player visible then run towards player else move in random direction Internal state External state

Scripted Actions Visible actions usually limited to set of animations created in advance Often sequence of actions (“scripting”) Game AI Self destruct sequence Game Engine Poll again when script finished

Reflex Agents Must consider cost of gathering inputs if hitPoints < 5 then run away from player if distance to player < 2 units then attack player if player visible then run towards player else move in random direction This requires complex computations if player in same room or distance to player < 5 units

Hierarchical Rules Actions often hierarchical if hitPoints < 5 then moveTowards(player) if distance to player < 2 units then attack(player) if player visible then moveTowards(player) else moveTowards(random) These will call complex navigation subroutines to implement the action

Hierarchical Rules Lowest level = actions supported by game engine void moveTowards(object) if not facing object then turn towards object else if facing obstacle at distance < 2 units then turn right or left at random move forward else move forward

Designing Hierarchies Strategy Level –What goal does character attempt to meet? Build, attack, negotiate Tactical Level –How does character meet current goal? Which city to attack Which resources to use Motion Level –What action does character take this turn? Move forward, left, right…

Designing Hierarchies Task based –Major tasks NPC performs Guard Patrol Defend –Steps in tasks Wait Chase … –…–… –Motion Turn Move … High level character design team (works with game designers) Character motion team (works with animation team)

Level of Detail in Graphics Only render graphics at detail necessary for what player can see –Close up = full detail –Far away = little detail Minimize load on graphics engine

Level of Detail in AI Only use full AI when necessary –Fast approximations in other situations –Often when NPCs “off screen” Use full passing AI for cars visible to player Simple rule for cars not visible to player “ Faster car has 75% chance of successful pass ”

Swarm Intelligence Simple NPCs in groups can appear to cooperate Decision example: if no other player shooting, I shoot if in open, run for cover and shout if in cover, reload and wait Orc motion example: … if NPC blocking path to player then run sideways else run towards player … NPCs appear to be covering one another and coordinating attack!

Randomness in Games Randomness adds to playability –Characters less predictable, more “realistic” –Greater replayability –Rare occurrences can surprise player Example: choice of weapon in Fight state 60%5%35%

Randomness in Games Goal: Randomness should not appear random Best solution: Randomness used to “tweak” existing rules if hitPoints < 5 then run away from player else if hitPoints < 10 and random# < 0.5 then run away from player else attack player Unpredictable behavior in borderline situations Logical behavior in extremes

Potential Problems with Randomness Possibly many parameters to tweak –How do we know these are the best probabilities to use? Difficult to thoroughly test –Combinations of probabilities may create a bad case (i.e. easy win) which is possible but very unlikely –That case will be found by some player ConfidentAngryFrightened Attack Left40%60%30% Attack Right40%35%20% Defend20%5%50%

Prioritization Problem: Multiple rules may fire with contradictory actions –Problem if rules added by multiple developers (side effects) if hitPoints < 5 then run away from player if distance to player < 2 units then attack player What if next to player and have low hit points?

Decision Trees Simple tree traversal –Node = question –Branch to follow = answer –Leaf = final action to take Hit points < 5? yes no Obstacle between myself and player? yes hide no run Within one unit of player? yes attack no Path to player clear? yes run towards player no run sideways

Decision Trees Not necessarily binary Can merge branches Hit points HP < 5 light run away Within one unit of player? heavy attack HP ≥ 10 yes hold position no run towards player Weapon type 5 ≤ HP < 10

Designing Decision Trees Identify possible actions (leafs) Identify internal/external knowledge for choosing action Order questions in tree: –Crucial factors (health, etc.) –Ease of gathering knowledge (fastest first) yes Player visible? no attack yes hide patrol HP < 5? no yes Player visible? no attack yes hide patrol HP < 5? no

Randomness in Decision Trees Make decisions at some nodes based on random number Math.random() < 0.5 yes defend no Math.random() < 0.2 yes Swing sword from left no Swing sword from right

Randomness in Decision Trees Problem: Randomness in high level decisions Stands still or patrol for a few frames at a time Better if it decided to do one and keep doing it for a while Math.random() < 0.4 yes Stand still no Patrol

Timeouts in Decision Trees Execute decisions for specific time Problem: must have some way to interrupt actions if world changes Math.random() < 0.4 yes Stand still For 10 min no Patrol For 30 min