Path Planning Part I: Search Space Representation Part II: Table Lookup Path Finder Path III: Convincing Hunting Ref: AIWisdom 2.

Slides:



Advertisements
Similar presentations
Artificial Intelligence in Game Design
Advertisements

Heuristic Search techniques
General Pathfinding: Tables and Navigation Jeremy Christman.
AI Pathfinding Representing the Search Space
P3 / 2004 Register Allocation. Kostis Sagonas 2 Spring 2004 Outline What is register allocation Webs Interference Graphs Graph coloring Spilling Live-Range.
Pathfinding AI John See 29 Nov, 13 Dec 2010.
Navigation Set Hierarchy Tom Gianos Chapter 2.2. Mike Dickheiser Works (worked?) for Red Storm Entertainment Works (worked?) for Red Storm Entertainment.
Motion Planning for Point Robots CS 659 Kris Hauser.
Administrative Project due Tuesday: – your code to Yisheng Tang no later than 11:59PM EST Monday February 6 (the day BEFORE the.
AreaPortal Visibility By Filami. Objectives Practice the techniques of visibility determination using Area Portals; Develop an experimental application.
NUS CS5247 Motion Planning for Camera Movements in Virtual Environments By Dennis Nieuwenhuisen and Mark H. Overmars In Proc. IEEE Int. Conf. on Robotics.
Pathfinding Basic Methods.
By Lydia E. Kavraki, Petr Svestka, Jean-Claude Latombe, Mark H. Overmars Emre Dirican
CSE 380 – Computer Game Programming Pathfinding AI
Motion Planning CS 6160, Spring 2010 By Gene Peterson 5/4/2010.
University of Amsterdam Search, Navigate, and Actuate - Quantitative Navigation Arnoud Visser 1 Search, Navigate, and Actuate Quantative Navigation.
CSE351/ IT351 Modeling And Simulation Choosing a Mesh Model Dr. Jim Holten.
Modelling. Outline  Modelling methods  Editing models – adding detail  Polygonal models  Representing curves  Patched surfaces.
Graphs.
Graphs. Graph definitions There are two kinds of graphs: directed graphs (sometimes called digraphs) and undirected graphs Birmingham Rugby London Cambridge.
Soldier of Fortune 2: Double Helix Paris York CIS 588.
Randomized Planning for Short Inspection Paths Tim Danner Lydia E. Kavraki Department of Computer Science Rice University.
Introduction General Data Structures - Arrays, Linked Lists - Stacks & Queues - Hash Tables & Binary Search Trees - Graphs Spatial Data Structures -Why.
UNC Chapel Hill M. C. Lin Overview of Last Lecture About Final Course Project –presentation, demo, write-up More geometric data structures –Binary Space.
1 Advanced Scene Management System. 2 A tree-based or graph-based representation is good for 3D data management A tree-based or graph-based representation.
Graphs, Goals and NPCs Advanced Programming for 3D Applications CE
Chapter 5.4 Artificial Intelligence: Pathfinding.
Multi-Layered Navigation Meshes Wouter G. van Toll, Atlas F. Cook IV, Roland Geraerts ICT.OPEN 2011.
Ioannis Karamouzas, Roland Geraerts, Mark Overmars Indicative Routes for Path Planning and Crowd Simulation.
A Navigation Mesh for Dynamic Environments Wouter G. van Toll, Atlas F. Cook IV, Roland Geraerts CASA 2012.
Visibility Graphs and Cell Decomposition By David Johnson.
Chapter 5.4 Artificial Intelligence: Pathfinding.
Pathfinding: Search Space Representations Chapter 2.1 Dan Bader.
CS 4730 AI and Pathfinding CS 4730 – Computer Game Design Some slides courtesy Tiffany Barnes, NCSU.
Lab 3 How’d it go?.
CSCI-455/552 Introduction to High Performance Computing Lecture 18.
1 Game AI Path Finding. A Common Situation of Game AI A Common Situation of Game AI Path Planning Path Planning –From a start position to a destination.
World space = physical space, contains robots and obstacles Configuration = set of independent parameters that characterizes the position of every point.
1 Solving problems by searching This Lecture Chapters 3.1 to 3.4 Next Lecture Chapter 3.5 to 3.7 (Please read lecture topic material before and after each.
Today’s Topics FREE Code that will Write Your PhD Thesis, a Best-Selling Novel, or Your Next Methods for Intelligently/Efficiently Searching a Space.
Artificial Intelligence in Game Design
Graphs. 2 Graph definitions There are two kinds of graphs: directed graphs (sometimes called digraphs) and undirected graphs Birmingham Rugby London Cambridge.
Today Path Planning –Intro –Waypoints –A* Path Planning.
1 Artificial Intelligence in Games Week 6 Steve Rabin TA: Chi-Hao Kuo TA: Allan.
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.
WORLD NAVIGATION Don’t Fall Asleep Through These Topics  Tile Graphs  Points of Visibility  NavMesh  Path Smoothing  Hierarchical Pathfinding.
Toward More Realistic Pathfinding Authored by: Marco Pinter Presentation Date: 11/17/03 Presented by: Ricky Uy.
1 Finding Shortest Paths with A* Search A* search operates similarly to Dijkstra’s algorithm, but extends the cost function to include an estimated distance.
UNC Chapel Hill M. C. Lin Introduction to Motion Planning Applications Overview of the Problem Basics – Planning for Point Robot –Visibility Graphs –Roadmap.
Path Look-up Tables & An Overview of Navigation Systems Hai Hoang 10/4/2004.
CSCI 4310 Lecture 8: Path Planning. Book Buckland Ch. 8.
Scott Lindner 10/6/04 Pathfinding and Navigational Systems, cont.
1 CO Games Development 1 Week 13 - Revision Lecture AI Revision Gareth Bellaby.
11/8/2001CS 638, Fall 2001 Today Admin Path Planning –Intro –Waypoints –A* Path Planning.
Artificial Intelligence in Game Design Influence Maps and Decision Making.
Artificial Intelligence in Game Design Lecture 8: Complex Steering Behaviors and Combining Behaviors.
Pathfinding and Movement Michael Moll September 29, 2004.
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.
CSCE 552 Fall 2012 AI By Jijun Tang. Homework 3 List of AI techniques in games you have played; Select one game and discuss how AI enhances its game play.
1 Chapter 7 Advanced Pathfinding Techniques improving performance & quality Reference: Game Development Essentials Game Artificial Intelligence.
Beard & McLain, “Small Unmanned Aircraft,” Princeton University Press, 2012, Chapter 12: Slide 1 Chapter 12 Path Planning.
Autonomous Robots Robot Path Planning (2) © Manfred Huber 2008.
Review IMGD Engine Architecture Types Broadly, what are the two architecture types discussed for game engines? What are the differences?
Chapter 5.4 Artificial Intelligence: Pathfinding
Crowd Modelling & Simulation
CS679 - Fall Copyright Univ. of Wisconsin
CSCE 552 Spring 2009 AI (III) By Jijun Tang.
Presentation transcript:

Path Planning Part I: Search Space Representation Part II: Table Lookup Path Finder Path III: Convincing Hunting Ref: AIWisdom 2

Spring Taxonomy Local path finding For dynamic environment [characters in motion, obstacles moved by characters] potential energy, steer, … Global path planning For static environment Graph-based search algorithm (Dijkstra, A*, BFS, … )

Spring Task Decomposition Search Space Representations: ways to define the waypoints Search Algorithms Extension: mixed with local algorithm …

Spring Search Space Representations Analogy: C++ STL: algorithms (sort, find, copy, … ) work on various container classes (vector, list, … ) Path finding: algorithms (BFS, DFS, Dijkstra, A*, … ) Search space representation: … Choice of representation has great impact on performance and memory overhead Assumption: 2D, or 3D hovering at fixed height Full 3D: flying, swimming characters

Spring Introduction All search spaces are graphs: nodes and edges Problem definition (Path Optimality): given two points A and B, find the least expensive path from A to B Remarks: not always the shortest [consider swamp] Must consider agent movement capability [size, open door, swim, climb, … ]

Spring Character-dependent Paths

Spring Search Space Generation Options: manually created by level designer Automatically generated by programs “ The AI is broken in your level because you put the path node in the wrong place …” jeopardize the workflow

Spring Types of Representation Regular grid (square, hexagonal) Corner graph Waypoint graph [circle-based] Space-filling volume Navigation Mesh [triangle or poly- based] Understand the pros and cons Smooth technique (string-pulling) Hierarchical representation (thousands of waypoints … )

Spring Example Scene

Spring Regular Grid Simplest way: grid of squares, rectangles, triangles, hexagons, … Large number of grid cell (large memory footprint) Easy for “ random- access lookup ”

Spring Regular Grid (cont) Quality of path 4-way access Allow diagonal

Spring String-Pulling Line-of-sight test: remove P n if P n+1 is visible from P n-1 Can be very expensive Use Catmull-Rom spline to create a smooth curved path

Spring Alternative: Chase the Point Instead of tracking along the path, the agent chases a target point that is moving along the path Start with the target on the path ahead of the agent At each step: Move the target along the path using linear interpolation Move the agent toward the point location, keeping it a constant distance away or moving the agent at the same speed Works best for driving or flying games

Spring Chase the Point Demo

Spring Remark Grid, though seemingly can be implemented as arrays, should be implemented as (directed) graph: path can be directional A B C D

Spring Corner Graph Way points placed at convex corners of the obstacles O(n 2 ) complexity to determine edges in the graph Create sub optimal path Character walk very close to the wall (unnatural) different sized character requires different set of waypoints …

Spring Waypoint Graph Similar to corner graph; but waypoints are usually placed in the middle of rooms and hallways Also suffer from the O(n 2 ) complexity issue Works well in human architecture; tend to work poorly in large rooms and open terrain Usually require hand-tuning by level designer to perform well

Spring Circle-based Waypoints Try to resolve the O(n 2 ) complexity Add to each way point a radius parameter: indicate the amount of open space around it Generate edges between node pairs whose circles overlap Works well in open terrain, but in angular environment circles may not fill well (shown in figure)

Spring Space-Filling Volumes Ways of generation: drop-and-grow; merge from grid Works better (cp. circle-based) for angular environment

Spring NavMesh Cover the game world with convex polygons Handles indoor and outdoor terrain equally well Require storage of large number of polygons Convexity is required because … Triangulation, trapezoidalization

Spring Modified String-Pulling Besides eliminating unnecessary points on the path, path points can move along the link (shared edge) between two nodes

Spring Hierarchical Representation Break the navigation problem into levels [library in NYC to a diner in Seattle] Key step: identify zones; cluster nodes in search graph Indoor scene: use portal information

Navigation Set Hierarchy

Spring Introduction Developers are spending more resources in the attempt to deliver interesting and complex AI behavior Basic functions like path-finding should be cheap Precomputing navigation accomplishes this, with a price: memory

Spring Basics: The Transition Table Table requires n 2 entries

Spring Hierarchy Navigation set: a self-contained collection of nodes that requires no links to external nodes in order to complete a path from one internal nodes to another Interface nodes: the connective boundaries between navigation sets Interface set

Spring Example

Spring Constructing the Hierarchy Partitioning by automated means is a complex problem ! Objective: keep the number of interface nodes as low as possible Identify “ choke points ”

Spring Complete Path Planner Source & goal in same NavSet: trivial Four-step solution Source to boundary set Tier-2 paths: interface nodes Boundary set to Target From combinations; select the one with least cost Performance depends on the number of interface nodes in the source and goal sets only

Spring Example A3 A6 A7 C3 C5 C7

Spring Memory Optimization In the transition table, instead of storing node indices (which can be large and requires more bits), store edge indices (edge that lead to the node) I doubt this will work. How to know which node a particular edge leads to?

Hunting Down the Player in a Convincing Manner

Spring Introduction Require NPCs to convincingly chase and hunt down the player When a guard has spotted the player, he begins pursuit Routing player ’ s position to a path planner generate a shortest-path may let the player feel cheated Interesting game play: lure the NPC into regions then double back to escape

Spring Facility: Know the positions of target player and hunting character (NPC) Visibility test from NPC to player Three scenarios Player is visible (by the NPC) Player was recently seen Player has never been seen

Spring Scenarios Scenario One: Change from hunting state to attack state Scenario Two: NPC moves to the last seen player location, should be stored by game engine

Spring Scenario Three Create intermediate destination to approach the player Generate random direction and travel distance Successive application