SlideShare a Scribd company logo
1 of 41
Download to read offline
Path Planning with
Inventory-Driven
Jump-Point-Search
DAVIDE AVERSA, SEBASTIAN SARDINA, STAVROS VASSOS
1
Motivation
In videogames navigation based on
items, events or agent capabilities
(e.g., power-up, equipment, etc.) is
very common.
Usually these challenges are designed
for the players. However, often we
want other agents in the game to solve
the same challenges.
2
Motivation
The classical and academic answer to this problem is:
◦Yes! Planning! :)
3
Motivation
The classical and academic answer to this problem is:
◦Yes! Planning! :)
However, in game related community the reactions is
◦Yes… well… planning. :
4
Motivation
So we tried to answer the question:
What if we can add this high-level reasoning directly in the
pathfinding search?
Thus, we defined a limited subset of planning problems and
investigated how it is possible to solve these problems and
the pathfinding task at the same time.
5
Problem Definition
6
Problem Definition: Input
We want a pathfinding algorithm which takes as input:
◦ A grid-based map 𝑀.
◦ A subset 𝑂 ⊆ 𝑀 of blocked nodes (e.g., walls).
◦ A function adj : 𝑀 → 2 𝑀
denoting the adjacency relation among
nodes.
◦ A set of items 𝑰 that may be scattered in the map.
◦ A function req : 𝑴 → 𝟐 𝑴
stating which items are required to
traverse a node
◦ A starting node S and a destination node G.
7
Problem Definition: Goal
We want to use this
information to find the
optimal path from S to G
under the constraint that
some locations along the
path may require the agent
to have previously visited
other special nodes.
8
Problem Definition: The Challenge
G
For instance: it is better to follow the purple route (taking the key and
traversing the door) or the green one looking for a complete alternative route?
9
Problem Definition: The Challenge
With more than one key, the problem becomes
way more difficult!
10
Problem Definition: Proposed Solution
In this work we present Inventory-JPS, an
“inventory-driven” variant of Jump Point Search that
preserves the symmetry breaking advantages of JPS
in the extended setting of navigation with
item/capabilities constraints.
11
Jump Point Search
12
Jump Point Search
JPS is a recent technique that provides an exceptional
fast and optimal pathfinding on uniform-cost
grid-based maps.
It is based on a massive pruning mechanism that
remove from the open list every node but the one
that may require a change of direction (jump points).
13
How Jump Point Search works
Starting from the starting point S, JPS starts
performing a local search over the main 8
directions. We can call this beams.
For every beam, the algorithm searches for:
◦ The Goal
◦ A point in which the optimal path may
change direction. This is a point who
contains a forced neighbor.
14
How JPS Works
◦ If a beam ends on a obstacle, the beam is completely discarded.
◦ If a beam contains the goal or a forced neighbor, the node is
added to the open list as a jump point.
15
How JPS Works
◦Searching for forced neighbors involves only local search.
At each step on the beam, only the 8 tiles around the
current tile are taken into account during the search.
◦When the goal is found, jump points are connected
backwards with straight horizontal, vertical or diagonal
lines in order to find the final optimal path.
16
Inventory Driven JPS
17
Inventory-Driven JPS
Inventory-Driven Jump Point Search (Inventory-JPS) is
obtained by modifying JPS in three simple ways.
18
First Modification
The first modification involves extending the state
representation to account not just for the location of the
agent, but also the current inventory.
<x, y> <i1,i2,…,in>
Binary Representation
Item StatePosition State
19
First Modification
1 “Map” for every
combination of
items.
2 𝑘 layers
with 𝑘
keys/items
𝒌 𝟏
𝒌 𝟐
Position
Inventory
20
Second Modification
The second modification to JPS involves treating any
node containing some capability or object as an
“intermediate” goal.
We call such jump point nodes, inventory jump
points.
21
Third Modification
So, the third modification included in Inventory-JPS
is to treat inventory jump point nodes as the
starting node, thus applying the jumping process
towards all possible directions.
22
Experiments
23
Inventory-JPS Experiments
We have implemented and tested our algorithm in Python
on a single core Intel i7 3.2GHz machine.
The goal is to verify how the item overhead behaves on
different items and doors distributions with respect to JPS
without item capabilities.
24
Experiment 1
Random placement of unnecessary keys over real game maps;
analysis per number of keys.
1. We took all the dataset of MovingAI of 512x512 Baldur’s
Gate map.
2. We evenly distributed different number of keys on the map
and no door (so that no key is really necessary).
With this experiment we can measure the direct overhead of
Inventory-JPS over JPS.
25
Experiment 1
The overhead increment is linear
and meaningful (However 100
keys are really a lot).
26
Experiment 2
Placement of unnecessary keys on the path over real game
maps; analysis per number of keys.
We are in the same setting of Experiment 1 but, this time,
keys are added along the optimal path.
In particular we want to verify the behavior when keys are
at the beginning (BEG), at the end (END) or evenly
distributed on the path (MID).
27
Experiment 2
Overhead is bigger if keys are concentrated
at the beginning of the path.
28
Experiment 3
Placement of unnecessary keys on the path over real
game maps; analysis per path length.
Same as Experiment 2 but this time we want to look
at the behavior over the different path lengths.
29
Experiment 3
Same as Experiment 2
but this time we want
to look at the behavior
over the different path
lengths.
30
Experiment 4
Incremental scenario of necessary keys over
synthetic maps; analysis per number of keys.
This time we start building artificial maps in which
keys are necessary in order to reach the goal.
31
Necessary keys usually perform
better. Sequential keys
(when a key is necessary to reach the next key)
is usually faster then Detour
(when multiple keys are available on the map
and the agent has to go back and forth to get
them).
Experiment 4
32
Experiment 5
Key performance overhead for unreachable destinations.
We want to see how the performance decays when there
are many keys but the destination is unreachable.
33
Unreachability is the
biggest problem in
Inventory-JPS because
it forces the algorithm
to fully search every
item state.
Experiment 5
34
Conclusions
35
Wrap up
1. Inventory-JPS has zero overhead if there are no
keys on the map (so it is “free” if keys are not
required).
2. If there are keys on the map, only the keys who
enter in the search horizon actually add
computational complexity to the search.
36
Wrap up
3. When a key enters the search boundaries, its
impact on the final performance depends on its
relative distance from the goal (keys far away from
the goal are more “heavy” than keys at the end of a
path).
4. On common sizes (3-4 keys for map), the algorithm
performs very well even without optimizations.
37
Wrap up
5. The worst scenario is when there are many keys
and it is not possible to find a path (because we
need to search every key-state combination).
38
Future Work
1. Solve the problem in practical time even for non-
JPS pathfinding algorithms.
2. The basic idea involves looking to a new optimal
solution that uses incremental-search inspired
ideas in order to avoid duplicate search in areas
that are not affected by the inventory state or that
are in common among several “item layers”.
39
Future Work
We already have some optimization which can cut by
50% the computational cost shown in this
presentation.
40
Thank you!
41

More Related Content

Similar to Path Planning with Inventory-Driven Jump-Point-Search

(Radhika) presentation on chapter 2 ai
(Radhika) presentation on chapter 2 ai(Radhika) presentation on chapter 2 ai
(Radhika) presentation on chapter 2 ai
Radhika Srinivasan
 
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearch
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearchJarrar.lecture notes.aai.2011s.ch3.uniformedsearch
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearch
PalGov
 
unit-1-l3AI..........................ppt
unit-1-l3AI..........................pptunit-1-l3AI..........................ppt
unit-1-l3AI..........................ppt
ShilpaBhatia32
 
2.Problems Problem Spaces and Search.ppt
2.Problems Problem Spaces and Search.ppt2.Problems Problem Spaces and Search.ppt
2.Problems Problem Spaces and Search.ppt
Dr. Naushad Varish
 
02 problem solving_search_control
02 problem solving_search_control02 problem solving_search_control
02 problem solving_search_control
Praveen Kumar
 

Similar to Path Planning with Inventory-Driven Jump-Point-Search (20)

Parallel searching
Parallel searchingParallel searching
Parallel searching
 
Heuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligenceHeuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligence
 
Ai1.pdf
Ai1.pdfAi1.pdf
Ai1.pdf
 
(Radhika) presentation on chapter 2 ai
(Radhika) presentation on chapter 2 ai(Radhika) presentation on chapter 2 ai
(Radhika) presentation on chapter 2 ai
 
Searching techniques
Searching techniquesSearching techniques
Searching techniques
 
Popular search algorithms
Popular search algorithmsPopular search algorithms
Popular search algorithms
 
artifical intelligence final paper
artifical intelligence final paperartifical intelligence final paper
artifical intelligence final paper
 
Pruning and Preprocessing Methods for Inventory-Aware Pathfinding
Pruning and Preprocessing Methods for Inventory-Aware PathfindingPruning and Preprocessing Methods for Inventory-Aware Pathfinding
Pruning and Preprocessing Methods for Inventory-Aware Pathfinding
 
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearch
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearchJarrar.lecture notes.aai.2011s.ch3.uniformedsearch
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearch
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
 
unit-1-l3.ppt
unit-1-l3.pptunit-1-l3.ppt
unit-1-l3.ppt
 
unit-1-l3AI..........................ppt
unit-1-l3AI..........................pptunit-1-l3AI..........................ppt
unit-1-l3AI..........................ppt
 
2.Problems Problem Spaces and Search.ppt
2.Problems Problem Spaces and Search.ppt2.Problems Problem Spaces and Search.ppt
2.Problems Problem Spaces and Search.ppt
 
Sudoku solver
Sudoku solverSudoku solver
Sudoku solver
 
A* Algorithm
A* AlgorithmA* Algorithm
A* Algorithm
 
02 problem solving_search_control
02 problem solving_search_control02 problem solving_search_control
02 problem solving_search_control
 
AI: AI & Problem Solving
AI: AI & Problem SolvingAI: AI & Problem Solving
AI: AI & Problem Solving
 
AI: AI & problem solving
AI: AI & problem solvingAI: AI & problem solving
AI: AI & problem solving
 
5.5 back track
5.5 back track5.5 back track
5.5 back track
 
Artificial Intelligence_Searching.pptx
Artificial Intelligence_Searching.pptxArtificial Intelligence_Searching.pptx
Artificial Intelligence_Searching.pptx
 

Recently uploaded

TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 
CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)
Wonjun Hwang
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
FIDO Alliance
 

Recently uploaded (20)

TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptx
 
CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cf
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
الأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهلهالأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهله
 
How to Check GPS Location with a Live Tracker in Pakistan
How to Check GPS Location with a Live Tracker in PakistanHow to Check GPS Location with a Live Tracker in Pakistan
How to Check GPS Location with a Live Tracker in Pakistan
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
 
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptxCyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 

Path Planning with Inventory-Driven Jump-Point-Search

  • 1. Path Planning with Inventory-Driven Jump-Point-Search DAVIDE AVERSA, SEBASTIAN SARDINA, STAVROS VASSOS 1
  • 2. Motivation In videogames navigation based on items, events or agent capabilities (e.g., power-up, equipment, etc.) is very common. Usually these challenges are designed for the players. However, often we want other agents in the game to solve the same challenges. 2
  • 3. Motivation The classical and academic answer to this problem is: ◦Yes! Planning! :) 3
  • 4. Motivation The classical and academic answer to this problem is: ◦Yes! Planning! :) However, in game related community the reactions is ◦Yes… well… planning. : 4
  • 5. Motivation So we tried to answer the question: What if we can add this high-level reasoning directly in the pathfinding search? Thus, we defined a limited subset of planning problems and investigated how it is possible to solve these problems and the pathfinding task at the same time. 5
  • 7. Problem Definition: Input We want a pathfinding algorithm which takes as input: ◦ A grid-based map 𝑀. ◦ A subset 𝑂 ⊆ 𝑀 of blocked nodes (e.g., walls). ◦ A function adj : 𝑀 → 2 𝑀 denoting the adjacency relation among nodes. ◦ A set of items 𝑰 that may be scattered in the map. ◦ A function req : 𝑴 → 𝟐 𝑴 stating which items are required to traverse a node ◦ A starting node S and a destination node G. 7
  • 8. Problem Definition: Goal We want to use this information to find the optimal path from S to G under the constraint that some locations along the path may require the agent to have previously visited other special nodes. 8
  • 9. Problem Definition: The Challenge G For instance: it is better to follow the purple route (taking the key and traversing the door) or the green one looking for a complete alternative route? 9
  • 10. Problem Definition: The Challenge With more than one key, the problem becomes way more difficult! 10
  • 11. Problem Definition: Proposed Solution In this work we present Inventory-JPS, an “inventory-driven” variant of Jump Point Search that preserves the symmetry breaking advantages of JPS in the extended setting of navigation with item/capabilities constraints. 11
  • 13. Jump Point Search JPS is a recent technique that provides an exceptional fast and optimal pathfinding on uniform-cost grid-based maps. It is based on a massive pruning mechanism that remove from the open list every node but the one that may require a change of direction (jump points). 13
  • 14. How Jump Point Search works Starting from the starting point S, JPS starts performing a local search over the main 8 directions. We can call this beams. For every beam, the algorithm searches for: ◦ The Goal ◦ A point in which the optimal path may change direction. This is a point who contains a forced neighbor. 14
  • 15. How JPS Works ◦ If a beam ends on a obstacle, the beam is completely discarded. ◦ If a beam contains the goal or a forced neighbor, the node is added to the open list as a jump point. 15
  • 16. How JPS Works ◦Searching for forced neighbors involves only local search. At each step on the beam, only the 8 tiles around the current tile are taken into account during the search. ◦When the goal is found, jump points are connected backwards with straight horizontal, vertical or diagonal lines in order to find the final optimal path. 16
  • 18. Inventory-Driven JPS Inventory-Driven Jump Point Search (Inventory-JPS) is obtained by modifying JPS in three simple ways. 18
  • 19. First Modification The first modification involves extending the state representation to account not just for the location of the agent, but also the current inventory. <x, y> <i1,i2,…,in> Binary Representation Item StatePosition State 19
  • 20. First Modification 1 “Map” for every combination of items. 2 𝑘 layers with 𝑘 keys/items 𝒌 𝟏 𝒌 𝟐 Position Inventory 20
  • 21. Second Modification The second modification to JPS involves treating any node containing some capability or object as an “intermediate” goal. We call such jump point nodes, inventory jump points. 21
  • 22. Third Modification So, the third modification included in Inventory-JPS is to treat inventory jump point nodes as the starting node, thus applying the jumping process towards all possible directions. 22
  • 24. Inventory-JPS Experiments We have implemented and tested our algorithm in Python on a single core Intel i7 3.2GHz machine. The goal is to verify how the item overhead behaves on different items and doors distributions with respect to JPS without item capabilities. 24
  • 25. Experiment 1 Random placement of unnecessary keys over real game maps; analysis per number of keys. 1. We took all the dataset of MovingAI of 512x512 Baldur’s Gate map. 2. We evenly distributed different number of keys on the map and no door (so that no key is really necessary). With this experiment we can measure the direct overhead of Inventory-JPS over JPS. 25
  • 26. Experiment 1 The overhead increment is linear and meaningful (However 100 keys are really a lot). 26
  • 27. Experiment 2 Placement of unnecessary keys on the path over real game maps; analysis per number of keys. We are in the same setting of Experiment 1 but, this time, keys are added along the optimal path. In particular we want to verify the behavior when keys are at the beginning (BEG), at the end (END) or evenly distributed on the path (MID). 27
  • 28. Experiment 2 Overhead is bigger if keys are concentrated at the beginning of the path. 28
  • 29. Experiment 3 Placement of unnecessary keys on the path over real game maps; analysis per path length. Same as Experiment 2 but this time we want to look at the behavior over the different path lengths. 29
  • 30. Experiment 3 Same as Experiment 2 but this time we want to look at the behavior over the different path lengths. 30
  • 31. Experiment 4 Incremental scenario of necessary keys over synthetic maps; analysis per number of keys. This time we start building artificial maps in which keys are necessary in order to reach the goal. 31
  • 32. Necessary keys usually perform better. Sequential keys (when a key is necessary to reach the next key) is usually faster then Detour (when multiple keys are available on the map and the agent has to go back and forth to get them). Experiment 4 32
  • 33. Experiment 5 Key performance overhead for unreachable destinations. We want to see how the performance decays when there are many keys but the destination is unreachable. 33
  • 34. Unreachability is the biggest problem in Inventory-JPS because it forces the algorithm to fully search every item state. Experiment 5 34
  • 36. Wrap up 1. Inventory-JPS has zero overhead if there are no keys on the map (so it is “free” if keys are not required). 2. If there are keys on the map, only the keys who enter in the search horizon actually add computational complexity to the search. 36
  • 37. Wrap up 3. When a key enters the search boundaries, its impact on the final performance depends on its relative distance from the goal (keys far away from the goal are more “heavy” than keys at the end of a path). 4. On common sizes (3-4 keys for map), the algorithm performs very well even without optimizations. 37
  • 38. Wrap up 5. The worst scenario is when there are many keys and it is not possible to find a path (because we need to search every key-state combination). 38
  • 39. Future Work 1. Solve the problem in practical time even for non- JPS pathfinding algorithms. 2. The basic idea involves looking to a new optimal solution that uses incremental-search inspired ideas in order to avoid duplicate search in areas that are not affected by the inventory state or that are in common among several “item layers”. 39
  • 40. Future Work We already have some optimization which can cut by 50% the computational cost shown in this presentation. 40