8.3. A GENT AND D ECISION M AKING AI Agent driven AI and associated decision making techniques.

Slides:



Advertisements
Similar presentations
Artificial Intelligence: Knowledge Representation
Advertisements

COMP3740 CR32: Knowledge Management and Adaptive Systems
Finite State Machines. Finite State Machines (FSMs) An abstract machine that can exist in one of several different and predefined states Defines a set.
Presentation on Artificial Intelligence
7.2. AI E NGINE AND S TEERING B EHAVIOUR I Design of an AI Engine and introduction to steering in game AI.
7.1. O SCARS & A RTIFICIAL I NTELLIGENCE Interim awards and introduction to game AI.
Motor Programme Theory
Artificial Intelligence for Games Patrick Olivier & John Shearer
Artificial Intelligence in Game Design Representing NPCs as Finite State Machines.
1 Artificial Intelligence in Games Class 6 Steve Rabin
Multiagent Probabilistic Smart Terrain Dr. John R. Sullins Youngstown State University.
Artificial Intelligence in Game Design Intelligent Decision Making and Decision Trees.
Artificial Intelligence in Game Design Introduction to Learning.
Artificial Intelligence in Game Design Hierarchical Finite State Machines.
Planning under Uncertainty
Deteministic method (FSM) Dan Witzner Hansen. 2 Last week The objective of the course is to introduce the students to a wide variety of artificial intelligence.
A Summary of the Article “Intelligence Without Representation” by Rodney A. Brooks (1987) Presented by Dain Finn.
RED DEAD REVOLVER Artificial Intelligence Critique By Mitchell C. Dodes CIS 588.
Games with Chance Other Search Algorithms CPSC 315 – Programming Studio Spring 2008 Project 2, Lecture 3 Adapted from slides of Yoonsuck Choe.
And Just Games etc.. EVOLUTION OF COMPUTER GAMES PongOdyssey Beginning of the use of microprocessors ATARI VCS system bit.
Artificial Intelligence in Game Design Representing NPCs as Finite State Machines.
Tactical AI in Real Time Supervisor: Aleks Jakulin Crew: Damir Arh, Matija Jekovec, Mitja Luštrek Gregor Leban, Martin Žnidaršič, Uroš Čibej Translation:
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.
Survey of AI for games. AI vs. AI for games Traditional AI: – Made to handle unseen inputs, large state space – Too many options possible to compute an.
Artificial Intelligence in Game Design Behavior Trees.
Jorge Munoz, German Gutierrez, Araceli Sanchis Presented by: Itay Bittan.
CS 484 – Artificial Intelligence1 Announcements Lab 4 due today, November 8 Homework 8 due Tuesday, November 13 ½ to 1 page description of final project.
Introduction to AI Engine & Common Used AI Techniques Created by: Abdelrahman Al-Ogail Under Supervision of: Dr. Ibrahim Fathy.
Artificial Intelligence Methods Neural Networks Lecture 4 Rakesh K. Bissoondeeal Rakesh K. Bissoondeeal.
Artificial Intelligence Techniques Artificial Stupidity?
Robotica Lecture 3. 2 Robot Control Robot control is the mean by which the sensing and action of a robot are coordinated The infinitely many possible.
Scheduling policies for real- time embedded systems.
Motion Planning in Games Mark Overmars Utrecht University.
Probabilistic Smart Terrain Dr. John R. Sullins Youngstown State University.
EEL 5937 Agent models. EEL 5937 Multi Agent Systems Lecture 4, Jan 16, 2003 Lotzi Bölöni.
Artificial Intelligence in Game Design Complex Steering Behaviors and Combining Behaviors.
2.1. T HE G AME L OOP Central game update and render processes.
Artificial Intelligence in Game Design
Artificial Intelligence in Game Design Goal-Oriented Behavior.
Artificial Intelligence for Games Finite State Machines
Computational theory techniques in interactive video games.
Artificial intelligence IN NPCs. Early Role Playing games Npcs in early role playing games were very limited in terms of being “Intelligent”. For instance,
Artificial Intelligence Lecture No. 6 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Dr Nick Mitchell (Room CM 224)
Finite State Machines (FSM) OR Finite State Automation (FSA) - are models of the behaviors of a system or a complex object, with a limited number of defined.
1 Fahiem Bacchus, University of Toronto CSC384: Intro to Artificial Intelligence Search I ● Required Readings: Chapter 3. We won’t cover the material in.
Artificial Intelligence in Game Design Lecture 8: Complex Steering Behaviors and Combining Behaviors.
Probabilistic Smart Terrain Dr. John R. Sullins Youngstown State University.
1 CO Games Development 1 Week 3 Game Agents 2 Gareth Bellaby.
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
COIT23003 Games Development 8. Elaboration: Behaviour.
Finite State Machines Logical and Artificial Intelligence in Games Lecture 3a.
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.
Maestro AI Vision and Design Overview Definitions Maestro: A naïve Sensorimotor Engine prototype. Sensorimotor Engine: Combining sensory and motor functions.
The Game Development Process: Artificial Intelligence.
Artificial Intelligence
Goal-Oriented Game AI Purpose and Utilizations Research Organized by: Evan Schipellite.
Decision Making: Decision Tree & State Machines Session 07
Advantages of FSM Their simplicity make it easy for inexperienced developers to implement with little to no extra knowledge (low entry level)
Artificial Intelligence in Game Design
CO Games Development 2 Week 19 Extensions to Finite State Machines
Artificial Intelligence
CIS 488/588 Bruce R. Maxim UM-Dearborn
Artificial Intelligence
The Alpha-Beta Procedure
Introduction to Artificial Intelligence Lecture 9: Two-Player Games I
Unit II Game Playing.
Presentation transcript:

8.3. A GENT AND D ECISION M AKING AI Agent driven AI and associated decision making techniques

In lecture exploration of answers to frequently asked student questions

Using an agent driven approach to control game character AI

“An autonomous agent is a system situated within and a part of an environment that senses that environment and acts on it, over time, in pursuit of its own agenda and so as to effect what it senses in the future.” Agents may act as an Opponent Ally Neutral character Loops through the following cycle: Sense ► Think ► Act Optional learning or remembering step

Within a game, agents can have access to perfect information about the game world (e.g. complete terrain layout, location and state of the player, etc.). Often a sensing model is used to avoid agent ‘cheating’ and ensure agents cannot ‘see’ through walls, know about unexplored areas, etc. Example sensing model: For each game object: Is it within the viewing distance of the agent? Is it within the viewing angle of the agent? Is it unobscured by the environment?

Do agents respond to sound? If so, how is sound propagation modelled? An event based model is typically used: When sound is emitted, it alerts interested agents Use distance and zones to determine how far sound can travel Travel distance may also depend upon type of incident surface and movement speed of the player, etc.

Agents should not normally see, hear and communicate instantaneously (or rather immediately commence actions following the sensing stage) Normally sufficient to introduce artificial reaction times, e.g.: Vision: ¼ to ½ second Hearing: ¼ to ½ second Communication: > 2 seconds

Approaches towards agent AI ‘decision making’ (not mutually exclusive) include: Use pre-coded expert knowledge Algorithmically search for a solution Many different techniques exist (we will explore some later) Aside: Encoding expert knowledge is appealing as it is relatively easy to obtain and use, but may not be scalable or adaptable. Whilst often scalable and adaptable, algorithmic approaches may not match a human expert in the quality of decision making or be computationally expensive.

‘Dumbing’ down agents Sometimes it may be necessary to ‘dumb down’ agents, for example: Make shooting less accurate Introduce longer reaction times Change locations to make self more vulnerable, etc. Letting agents cheat This is sometimes necessary for: Highest difficultly levels CPU computation reasons Development time reasons

Sensing and thinking steps are invisible to player, i.e. acting is how player witnesses intelligence. Example of actions include: Move location Pick up object Play animation Play sound effect Fire weapon Agents might also use event- driven communication when within the vicinity of each other to: Alter other agents to some situation (i.e. agent hurt) Share agent knowledge (i.e. player last seen at location x)

Introduction to decision making techniques within game AI

The input to a decision making process is the knowledge possesses by a game object and the output is a requested action. The input knowledge can consist of internal knowledge (i.e. internal state) and external knowledge (i.e. game world). Likewise, actions can be directed towards changing internal state or the external (world) state. Aside: Most games need only use simple decision making techniques such as decision trees and state machines. Rule-based approaches may be needed for more complex needs. Internal knowledge External knowledge Decision Making Process Requested action(s) Internal change (s) External change (s)

Simple decision making using decision trees

Decision trees offer a simple, but fast form of decision making. A decision tree consists of a starting decision point, which is connected to more refined decision points. Each leaf contains an action that is executed once reached. The tree can be grown to encapsulate complex behaviour but then often become hard to manage.

The use of finite state machines to encapsulate a decision process

A finite state machine occupies one of a finite number of states at any point in time. Actions may be undertaken based on the current state. Inputs to the system can cause a transition from one state to another. T1T1 T2T2 T3T3 T4T4 A S1 A S2 A S3 In general: Each FSM has a number of possible states {S1... S N } Transition functions {T1... T M } define the conditions under which a state transition will occur. Every time a state transition occurs and a new state is entered, one or more state actions may be fired {A S1... A SN }

A finite state machine works by decomposing an object’s behaviour into defined chunks (states). So long as a character remains in a state it will use the same behaviour. State machines are very widely used, including: Controlling ghosts in Pac-man Controlling bots in Quake Sports simulations such as FIFA 2002 NPCs in RTSs such as Warcraft

Each ghost can be in a wander, chase or evade state (each ghost can have a different chase/wander behaviour). Once a powerpill is eaten, all ghosts transition to the evade state, which is exited once the timer expires. Pacman in range Pacman out of range Powerpill eaten Powerpill expired Aside: The wander state could be entirely removed in this FSM, i.e. Chase and Evade form the minimum behavioural set.

State machines along with scripting represent the most common forms of decision making in games, as: They are relatively quick and simple to code and debug They have little computational overhead (depending on the complexity of transition tests). They are flexible and can often be easily extended or modified. State based behaviour is good for modelling many game-world objects.

Simple FSMs cannot easily model all forms of behaviour. One example is ‘alarm behaviour’, an action that can be triggered from any state. Consider a robot whose ‘alarm’ behaviour is to recharge when power levels become low. Using a hierarchical FSM, the states can transition between ‘cleaning up’ and ‘getting power’ (at the top level). When in the ‘cleaning up’ state a lower-level FSMs controls behaviour.

Using goals to drive behaviour

GOB is used widely in games such as The Sims. Characters have a range of ‘emotional’ or ‘physical’ goals (or motives). Depending on the actions executed by the character (possibly player controlled) the goals (i.e. needs, desires, fears, etc.) will either increase or decrease. GOB algorithms try to fulfil the character’s goals by selecting between available actions that influence the goal parameters.

Characters can have a number of currently active goals. Goals might include: eat, seek health, defeat opponent. Each goal has an associated numeric insistence value representing the current importance of that goal. Some goals may be fully achievable (e.g. seek health) others may be only reducible by always remain (e.g. satiate hunger). A set of (possibly situational) actions is presented to the character. The character will select the action that best satisfies their current goal insistence values.

Consider the shown goals and actions. Which action should be selected? The notion of overall discontentment offers a useful means of selecting the best action. A good discontentment metric is to sum the squares of insistence values and select the action that results in lowest discontentment. More advanced approaches can consider the time to start/complete each activity, or more complex insistence contributions. Goals (Insistence low = 0, high = 5): Eat (4), Sleep(1), Bathroom (3) Actions: Eat-Food (Eat − 3, Bathroom +1) Eat-Snack (Eat − 2) Sleep-Bed (Sleep − 4) Sleep-Sofa (Sleep − 2) Drink-Cola (Eat − 1; Bathroom + 3) Visit-Bathroom (Bathroom − 4) Discontentment : Eat-Food: (4-3) (3+1) 2 = 18 Eat-Snack: (4-2) = 14 Sleep Bed: (1-1) = 25 Sleep Sofa: (1-1) = 25 Drink-Cola: (4-1) (3+2) 2 = 35 Visit-Bathroom: (3-3) 2 = 17

To do: If applicable to your game, explore finite-state machines, agents and goal driven behaviour. Word towards your alpha hand-in goals. Today we explored: The notion of a game AI agent Decision making processes including finite state machines and goal driven behaviour