1 The Use of Artificial Intelligence in the Computer Game Industry.

Slides:



Advertisements
Similar presentations
Artificial Intelligence: Knowledge Representation
Advertisements

Artificial Intelligence in Game Design
Wall Building for RTS Games Patrick Schmid. Age of Empires.
Heuristic Search techniques
A New World Or People Keep Telling Me This is Ambitious By Jeremiah Lewis.
7.1. O SCARS & A RTIFICIAL I NTELLIGENCE Interim awards and introduction to game AI.
AI Pathfinding Representing the Search Space
Lecture 8: Three-Level Architectures CS 344R: Robotics Benjamin Kuipers.
Pathfinding Basic Methods.
CSE 380 – Computer Game Programming Pathfinding AI
Verbs and Adverbs: Multidimensional Motion Interpolation Using Radial Basis Functions Presented by Sean Jellish Charles Rose Michael F. Cohen Bobby Bodenheimer.
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.
1 AI for Computer Game Developers Finite state machines Path finding and waypoints A-Star path finding.
Artificial Intelligence in Video Games By: Renaldo Doe Kevin Lam.
RED DEAD REVOLVER Artificial Intelligence Critique By Mitchell C. Dodes CIS 588.
Brent Dingle Marco A. Morales Texas A&M University, Spring 2002
Using a GA to Create Prey Tactics Presented by Tony Morelli on 11/29/04.
Artificial Intelligence in Game Design Probabilistic Finite State Machines.
Copyright © 1998 Wanda Kunkle Computer Organization 1 Chapter 2.1 Introduction.
Chapter 5.4 Artificial Intelligence: Pathfinding.
Tactical AI in Real Time Supervisor: Aleks Jakulin Crew: Damir Arh, Matija Jekovec, Mitja Luštrek Gregor Leban, Martin Žnidaršič, Uroš Čibej Translation:
Tactical and Strategic Reasoning  Covers…  Deducing tactical situations from sketchy (limited) information  Using tactical situations to make decisions.
Chapter 5.4 Artificial Intelligence: Pathfinding.
Collision and Animation Systems in Games Jani Kajala Lead Programmer / Chief Technology Officer, Pixelgene Ltd (0)
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.
Optimization-Based Full Body Control for the DARPA Robotics Challenge Siyuan Feng Mar
Developing the Game Functionality Lesson 6. Exam Objective Matrix Skills/ConceptsMTA Exam Objectives Programming the Components Understand Components.
Chapter 7. BEAT: the Behavior Expression Animation Toolkit
Artificial Intelligence in Game Design Behavior Trees.
Artificial Intelligence in Game Design
Intro to 3D Animation Fall Overview  Attendance required – people who do not come to class tend to create not-very-good projects!  One assignment:
Starcraft Opponent Modeling CSE 391: Intro to AI Luciano Cheng.
AI in FPS. Contents FPS AI Architecture –Animation –Movement –Combat –Behavior Positioning strategy –Waypoint –Pinch Point.
Theory of walking Locomotion on ground can be realized with three different basic mechanisms: slide lever wheel or track First two are walking mechanisms.
Review IMGD Engine Architecture Types Broadly, what are the two architecture types discussed for game engines? What are the differences?
Math / Physics 101 GAM 376 Robin Burke Fall 2006.
AN OVERVIEW OF GAME DEVELOPMENT
Artificial Intelligence in Game Design
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.
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.
Introduction to Loops For Loops. Motivation for Using Loops So far, everything we’ve done in MATLAB, you could probably do by hand: Mathematical operations.
Games Development 2 Entity Update & Rendering CO3301 Week 2, Part 1.
AI Evaluation David Nowell CIS 588 2/14/05 Baldur’s Gate.
Artificial intelligence IN NPCs. Early Role Playing games Npcs in early role playing games were very limited in terms of being “Intelligent”. For instance,
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.
Game AI Matthew Hsieh Meng Tran. Computer Games Many different genres  Action  Role Playing  Adventure  Strategy  Simulation  Sports  Racing Each.
CSCE 552 Spring 2010 AI (III) By Jijun Tang. A* Pathfinding Directed search algorithm used for finding an optimal path through the game world Used knowledge.
Artificial Intelligence in Game Design Lecture 20: Hill Climbing and N-Grams.
Mapping of Traffic Conditions at Downtown Thessaloniki with the Help of GPS Technology P. D. Savvaidis and K. Lakakis Aristotle University of Thessaloniki,
The Use of Artificial Intelligence in the Computer Game Industry.
The Game Development Process: Artificial Intelligence.
Garmin 60CSx How To Use The Available Features Photos by IN-TF1 Technical Search, Stephen Bauer Written by IN-TF1 Technical Search, Jean Seibert.
Review IMGD Engine Architecture Types Broadly, what are the two architecture types discussed for game engines? What are the differences?
Unity 3D Rolfe Bozier 24-Apr-2017
Chapter 5.4 Artificial Intelligence: Pathfinding
Decision Making: Decision Tree & State Machines Session 07
CIS 488/588 Bruce R. Maxim UM-Dearborn
UMBC Graphics for Games
Fundaments of Game Design
Computer Graphics Lecture 15.
Emir Zeylan Stylianos Filippou
Artificial Intelligence in Games Week 7
Presentation transcript:

1 The Use of Artificial Intelligence in the Computer Game Industry

2 Introduction  The term A.I. is used broadly in the computer game industry  Games come in many genres and the techniques employed by the different genres vary widely  Will be discussing A.I. for non-player characters (NPCs) in a first-person or third-person shooter Fully rendered 3D environment Player controls a single character

3 Introduction  Won’t be discussing use of AI for: Board games (Chess, Go) Strategy games (Civilization / Age of Empires) Camera control in 3D games Simulation games (The Sims, Sim City) Racing games

4 Components of an AI System Decision Making Tactical Analysis

5 Components of an AI System Components of an AI System Decision Making Tactical Analysis

6 Components of an AI System  Animation Responsible for controlling NPC body  Movement Responsible for controlling NPC navigation  Behavior Responsible for controlling NPC decision making

7 Components of an AI System  Animation Responsible for controlling NPC body  Movement Responsible for controlling NPC movement  Behavior Responsible for controlling NPC decision making

8 AI Components: Animation  Animation Selection  Parameterize Animation  Selected Joint Control  Inverse Kinematics

9 AI Components: Animation NPC models built by artists –Use tools such as “3D Studio Max” or “Maya” Models are are constructed from bones Bones are connected by articulated joints The skeletal system is covered by a mesh of textured polygons

10 AI Components: Animation  Example:

11 AI Components: Animation Animation sequences are generated by defining how joints should articulate through time Walking sequence:

12 AI Components: Animation Animation sequences for a model are either: Hand generated by a computer animator Recorded from real human (or animal) movements and applied to a skeletal system (“motion capture”)

13 AI Components: Animation  Motion Capture:

14 Tom Molet (EGCAS ’96)

15 AI Components: Animation Animation sequences tend to be: Motion primitives: Motion primitives: –Run, Walk, Jump, Side-step, Climb Transitions –Start_Walk, Run_To_Jump, Jump_Land

16 AI Components: Animation Some animation sequences only take control of part of the body: wave_hellohand_signal_stopswing_ice_axe

17 AI Components: Animation  First step in A.I. Is to select which animation sequence or sequences should be applied to a model  Many influences: Desired behavior chosen by decision system What animation is currently playing The current velocity and direction of the NPC The terrain the NPC is standing on

18 AI Components: Animation  Second step is to parameterize animations Speed up or slow down animation –Slow walk, fast walk –Accelerate / decelerate stop and start of run –Slow run as approach sharp turn Blend between animations –walk-to-run –70% normal walk + 30% limp Layer animations –Mix hand_wave on top of walk animation

19 AI Components: Animation  Next might add selected Joint Control Take control of particular joints –Either:  Ignore joint motion in pre-generated animation  Blend with pre-generated joint motion Used for: –Head Turning  Looking at a particular object or location –Arm aiming  Point gun at a location

20 AI Components: Animation  And finally, add inverse kinematics Algorithmically determine the joint configuration required for an end-effecter (hand or foot) to reach a particular location Used for: –Keep the feet on the ground on uneven terrain or when walking up stairs –Reaching hand out to open a door, pick up and object

21 AI Components: Animation  Animation Selection  Parameterization of Animations  Selected Joint Control  Inverse Kinematics

22 Components of an AI System  Animation Responsible for controlling NPC body  Movement Responsible for controlling NPC movement  Behavior Responsible for controlling NPC decision making

23 Movement: Pathfinding  The primary component of a movement system is pathfinding.  Find a route for an NPC to travel from one location in the world to another.  Route depends on: NPC’s size –Will NPC’s body fit in a given location? NPC’s navigation ability –Walk, Jump, Climb, Swim

24 Movement: Pathfinding Tools Waypoint  Position in a map that is used for navigation  Usually placed in world manually by a level designer Link  Connection between two waypoints  Often annotated with the required navigation type (Jump, Swim, Climb)  For a given NPC, two waypoints are linked when: The NPC has room enough to move from one node to another without colliding with the world geometry The NPC has the required navigation ability Node Graph  Data structure holding all waypoints and links  Either generated manually by a level designer or automatically by the computer and annotated by a level designer

25 Movement: Node Graph

26 Movement: Route Generation  A*  A* is the preferred pathfinding algorithm for quickly finding a short path between two waypoints  Often modified for other route types: Fastest Route  Shortest route is not often the fastest as it may take an NPC longer to climb a ladder or swim between two waypoints than to run or walk Safest Route  For tactical reasons an NPC may choose to prefer a longer less exposed route than a shorter or faster route with no cover

27 Components of an AI System  Animation Responsible for controlling NPC body  Movement Responsible for controlling NPC movement  Behavior Responsible for controlling NPC decision making

28 AI Components: Behavior  Responsible for deciding what behavior an NPC should express  Each NPC has a think cycle: Sense Environment Select Behavior Express behavior

29 AI Components: Behavior Sense Environment –What to I see? –What can I hear / smell? –Includes internal states:  How tired am I?  What’s my health? Select Behavior –Finite State Machine –Decision Tree Express Behavior –Select appropriate animation sequences

30 Decision Making Components of an AI System Decision Making Tactical Analysis

31 Decision Making:  Module that does behavior selection  Example of one such system  Overview Many of the details and features have been omitted

32 Decision Making Decision Making:  System consists of three types of objects: Tasks Schedules Conditions

33 Decision Making Decision Making: TASKS: Simple things for a NPC to do, such as: Turn to face a location or an object (TASK_FACE_FRIEND) Find a path to a location (TASK_FIND_PATH_TO_ENEMY) Move along a path (TASK_WALK_PATH) Stop moving (TASK_STOP_MOVING)

34 Decision Making Decision Making:  Tasks can take arguments: Wait for a while (TASK_WAIT) (TASK_WAIT) Play a particular animation (TASK_PLAY_ANIMATION) (TASK_PLAY_ANIMATION) Say Something (TASK_SAY_PHRASE) (TASK_SAY_PHRASE)

35 Decision Making Decision Making: SCHEDULES SCHEDULES: Named lists of tasks Selected by logic system Performed by NPC until:  All tasks have finished  One task has failed  Schedule has been Interrupted

36 Decision Making Decision Making: Examples: SCHEDULE_GET_WEAPON – TASK_FIND_WEAPON – TASK_FIND_PATH – TASK_RUN_PATH – TASK_PICKUP_WEAPON SCHEDULE_FLANK_ATTACK – TASK_FIND_FLANK_POSITION – TASK_FIND_PATH – TASK_RUN_PATH – TASK_RANGE_ATTACK

37 Decision Making: CONDITONS: Predicates that are set every time an NPC thinks Conditions serve two purposes:  Schedule Selection  Schedule Interruption

38 Decision Making: For example: See an enemy (CONDITON_SEE_ENEMY) Hear danger (CONDITON_HEAR_DANGER) Took heavy damage (CONDITION_HEAVY_DAMAGE) Enemy blocked by something (CONDITION_ENEMY_OCCLUDED)

39 Decision Making: Decision Making: Conditions  Schedule selection is rule based: If (CONDITION_HEAR_DANGER) and not (CONDITION_HAVE_WEAPON) select schedule (SCHEDULE_GET_WEAPON) If (CONDITION_HAVE_WEAPON) and (CONDITION_OUT_OF_AMMO) select schedule (SCHEDULE_RELOAD_WEAPON)

40 Decision Making: Decision Making: Conditions  Interrupt conditions Schedules also contain interrupt conditions Same set of predicates used for schedule selection If interrupt condition is listed in the schedule, and the condition is true, the schedule will be interrupted

41 Decision Making: Decision Making: Conditions  Example: SCHEDULE_GET_WEAPON  TASK_FIND_WEAPON  TASK_FIND_PATH  TASK_RUN_PATH  TASK_PICKUP_WEAPON  CONDITION_HEAVY_DAMAGE  CONDITION_ENEMY_DEAD

42 Decision Making: Decision Making: Conditions  Task Failure Sometimes a task can’t be competed For example: –(TASK_FIND_WEAPON) when no weapon available –(TASK_FIND_PATH) when no way to get to destination In such cases the schedule will exit pre-maturely

43 Decision Making: Decision Making: Conditions  Fail Schedules: Can specify a fail schedule: SCHEDULE_GET_WEAPON  TASK_SET_FAIL_SCHEDULESCHEDULE_TAKE_COVER  TASK_FIND_WEAPON  TASK_FIND_PATH  TASK_RUN_PATH  TASK_PICKUP_WEAPON Take cover schedule chosen when any of the tasks fail

44 Decision Making:  NPC Think Cycle: Update predicate values (conditions) If any conditions interrupt the current schedule, select a new schedule Perform next task in schedule list If task fails, go to fail schedule (if defined) or select a new schedule If all tasks have been completed, select a new schedule

45 Decision Making Components of an AI System Decision Making Tactical Analysis

46 Tactical Analysis  Level designers place waypoints in the environment for navigation  Node graph contains node connectivity information for a map  Waypoints can also be evaluated for their visibility  Information can be used to make tactical decisions

47 Waypoint Analysis A World With 6 Nodes and 2 Enemies

48 Waypoint Analysis  Limited CPU time  Decisions must be made quickly (as few CPU cycles as possible)  Data must stored efficiently  Store visibility data in a “bit-string” class = visibility from node “a”

49 Waypoint Analysis Visibility Matrix

50 Waypoint Analysis  Danger Nodes Determined by “OR”ing the visibility of all enemy’s ( k ) nearest nodes  Safe Nodes Is its inverse

51 Waypoint Analysis Safe and Dangerous Nodes

52 Waypoint Analysis Safe and Dangerous Nodes

53 Finding a Safe Attack Position  While attacking a selected enemy, an NPC shouldn’t expose itself to other enemies  A good attack position will: Provide line-of-site (LOS) to the selected enemy Provide cover from all other enemies

54 Static Waypoint Evaluation  Unless cheating is employed, NPCs don’t have full knowledge of the world.  May not know where all their enemies are located  Find a good location to wait in for attack  Not all positions are created equal

55 Static Waypoint Evaluation  To find a good set up position: Establish the exposure of all waypoints in a map Process can be done off line, before game is even started

56 Static Waypoint Evaluation Evaluate Each Node For Visibility

57 Static Waypoint Evaluation  A good location is one which: Has high exposure (visibility) –Easy to locate enemies –Easy to establish LOS to attack and enemy Has areas of low exposure nearby –Can hide easily –Can run for cover easily

58 Static Waypoint Evaluation Good “Sniping” Positions

59 Pinch Points  Observation of human players reveals that experienced players anticipate the actions of their opponents (Laird 2000) For example, if an enemy enters a room with only a single exit an experienced player will wait just outside the exit setting up an ambush  Such “pinch points” can be pre-calculated by analyzing the node graph

60 Tactical Analysis: Review  Using the node graph to evaluate map locations: Finding safe and dangerous locations Finding places from which to attack Finding location to set up sniper positions Finding pinch points

61 Components of an AI System Decision Making Tactical Analysis

62 Conclusions Components of an AI System Decision Making Tactical Analysis Conclusions

63 Some Unsolved Problems:  Automatic generation of waypoints Currently waypoints placed by hand in levels by level designers Placement is time consuming Requires editing every time map is changed Error prone No reliable system for automatically placing waypoints

64 Some Unsolved Problems:  Generation of dynamic waypoints Pre-generated waypoints only work for static maps Can deal with some moving objects, by turning node connections on/off or re-testing connections in real- time Maps that are generated dynamically or maps that change significantly during run time are problematic

65 Conclusions:  In the computer game industry the term A.I. is used to cover a broad range of technologies including animation, movement, navigation and behavior.  What is required to make a game entertaining does not always coincide with making the game’s characters “smarter”.  It is world where the illusion of intelligence is far more important then actual intelligence