Scott Lindner 10/6/04 Pathfinding and Navigational Systems, cont.

Slides:



Advertisements
Similar presentations
Artificial Intelligence in Game Design
Advertisements

Heuristic Search techniques
Reactive and Potential Field Planners
AI Pathfinding Representing the Search Space
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Pathfinding Basic Methods.
Half life 2/ Counter Strike: Source bot Charlie Cross CIS
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.
Social Force Model for Pedestrian Dynamics 1998 Sai-Keung Wong.
Planning under Uncertainty
Using Cellular Automata and Influence Maps in Games
John S Gero Agents – Agent Simulations AGENT-BASED SIMULATIONS.
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.
MAE 552 – Heuristic Optimization Lecture 27 April 3, 2002
Soldier of Fortune 2: Double Helix Paris York CIS 588.
Using a GA to Create Prey Tactics Presented by Tony Morelli on 11/29/04.
Intelligent Agents What is the basic framework we use to construct intelligent programs?
Artificial Intelligence in Game Design Probabilistic Finite State Machines.
Randomized Planning for Short Inspection Paths Tim Danner Lydia E. Kavraki Department of Computer Science Rice University.
Virulent SophtWear Virul-Glider V1.0 Josh Smallman Mjumbe Poe Zach Clegg.
Artificial Intelligence in Game Design Camera Control.
October 8, 2013Computer Vision Lecture 11: The Hough Transform 1 Fitting Curve Models to Edges Most contours can be well described by combining several.
Multi-Layered Navigation Meshes Wouter G. van Toll, Atlas F. Cook IV, Roland Geraerts ICT.OPEN 2011.
Artificial Intelligence in Game Design Event and Sense Management.
Game Trees: MiniMax strategy, Tree Evaluation, Pruning, Utility evaluation Adapted from slides of Yoonsuck Choe.
1 CO Games Development 1 Week 5 Deriving a "look at" function + Graph Theory Gareth Bellaby.
A Navigation Mesh for Dynamic Environments Wouter G. van Toll, Atlas F. Cook IV, Roland Geraerts CASA 2012.
Chapter 5.4 Artificial Intelligence: Pathfinding.
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning CPSC 315 – Programming Studio Spring 2008 Project 2, Lecture 2 Adapted from slides of Yoonsuck.
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.
Introduction Tracking the corners Camera model and collision detection Keyframes Path Correction Controlling the entire path of a virtual camera In computer.
1 CO Games Development 1 Week 6 Introduction To Pathfinding + Crash and Turn + Breadth-first Search Gareth Bellaby.
Artificial Intelligence in Game Design Behavior Trees.
Artificial Intelligence in Game Design
Path Planning Part I: Search Space Representation Part II: Table Lookup Path Finder Path III: Convincing Hunting Ref: AIWisdom 2.
Representing and Using Graphs
August 31, 2005 Game Developer Conference Europe Killzone’s AI: Dynamic Procedural Tactics Guerrilla Games - 1 Killzone’s AI: Dynamic Procedural Tactics.
Ch 7.1: Using a Spatial Database for Runtime Spatial Analysis.
12/4/2001CS 638, Fall 2001 Today Managing large numbers of objects Some special cases.
Motion Planning in Games Mark Overmars Utrecht University.
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.
Games Development Game Architecture: Entities CO2301 Games Development 1 Week 22.
Games Development 2 Entity Update & Rendering CO3301 Week 2, Part 1.
Tetris Agent Optimization Using Harmony Search Algorithm
AI Evaluation David Nowell CIS 588 2/14/05 Baldur’s Gate.
COSC 2007 Data Structures II Chapter 13 Advanced Implementation of Tables IV.
Instructional Objective  Define an agent  Define an Intelligent agent  Define a Rational agent  Discuss different types of environment  Explain classes.
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.
Winter 2011SEG Chapter 11 Chapter 1 (Part 1) Review from previous courses Subject 1: The Software Development Process.
Selection of Behavioral Parameters: Integration of Case-Based Reasoning with Learning Momentum Brian Lee, Maxim Likhachev, and Ronald C. Arkin Mobile Robot.
Maths & Technologies for Games Spatial Partitioning 1 CO3303 Week 8-9.
Randomized Kinodynamics Planning Steven M. LaVelle and James J
Artificial Intelligence in Game Design Influence Maps and Decision Making.
Artificial Intelligence in Game Design Lecture 8: Complex Steering Behaviors and Combining Behaviors.
CSE 143 Lecture 13 Recursive Backtracking slides created by Ethan Apter
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.
CSCI 4310 Lecture 5: Steering Behaviors in Raven.
Planning Tracking Motions for an Intelligent Virtual Camera Tsai-Yen Li & Tzong-Hann Yu Presented by Chris Varma May 22, 2002.
Artificial Intelligence in Game Design Lecture 20: Hill Climbing and N-Grams.
Beard & McLain, “Small Unmanned Aircraft,” Princeton University Press, 2012, Chapter 12: Slide 1 Chapter 12 Path Planning.
CIS 488/588 Bruce R. Maxim UM-Dearborn
CIS 488/588 Bruce R. Maxim UM-Dearborn
Ch 7.1: Using a Spatial Database for Runtime Spatial Analysis
Presentation transcript:

Scott Lindner 10/6/04 Pathfinding and Navigational Systems, cont.

Outline 2.5: How to get more out of a navigation system Architecture Considerations High-Level Benefits Low-Level Benefits 2.6: Hunting down the player Choose destinations wisely Search “intelligently”

Using navigation for more than just route-finding When/where to throw a grenade? Automatically climb a ladder or jump a gap? What locations are useful to hide behind, or lean around? Solution: embed additional information directly into navigational data automatically detect it during a preprocessing step, or encode it by hand

Architecture Considerations additional AI layer specializes in movement, steering, animation, and other low-level details that decision maker is not designed for

High-Level Point Selection and Pathfinding Any data that AI can easily look at is potentially usable Finding cover and combat tactics –“Bounding Overwatch” –More details later… Throwing grenades –Not practical to calculate trajectories during the game –Encode possible throws directly into the system »must be evaluated from all points to all possible targets

Throwing Grenades

Agent queries navigation system to find closes allowable point Decision making code will instruct agent how to get to the calculated spot and how to throw his grenade

Biasing Edge Cost Normally cost = distance Can make agent avoid a given edge by adding to its cost Stop “cutting corners” SOF2 –Avoid areas where comrades die

Biasing Edge Cost ParentPoint = OpenList.GetFromOpenList() For each edge from ParentPoint Switch Edge.type() Case FLY_EDGE: If ( actor.CanFly() ) Edge.cost = actor.FlyBiasCost() OpenList.AddToOpenList(Edge)

Low-Level Animation and Steering Path usually handed down as abstract series of points Embedded information will give AI knowledge to perform various behaviors Dynamic movement –Jumping over crevice Eliminates need to script behavior Allows special movement types to be added, all existing combat behavior will automatically make use of it

The Navigation Point Provide discrete locations to space where AI agents can move to/from Use spatial volumes as discussed previously Test for reachability and “openness” Sphere (of influence)

The Navigation Point

Obstacle Visibility Vertical tests (height) Used to find locations to hide behind Run collision tests, until you don’t hit anything Previous C and D Side to side test Near a corner? Run collision tests perpendicular Previous A and B

Navigation Edge Points alone not sufficient for navigation Adding additional information into edges is very useful Certain characters might have features making traversal possible/impossible –Size »Maximum size can be calculate by running collision tests and anything <= that can pass through

Situations Over a crevice – jump? fly? Navigation points in the air Only applicable to agents who can fly, ignored by others Over an obstacle - vault? Jump? Through a movable obstacle Open a door Move a box Embed all animations directly into respective edge

Movable Objects Retry collision test after removing/relocating object If next test succeeds, edge is still valid Any complex sequence of behaviors (reach out, pull door open, step back, etc) all embedded in navigation system

Slopes, Stairs, Ladders, etc Slopes tell about surroundings –Vertical = ladder/rope –Otherwise = stairs/slope

2.6: Hunting Down the Player in a Convincing Manner Goal is to have NPC convincingly chase and hunt a player –Spotted by guard, etc. Today’s gamers expect intelligent behavior Problem is AI can cheat, following too direct of a path –Leads to “unfair” results Solution: ensure that the agent explores and looks like it’s trying to find it’s nonvisible target by a process of search, rather than direct path

Enabling a Range of Behaviors Must be able to control scope of the search Bumbling/wandering agent Agent who searches with purpose, decisively These allow us to control how quickly discovery occurs and how direct the resulting path is

Approach Agent’s objective: get closer to player over time –Utilize pathfinding Requires a given destination –Usually places agent closer to player –Simple idea is to head to players current location »does not produce good gameply (player hiding) Solution: come up with more interesting destinations

Application Requirements Pathfinding system is capable of establishing relatively quickly the accessibility of the world Method is iterative, therefore requires multiple calls to give desire behavior Knowledge of hunting character and target player Facility of “line of sight” – can we see the player? Basic approach is to periodically generate new search destination over time destinations actually intermediate destinations

Possible Problems? Since process is iterative, could lead to lots of calls being made and many paths being constructed (in theory) Solution: (see requirements) generation of search destinations is a relatively infrequent even in AI terms. Unlikely necessary to calculate a new character search destination more frequently than 1 character / second [McLean02]. Intervals lasting several seconds will be perfectly acceptable for many games

3 Possible Scenarios During each update decide which of the 3 currently apply The player is visible The player was recently seen The player has never been seen

Scenario One: The Player is Visible Hunting behavior is over Transition into an appropriate attacking behavior Look for cover within weapon range? Move to that spot? Engage in hand to hand combat?

Scenario Two: The Player Was Recently Seen NPC does not currently have line of sight Move towards last seen player location –Leads to “fun” gameplay Trick agent by circling an object Need to maintain “last seen” location Store time and location Important to clear “last seen” when agent begins moving on its route Otherwise agent might fall into states that are inappropriate due to out-of-date info

Scenario 3: The Player Has Never Been Seen Must create a search location, rather than extract one from the AI system Randomly generate a location somewhere close to player (within a certain radius) –Cheap to do, but not very purposeful or guided Solution: same idea, but slightly different

Scenario 3, cont. Generate two random parameters –Direction heading Direction vector to true player’s location Then alter vector subject to a certain window of variance –Straight line distance to travel Lies within given interval »Consider the interval a multiplier of actual distance to player

Scenario 3, cont

Keep in mind that since destination is randomly generated, it might not actually be accessible Route to closest location that IS accessible Existing pathfinding system already offers this functionality Also, route to destination wont be straight line, but again, built into pathfinding system Must update vision more frequently than generation of destinations in case we see the player

Scenario 3, cont.

Putting it all together Going back to previous slide

Enabling a Range of Behaviors Must be able to control scope of the search Bumbling, wandering, accidental, discovery of player, search path that is purposeful, efficient, direct These allow us to control how quickly discovery occurs and how direct the resulting path is

Putting it all together Purposeful characters that appear to find the player quickly given values of Smin and Smax close to 1.0 with a small Φ. “Bumbling” agents will require values for Φ, Smin, and Smax far from 1.0

Extending to 3D Easily extend to 3D by generating points inside 3D cones Cost very insignificant and approach still very successful Relative sizes of regions to be searched will vary non-linearly (i.e. halving the radius of the cone will more than halve the search space) Agent will find character twice as fast

Other Considerations Agent must always be reconsidering its current destination As to not ignore a player who runs directly in front of him on his way to a destination Static players/dynamic players »Dynamic means MANY more calls Can respond to other percepts Sounds Other teammates

Sources AI Game Programming Wisdom 2 Mclean, Alex, “An Efficient AI Architecture Using Prioritized Task Categories,” AI Game Programming Wisdom, Charles River Media, 2002