Artificial Intelligence in Game Design Hierarchical Finite State Machines.

Slides:



Advertisements
Similar presentations
Anthony Wayne Lacrosse
Advertisements

Anthony Wayne Lacrosse
7.1. O SCARS & A RTIFICIAL I NTELLIGENCE Interim awards and introduction to game AI.
Highway & Rural Driving
Quantum One: Lecture 6. The Initial Value Problem for Free Particles, and the Emergence of Fourier Transforms.
Team Offense: The 21 Set.
Select Team Offense: The 23 Set
 When using the rotary cutter always walk with the blade closed. To open the blade place four fingers around the handle and slide the blade guard button.
CHAPTER 6 BASIC MANEUVERS.
Deuces Classic and Options. Offensive Theory Motion vs Patterned Zone Questions…. How many ya hiding? Ball handlers- how many ya got? Man or Zone..same.
Artificial Intelligence in Game Design Representing NPCs as Finite State Machines.
Table of Contents Why Play Chess? Setting Up the Board Get to Know the Pieces Check and Checkmate What the Chess Pieces Are Worth Opening Goals Endgame.
Intersections & Right of Way
Artificial Intelligence in Game Design Intelligent Decision Making and Decision Trees.
Artificial Intelligence in Game Design Introduction to Learning.
RED DEAD REVOLVER Artificial Intelligence Critique By Mitchell C. Dodes CIS 588.
Game Design and Programming. Objectives Classify the games How games are design How games are implemented What are the main components of a game engine.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Better Interactive Programs Ed Angel Professor of Computer Science, Electrical and Computer.
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:
By Kim Butler, Ed.D 2012 HSCII Basketball Study Guide.
Substitutions & Offsides Rules February 2008 CPLOA Officials Association.
Artificial Intelligence in Game Design Camera Control.
Artificial Intelligence in Game Design Event and Sense Management.
Standard Grade Basketball
Artificial Intelligence in Game Design Problems and Goals.
CO1301: Games Concepts Dr Nick Mitchell (Room CM 226) Material originally prepared by Laurent Noel.
Canyon Adventure Technology David Maung, Tristan Reichardt, Dan Bibyk, Juan Roman Department of Computer Science and Engineering The Ohio State University.
Artificial Intelligence in Game Design
How to make Space Invaders
Artificial Intelligence in Game Design Behavior Trees.
Artificial Intelligence in Game Design
Computing & Information Sciences Kansas State University Lecture 20 of 42CIS 636/736: (Introduction to) Computer Graphics Lecture 21 of 42 William H. Hsu.
Jonathan Ziegler AI Game Programming 3/20/08.  Different NPCs and games require different sorts of behaviors  General methodology of game AI design.
CSC 395 – Software Engineering Lecture 28: Classical Analysis -or- Do You Really Want to Do That?
Artificial Intelligence in Game Design Cooperative Movement.
1 Better Interactive Programs. 2 Objectives Learn to build more sophisticated interactive programs using ­Picking Select objects from the display Three.
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.
Artificial Intelligence for Games Finite State Machines
Lesson 3: Arrays and Loops. Arrays Arrays are like collections of variables Picture mailboxes all lined up in a row, or storage holes in a shelf – You.
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.
Warlords Patrick Levoshko SE 558 – Multiplayer Game Design.
Chess Strategies Component Skills Strategies Prototype Josh Waters, Ty Fenn, Tianyu Chen.
Artificial Intelligence in Game Design Lecture 8: Complex Steering Behaviors and Combining Behaviors.
STRUCTURE & STRATEGIES FAST BREAK OFFENCE. What is the Fast Break? Fast break is an offence strategy used in basketball. It is effective against a slow.
Finite State Machines using Alice Stephen Cano CIS 4914 Senior Project Wednesday December 5th.
Basketball. History Gameplay Basic Rules Offense Techniques Defense Court and Positions Vocabulary.
Artificial Intelligence in Game Design Lecture 20: Hill Climbing and N-Grams.
ICT/COMPUTING RULES Only use software allowed by the teacher
Finite State Machines Logical and Artificial Intelligence in Games Lecture 3a.
Team Member AI in an FPS and Goal Oriented Action Planning.
Animation and Simulation Plus Interaction
Decision Making: Decision Tree & State Machines Session 07
Application of Artificial Intelligence and Graphics to Support a Three-Dimensional Game Chris Cummings.
Better Interactive Programs
Enemy and Friendly AIs Richard Gesick.
CHESS.
Artificial Intelligence in Game Design
Finite State Machines Computer theory covers several types of abstract machines, including Finite State Machines.
CO Games Development 2 Week 19 Extensions to Finite State Machines
Better Interactive Programs
Computer Graphics Lecture 15.
02 | What DirectX Can Do and Creating the Main Game Loop
Games Development Game Architecture: Entities
Presentation transcript:

Artificial Intelligence in Game Design Hierarchical Finite State Machines

Actions Chosen by AI AI chooses actions game engine performs –Internal state Example: Which city boss NPC chooses to attack –Visible actions Example: Whether orc attacks or defends Must be at level of detail that game engine expects

Scripted Actions Visible actions usually limited to set of animations created in advance Can often be sequence of actions: “scripting” Game AI Self destruct sequence Game Engine Poll again when script finished

Level of Detail in Graphics Only render graphics at detail necessary for what player can see –Close up = full detail Facial expression Detailed motion –Far away = little detail Basic body shape Simple motion Minimize load on graphics engine –Few NPCs need to be rendered in full detail (usually one at a time)

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 ”

“Guardbot” Example Patrol Move back and forth in front of door Energy at 100% Chase Move towards player Energy = Energy - 1 Player visible Escaped Move towards door Energy = Energy - 1 At door Player not visible Energy below 50% Return Move towards door Energy = Energy - 1 Player visible Fire Player within 2 units

“Guardbot” Example Patrol Move back and forth in front of door Energy at 100% Player visible Escaped Move towards door Energy = Energy - 1 At door Player not visible Energy below 50% Return Move towards door Energy = Energy - 1 Player visible Fire Player within 2 units Turning Player in front Forward Player to side Dodge Obstacle in front

Hierarchical State Machines Problems with Finite State Machines: Too complex –Potentially hundreds of states Design difficult Debugging impossible Much duplication –Many blocks of states similar Example: Return state also needs “Turn”, “Move”, and “Dodge” –Many transitions similar Example: Need “low energy” transition from all states in “Chase”

Hierarchical State Machines Single high-level state contains entire low-level FSM –Need initial state that high-level passes control to –Need final states that correspond to transitions from high-level state Chase Turning Forward Player to side Dodge Obstacle in front Start Player to side Player in front Obstacle not in front Escaped Player not within 10 units Fire Player within 2 units

Hierarchical State Machines Usually implemented as stack –Push low-level state on stack when enter –Pop and move to next state when finished Start Chasing Guarding Door Chasing Guarding Door Turning Chasing Guarding Door … Escaped Chasing Guarding Door Escaped Guarding Door

Exiting Low-level States “Interrupts” may cause exit before task is completed –Example: Caution flag interrupts passing All states on stack may have interrupt conditions –Check all at each frame –Better than having same transition for all states Turning Chasing Guarding Door Forward Player in front Return Go to HQ Energy < 50% Emergency recall

Exiting Low-level States Can store current low level state and return if necessary once exception handled Build Farm Clear landBuild barnPlant crops Dam break Fix Dam Return to appropriate state when dam fixed

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) Task subteam Character motion team (works with animation team)

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… Corresponds to animation