Video Game AI. Classical Games – Focus on optimal players using computationally expensive search techniques Video Game AI – Refers to games such as First.

Slides:



Advertisements
Similar presentations
Chapter 09 AI techniques in different game genres (Puzzle/Card/Shooting)
Advertisements

Heuristic Search techniques
Presentation on Artificial Intelligence
7.1. O SCARS & A RTIFICIAL I NTELLIGENCE Interim awards and introduction to game AI.
1 CO Games Development 2 Week 15 Terrain Analysis Gareth Bellaby.
Artificial Intelligence for Games Patrick Olivier & John Shearer
1 Interactive Fiction CIS 487/587 Bruce R. Maxim UM-Dearborn.
Michael Zyda Finite State Machines Michael Zyda
CSE 380 – Computer Game Programming Pathfinding AI
Artificial Intelligence in Game Design Intelligent Decision Making and Decision Trees.
Automated Planning & Computer Games: Perspectives and Applications Hector Munoz-Avila.
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.
Chapter 4 DECISION SUPPORT AND 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.
Reinforcement Learning in Real-Time Strategy Games Nick Imrei Supervisors: Matthew Mitchell & Martin Dick.
And Just Games etc.. EVOLUTION OF COMPUTER GAMES PongOdyssey Beginning of the use of microprocessors ATARI VCS system bit.
AI – Week 8 AI + 2 Player Games Lee McCluskey, room 3/10
Artificial Intelligence in Game Design Probabilistic Finite State Machines.
Autonomous Mobile Robots CPE 470/670 Lecture 8 Instructor: Monica Nicolescu.
Artificial Intelligence in Video Games Jason Fuller 1.
AI and GAMES CSC 8520, Villanova University Spring, 2004 Paula Matuszek & Robin McEntire.
Mobile Robot Control Architectures “A Robust Layered Control System for a Mobile Robot” -- Brooks 1986 “On Three-Layer Architectures” -- Gat 1998? Presented.
Chapter 11: Artificial Intelligence
Artificial Intelligence in Game Design Problems and Goals.
Chapter 10 Artificial Intelligence. © 2005 Pearson Addison-Wesley. All rights reserved 10-2 Chapter 10: Artificial Intelligence 10.1 Intelligence and.
1 CO Games Development 1 Week 6 Introduction To Pathfinding + Crash and Turn + Breadth-first Search Gareth Bellaby.
Introduction to AI Engine & Common Used AI Techniques Created by: Abdelrahman Al-Ogail Under Supervision of: Dr. Ibrahim Fathy.
What is Probability?  Hit probabilities  Damage probabilities  Personality (e.g. chance of attack, run, etc.)  ???  Probabilities are used to add.
StarCraft Learning Algorithms By Logan Yarnell, Steven Raines, and Dean Antel.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 11: Artificial Intelligence Computer Science: An Overview Tenth Edition.
How Solvable Is Intelligence? A brief introduction to AI Dr. Richard Fox Department of Computer Science Northern Kentucky University.
I Robot.
Jumping, Climbing, and Tactical Reasoning Section 2.5 Tom Schaible CSE 497 – AI & Game Programming.
Neural Networks and Machine Learning Applications CSC 563 Prof. Mohamed Batouche Computer Science Department CCIS – King Saud University Riyadh, Saudi.
Intelligent Database Systems Lab 國立雲林科技大學 National Yunlin University of Science and Technology 1 Evolving Reactive NPCs for the Real-Time Simulation Game.
Subsumption Architecture and Nouvelle AI Arpit Maheshwari Nihit Gupta Saransh Gupta Swapnil Srivastava.
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.
CSCI 4310 Lecture 2: Search. Search Techniques Search is Fundamental to Many AI Techniques.
Rational Agency CSMC Introduction to Artificial Intelligence January 8, 2004.
Decision Making Under Uncertainty - Bayesian Techniques.
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.
Dynamic Task Allocation in a turn based strategy game Gilles Schtickzelle September 2012 ULB.
Artificial Intelligence: Research and Collaborative Possibilities a presentation by: Dr. Ernest L. McDuffie, Assistant Professor Department of Computer.
Graph Search II GAM 376 Robin Burke. Outline Homework #3 Graph search review DFS, BFS A* search Iterative beam search IA* search Search in turn-based.
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.
Intelligent Agents Chapter 2. How do you design an intelligent agent? Definition: An intelligent agent perceives its environment via sensors and acts.
Finite State Machines Logical and Artificial Intelligence in Games Lecture 3a.
1 Chapter 7 Advanced Pathfinding Techniques improving performance & quality Reference: Game Development Essentials Game Artificial Intelligence.
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.
Network Management Lecture 13. MACHINE LEARNING TECHNIQUES 2 Dr. Atiq Ahmed Université de Balouchistan.
The Game Development Process: Artificial Intelligence.
Artificial Intelligence
Team Member AI in an FPS and Goal Oriented Action Planning.
Flexible and Purposeful NPC Behaviors using Real-Time Genetic Control
Decision Making: Decision Tree & State Machines Session 07
Chapter 11: Artificial Intelligence
Chapter 11: Artificial Intelligence
Application of Artificial Intelligence and Graphics to Support a Three-Dimensional Game Chris Cummings.
Enemy and Friendly AIs Richard Gesick.
Intelligent Agents Chapter 2.
CO Games Development 2 Week 19 Extensions to Finite State Machines
CIS 488/588 Bruce R. Maxim UM-Dearborn
Interaction with artificial intelligence in games
CHAPTER I. of EVOLUTIONARY ROBOTICS Stefano Nolfi and Dario Floreano
Introduction to Artificial Intelligence Instructor: Dr. Eduardo Urbina
Presentation transcript:

Video Game AI

Classical Games – Focus on optimal players using computationally expensive search techniques Video Game AI – Refers to games such as First Person Shooters, Real Time Strategy, Role Playing, Action/Arcade Games – Differs greatly from classical AI since relatively little CPU available for the AI Focus on believable characters, behaviors Rarely rises above the level of finite state machines

Video Game Industry January, 2008

Video Game AI Growing area for research – E.g. Doom AI players – Starting to see AI game engines – Several research efforts in believable characters Most video games though use simple algorithms to reduce the CPU load – Some techniques Movement and Path Finding Reasoning State Machines Layered Architecture Team AI Planning

Movement and Path Finding Many games require the AI to go from point A to point B – Generally multiple paths, obstacles, scenarios Easy enough – we already covered A* – Optimal compared to DFS and BFS – Convert problem into a graph and run A*, problem solved?

Simple Solution to Pathfinding Reduce map to a graph with fewer edges, only along select routes, to simplify the problem AB C D EF G If player within the rectangle then position is simply referenced as the rectangle Assume global knowledge of the game board

Movement Strategies Can encode attack/defense strategies using a simple lookup table on the simple graph Offense – If healthy use the attack strategy Defense – If not healthy take the defensive strategy

Offensive Lookup Table ABCDEFG ABCDDCC BACDDCC CABDDGG DABCEEC EDDFDFF FGEGEEG GCCCCFF AI Human AB C D EF G

Defensive Lookup Table ABCDEFG ABCD CBB BDDGCA CDGDGABD DEEEEABB EFFDDD FEGEGGEE GFFCCC AI Human AB C D EF G

Lookup Table Strategy Provides for reactive behaviors – AI reacts to the movement of the player Stateless – No state kept between lookups – AI simply uses its position and the players position to determine the next move – Fast, efficient, no search required – Can add unpredictability by randomly selecting moves with some probability

Scaling Up For large environments, can make a map of maps AB C D EF G Master Map Faron Woods Hyrule Castle Snowpeak Ruins

Lookup Table Problems Tends to fall apart if the environment changes over time Can sometimes result in bizarre behavior at the thresholds between zones and because of the vast simplification Video example: – Direct link:

Agent Behavior and Environment AI’s behavior ultimately grounded in the environment – Environment may change, AI should reason about the environment to perform some action, affecting environment – Closed loop of reasoning Internal State Reason PerceiveAct Environment Behavior

Basic Reasoning Abilities – State Machines Perhaps simplest and most common is the state machine; example with 3 mental states for a sentry guarding two locations March to Location X Attack Player March to Location Y At Location Y? At Location X? Player dead? Player in sight?

Finite State Machine Could exhibit more intelligence with more states, more transitions Simple to write and easy to debug Predictable but can add transition probabilities for element of randomness

Basic Reasoning Abilities – Layered Behavior Architecture Previous example only marched, attacked – What if other things on the AI’s mind? If health low, go to the hospital If low on ammo, go to the armory If outnumbered, stay and fight or run for the alarm? – One solution to handle the conflict in action selection is Rodney Brooks’ subsumption architecture Implemented for robot systems

Subsumption Architecture Responsibilities confined to isolated layers, but a layer subsumes (takes priority over) another if the need arises Within each layer we might implement the behavior as a FSM Survive Sustain Attack Patrol Level 4 Level 3 Level 2 Level 1 Behavior Priority Heal at Infirmary, Raise alarm Reload at the Armory Eliminate Humans March between X and Y

Basic Reasoning Abilities – Other Approaches Machine Learning – will discuss shortly\ – Rote learning – Neural networks – Genetic algorithms – Others Usually in the context of a scripting language for character behavior

Team AI Often an entire army that must work together, how to manage the multitudes of agent AI’s? Use the same organizational hierarchy as real life – Soldiers implemented as finite state machines or other simple mechanism; might always follow orders – Higher-level units subdivided at higher strategic levels

Team AI Hierarchy Army Division Brigade Company Platoon Squad Soldier 100,000 20,000 5,

Hierarchical Control One mechanism is to define a goal and then create plans to reach that goal – Goal might be a win-situation or intermediate goal closer to a win E.g. taking an enemy position, destroying a bridge, flanking the enemy, etc. – To reach goal must perform a series of actions – Actions may have preconditions for the action to be performed and postconditions as a result E.g. planting a charge requires the demolitions expert, action is to plant the charge, postcondition is the target is destroyed – The plan is the set of actions that when performed in the given order achieves the goal

Sample Plan Goal Eliminate(Player) – Preconditions Covered_Position(Player) Alive(Player) – Plan Action 1: Identify_Flanking_Position(AI_1) Action 2: Fire_At_Player(AI_2) Action 3: Move_To_Flanking_Position(AI_1) Action 4: Fire_At_Player(AI_1) Action 5: Rush_Player(AI_2)

Planner Actions Planner Plan Goal World State Action 1 Action 2 Action 3 Action 4 How do we come up with the Plan? Search!

Rule-Based AI In a similar manner, we can also create a rule- based AI system Rules Memory Rule matching Conflict Resolution Working Memory Apply Rule Rule(s) Fact(s) Fact Rule Rule(s)

Rule Example Working Memory (opponent-1 size 1000) (opponent-2 size 100) (army size 1000) Rule (rule “Attack weaker opponents” (< (?opponent size) 500) (> (army size) 500) --> (attack ?opponent)) After applying the rule to our working memory, we get: (attack opponent-2)

Rule-Based System RBS could remove facts as driven by consequents to reflect the dynamic nature of the game With a sufficient rule/fact base, can make appropriate actions, useful for RTS games – E.g. first, focus might be to build bases and collect resources because military rules not able to fire Difficult to code the rule base; requires some CPU time to apply the rule engine with a large number of rules – Does allow strategy to be decoupled from the game engine, permit later tweaking by game developers

References Jones, Tim. Artificial Intelligence, A Systems Approach, Infinity Science Press Game AI, State of the Industry: eindustry.html eindustry.html