CSCI 4310 Lecture 8: Path Planning. Book Buckland Ch. 8.

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

Review: Search problem formulation
AI Pathfinding Representing the Search Space
An Introduction to Artificial Intelligence
§3 Shortest Path Algorithms Given a digraph G = ( V, E ), and a cost function c( e ) for e  E( G ). The length of a path P from source to destination.
1 Constraint Satisfaction Problems A Quick Overview (based on AIMA book slides)
* Bellman-Ford: single-source shortest distance * O(VE) for graphs with negative edges * Detects negative weight cycles * Floyd-Warshall: All pairs shortest.
Navigation Set Hierarchy Tom Gianos Chapter 2.2. Mike Dickheiser Works (worked?) for Red Storm Entertainment Works (worked?) for Red Storm Entertainment.
§2 Topological Sort 〖 Example 〗 Courses needed for a computer science degree at a hypothetical university How shall we convert this list into a graph?
Pathfinding Basic Methods.
Lecture 12: Revision Lecture Dr John Levine Algorithms and Complexity March 27th 2006.
CSE 380 – Computer Game Programming Pathfinding AI
UNINFORMED SEARCH Problem - solving agents Example : Romania  On holiday in Romania ; currently in Arad.  Flight leaves tomorrow from Bucharest.
Algorithm Strategies Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
CPSC 322, Lecture 9Slide 1 Search: Advanced Topics Computer Science cpsc322, Lecture 9 (Textbook Chpt 3.6) January, 23, 2009.
17-Jun-15 Searching in BeeperHunt (Mostly minor variations on old slides)
03/09/2007CSCI 315 Operating Systems Design1 Memory Management Notice: The slides for this lecture have been largely based on those accompanying the textbook.
Uninformed Search Reading: Chapter 3 by today, Chapter by Wednesday, 9/12 Homework #2 will be given out on Wednesday DID YOU TURN IN YOUR SURVEY?
CS 206 Introduction to Computer Science II 03 / 30 / 2009 Instructor: Michael Eckmann.
Solving problems by searching
Chapter 5.4 Artificial Intelligence: Pathfinding.
State-Space Searches. 2 State spaces A state space consists of –A (possibly infinite) set of states The start state represents the initial problem Each.
State-Space Searches.
Using Abstraction to Speed Up Search Robert Holte University of Ottawa.
Chapter 5.4 Artificial Intelligence: Pathfinding.
Lab 3 How’d it go?.
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.
Chapter 9 – Graphs A graph G=(V,E) – vertices and edges
1 Pertemuan 20 Teknik Routing Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0.
Artificial Intelligence in Game Design
WAES 3308 Numerical Methods for AI
© 2006 Pearson Addison-Wesley. All rights reserved14 A-1 Chapter 14 Graphs.
Path Planning Part I: Search Space Representation Part II: Table Lookup Path Finder Path III: Convincing Hunting Ref: AIWisdom 2.
Representing and Using Graphs
Shortest Path Problem Weight of the graph –Nonnegative real number assigned to the edges connecting to vertices Weighted graphs –When a graph.
Introduction to search Chapter 3. Why study search? §Search is a basis for all AI l search proposed as the basis of intelligence l inference l all learning.
Introduction to search Chapter 3. Why study search? §Search is a basis for all AI l search proposed as the basis of intelligence l all learning algorithms,
State-Space Searches. 2 State spaces A state space consists of A (possibly infinite) set of states The start state represents the initial problem Each.
Artificial Intelligence in Game Design Dynamic Path Planning Algorithms.
Informed search strategies Idea: give the algorithm “hints” about the desirability of different states – Use an evaluation function to rank nodes and select.
Christopher Moh 2005 Competition Programming Analyzing and Solving problems.
WORLD NAVIGATION Don’t Fall Asleep Through These Topics  Tile Graphs  Points of Visibility  NavMesh  Path Smoothing  Hierarchical Pathfinding.
Review: Tree search Initialize the frontier using the starting state While the frontier is not empty – Choose a frontier node to expand according to search.
CSCI 4310 Lecture 2: Search. Search Techniques Search is Fundamental to Many AI Techniques.
Ricochet Robots Mitch Powell Daniel Tilgner. Abstract Ricochet robots is a board game created in Germany in A player is given 30 seconds to find.
Union By Rank Ackermann’s Function Graph Algorithms Rajee S Ramanikanthan Kavya Reddy Musani.
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.
CSCI 4310 Lecture 4: Search 2 – Including A*. Book Winston Chapters 4,5,6.
Beard & McLain, “Small Unmanned Aircraft,” Princeton University Press, 2012, Chapter 12: Slide 1 Chapter 12 Path Planning.
CMPT 463. What will be covered A* search Local search Game tree Constraint satisfaction problems (CSP)
COMPUTER NETWORKS CS610 Lecture-17 Hammad Khalid Khan.
Graphs - II CS 2110, Spring Where did David leave that book? 2.
Review IMGD Engine Architecture Types Broadly, what are the two architecture types discussed for game engines? What are the differences?
Chapter 3.5 Heuristic Search. Learning Objectives Heuristic search strategies –Best-first search –A* algorithm Heuristic functions.
Review: Tree search Initialize the frontier using the starting state
Depth First Seach: Output Fix
Heuristic Search Introduction to Artificial Intelligence
Ellen Walker CPSC 201 Data Structures Hiram College
Comp 245 Data Structures Graphs.
Path Planning in Discrete Sampled Space
A* Path Finding Ref: A-star tutorial.
Search Related Algorithms
Bidirectional Query Planning Algorithm
Problem Spaces & Search
Uninformed search Lirong Xia. Uninformed search Lirong Xia.
Uninformed search Lirong Xia. Uninformed search Lirong Xia.
Problem Spaces & Search
Reading: Chapter 4.5 HW#2 out today, due Oct 5th
Presentation transcript:

CSCI 4310 Lecture 8: Path Planning

Book Buckland Ch. 8

Navigation How to represent the areas that an agent can occupy in the world. Navigation Graph (NavGraph) Some More Sophisticated Methods

Nav Graph Works in 2 or 3 dimensions Trade-off Coarsely granulated Easier to manage Less space / time Finely granulated Can become unwieldy Necessary? Think of Grand Theft Auto style worlds But, allows a more realistic ‘feel’

Finely granulated Prevents some backtracking Smoother paths

Path smoothing Required with inverse proportion to granularity of the nav graph With a course graph, we may go backwards to find the nearest “source” node This looks unrealistic

Path smoothing Dijkstra or A* returns A-B-C because there is no A-C link in the underlying Nav Graph Our agent is not precisely constrained by the Nav Graph, So… if A-C is feasible (we don’t hit any obstacles) take it A B C

Path smoothing Raven_PathPlanner::SmoothPathEdges Can check adjacent edges (quicker) Or all edge combinations (slower but more precise) bool Raven_Bot::canWalkBetween (Vector2D from, Vector2D to) A B C

Nav Graph Can select a data structure that allows additional information at nodes or edges “Cost” of traversing the edge, to bias A* or Dijkstra Crossing water is more expensive, so choose a slightly longer path that avoids water Books refers to this as annotation Can also use information to determine state of player (swimming, running, etc.)

Spatial Partitioning Often need to know… Which node is closest to me Which node is closest to my destination Which health pack is closest to me Etc. Track each entity or track each location Spatial partition tracks entities at each location

Raven Path Planning Details Raven_PathPlanner class 1. Find the closest node to the bot’s current location 2. Find the closest node to the desired location (or item) 3. Use a search algorithm to find the least cost path between the two. * notice we did not say shortest

Dijkstra vs. A* If we have a good heuristic, A* works well When plotting a path from source to destination, we usually have a good distance estimate If no heuristic, can save some overhead with Dijkstra Such as when searching for the nearest power-up. We may not know where it is

Raven Details Request a path // Given an item type, this method determines the closest reachable graph node // to the bot's position and then creates a instance of the time-sliced // Dijkstra's algorithm, which it registers with the search manager bool RequestPathToItem(unsigned int ItemType); // Given a target, this method first determines if nodes can be reached from // the bot's current position and the target position. If either end point // is unreachable the method returns false. // // If nodes are reachable from both positions then an instance of the time- // sliced A* search is created and registered with the search manager. the // method then returns true. bool RequestPathToPosition(Vector2D TargetPos);

Implementation A* is exponential in worst case And requires significant storage Depends on heuristic used

Implementation Book has several search speed-ups Given fixed cycles for path planning per game loop iteration 1. Pre-Calculated Paths 2. Time-Sliced Search 3. Hierarchical Search

Pre-Calculated Paths Dynamic programming ABCDE ABB BCC C D E A path from B To D should First Go To Node C Need to store Both sides if We are using A directed Nav Graph (A to B may Be different than B to A)

Pre-Calculated Paths in Raven Methods to call to build tables CreateAllPairsTable(const graph_type& G) Returns a 2-D Vector of ints Can also have pre-calculated costs Useful in goal evaluation in Chapter 9 Pre-calculated paths time space tradeoff

Time-Sliced Path Planning Modify search algorithm to allow a single iteration Call as many iterations as time allows Can incrementally request search paths to reduce burden on CPU

Hierarchical Path Planning High level course nav graph Plot general path Move to more detailed nav graph Good for large environments

Deformable Terrain Dynamically changing Nav Graph Destroying A Bridge Knocking Down a Wall

Deformable Terrain Requires a modifiable Nav Graph Fully deformable terrain has not come about yet because No pre-calculated paths can be generated (or they can, but many more are required and must be tied to state of the world) Increases in time for path request

Deformable Terrain Tony Stentz of Carnegie Mellon D* or Dynamic A* algorithm Useful under dynamic terrain

Navigating Problems Determine when you are blocked No forward progress Or Elapsed Time > (Destination.cost / Bot.maxSpeed) + Margin of Error