1 / 102

Objectives for Lecture 6: Pathfinding

Objectives for Lecture 6: Pathfinding. Depth of understanding. After the lecture you are able to…. 1. Chapter: Introduction 1.1 Navigation 1.2 Modelling Streets with Graphs 2. Chapter: Algorithms 2.1 British Museum Algorithm 2.2 Breadth First, Depth First, Best First

omer
Télécharger la présentation

Objectives for Lecture 6: Pathfinding

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Objectives for Lecture 6: Pathfinding Depth of understanding • After the lecture you are able to…

  2. 1. Chapter: Introduction 1.1 Navigation 1.2 ModellingStreetswith Graphs 2. Chapter: Algorithms 2.1 British Museum Algorithm 2.2 Breadth First, Depth First, Best First 2.3 Dijkstra, A* 3. Chapter: Application 4. Chapter: Summary

  3. Introduction – NavigationThe human approach https://mapstyle.withgoogle.com/

  4. Introduction – NavigationThe human approach https://mapstyle.withgoogle.com/

  5. Introduction – NavigationThe human approach https://mapstyle.withgoogle.com/

  6. The human approachtofindingroutes on a streetmapis a veryvisualone. Feasiblepathsaredevelopedbyvisuallytracing different streetlines in thegeneraldirectionofthetarget. Obstacles, deadendsandrestrictionsareintuitivelytakenintoaccount, although – in typicalroutingsituations – no intensive thinkingorreflectioniscarried out. The human actoffinding a pathbetween a startingpointand a destinationcanbeconsidered „intelligent“. As a matter offact, we do not understandthe human approachoffindingroutes on maps in detail. Hence, wecan not modelitdirectly. Instead, searchalgorithmshaveevolved, solvingthe same problemsbysupposedly different means. Somepopularonesoftheseshallbeintroduced in thislecture. The questionthatremainsiswhetheror not thepresentedalgorithmscanthemselvesbeconsidered „intelligent“ solelybecausetheysolve a problemthathumanssolvebymeansof human intelligence.

  7. Introduction – NavigationDefinition „The process or activity of accurately ascertaining one's position and planning and following a route.”https://en.oxforddictionaries.com/definition/navigation

  8. Introduction – NavigationDefinition 1. Navigation HourstoMinutes 2. Path Following MinutestoSeconds 3. Control/ Stabilization SecondstoMiliseconds

  9. Introduction –NavigationHistorical Approaches Paper Map Direct Transmission „Play“ SpecificPaths 1930 IterAvto Paper Map Gyroscope ScrollsMap 1981 electroGyrocator https://ndrive.com/brief-history-gps-car-navigation/

  10. Introduction –NavigationHistorical Approaches Digital Map Dead Reckoning Cassettes 1985 Etak Navigator Digital Color Map Dead Reckoning CD-ROM 1987 Toyota CD-ROM Navigation System https://ndrive.com/brief-history-gps-car-navigation/

  11. Introduction –NavigationHistorical Approaches Digital Color Map GPS 1990 Mazda Eunos Cosmo GPS Dead Reckoning MapMatching Speech Recognition Dynamic Routing Points of Interest (POI) Modern Navigation Systems https://ndrive.com/brief-history-gps-car-navigation/

  12. Introduction –NavigationWhatisneededforcarnavigation?

  13. Introduction – ModellingStreetswithGraphsWhatneedstobemodelled? Road GeometryPosition Length Start - End Road ConnectivityIntersections ConnectionsFly-Over Road AttributesTurn Restrictions Speed Limits Type Segment Segment 2 Segment 1

  14. Introduction – ModellingStreetswithGraphsData Sources GPS Tracks SatelliteImagery https://www.maps.google.de https://buy.garmin.com/de-DE/DE/p/550460

  15. Introduction – ModellingStreetswithGraphsOSM Open SteetMap (OSM) • Worldwide Map Data • Free • Started 2004 in London • 1 000 000 ContributingUsers • DefinesData Modelfor Mapping https://upload.wikimedia.org/wikipedia/commons/thumb/b/b0/Openstreetmap_logo.svg/1200px-Openstreetmap_logo.svg.png

  16. Introduction – ModellingStreetswithGraphsOSM Nodes Definedbylatitude, longitudeandnode id. Representsarbitrarylocations.Attributes specifiedbytags. Node_ID = 1 Lat = 48.1 Lon = 11.5 Node_ID = 2 Lat = 48.4 Lon = 12.5 k : highway v : traffic light k : highway v : bus_stop A tag consistsof a keyand a value. Tags describefeaturesofmapelements. Keys andvaluesarefreetext but conventionsexist.

  17. Introduction – ModellingStreetswithGraphsOSM Ways Definedby an orderedsetofnodes. Groups nodesintolines. Attributes specifiedbytags. Way_ID = 1 Node_ID = 1 Lat = 48.1 Lon = 11.50 Node_ID = 2 Lat = 48.1 Lon = 11.51 Node_ID = 3 Lat = 48.1 Lon = 11.52 k : highway v : primary A tag consistsof a keyand a value. Tags describefeaturesofmapelements. Keys andvaluesarefreetext but conventionsexist.

  18. Introduction – ModellingStreetswithGraphsOSM Relations Definedby an orderedlistofnodes, waysand/orrelations. Defineslogicalorgeographicrelationshipsbetweenotherelements. Relation_ID = 1 A tag consistsof a keyand a value. Tags describefeaturesofmapelements. Keys andvaluesarefreetext but conventionsexist.

  19. Introduction – ModellingStreetswith GraphsGraphs – Basic Elements Node Directed Edge Undirected Edge

  20. Introduction – ModellingStreetswith GraphsGraphs– Basic Elements Weighted Edge 3 Unweighted Edge Edge weightsareinterpretableascost(e.g. time, distance …)

  21. Introduction – ModellingStreetswithGraphsGraphs– Formal Description

  22. Introduction – ModellingStreetswithGraphsFrom OSM toRoutable Graphs Initial Graph OSM Data providesgeometryandspeedlimits 50 km/h 50 km/h 50 km/h 50 km/h 30 km/h 50 km/h 30 km/h 30 km/h

  23. Introduction – ModellingStreetswithGraphsFrom OSM toRoutable Graphs Augmented Graph Edge weights like distancesandtimespansarecalculated 100 m 7.2 s 100 m 7.2 s 50 m 3.6 s 80 m 5.8 s 30 m 3.6 s 100 m 7.2 s 40 m 4.8 s 100 m 12 s

  24. Introduction – ModellingStreetswithGraphsFrom OSM toRoutable Graphs Compressed Graph Graph compressionreducescomplexity: Reductionofcomputationaleffort 100 m 7.2 s 150 m 10.8 s 180 m 13 s 30 m 3.6 s 100 m 7.2 s 40 m 4.8 s 100 m 12 s

  25. Introduction – ModellingStreetswithGraphsFrom OSM toRoutable Graphs Compressed Graph withturn restrictionsandturn penalties Turn restrictionsarederivedfrom OSM tags, turn penaltiesmaybeintroducedfor time optimal routing 10.8 s 13 s 100 m 12 s

  26. Introduction – ModellingStreetswith GraphsLectureAssumptions

  27. Introduction –NavigationWhatisneededforcarnavigation?

  28. AlgorithmsOverview Routing GenerateRoutable Graph Determine Origin / Destination B B B A A A D D D Find Path C C C

  29. AlgorithmsSearch Trees A B C D D B Search Tree Graph A D C

  30. AlgorithmsSearch Trees {A} A B C D D {A, B} {A, B, D} {A, B, C} {A, B, C, D} A searchtreecanbemadefrom a graph Eachchildnodedenotes a paththatis a one-stepextensionofthepathdenotedbyitsparent Convertinggraphsintosearchtrees:Tracing out all possiblepathsuntilnofurtherextensionispossible

  31. AlgorithmsPathfinding: Problem Formulations B B • A : Find a Path • Depth First • Breadth First • Best First A A D D C C • B : Find an optimal Path • Dijkstra • A*

  32. AlgorithmsCompleteness A searchalgorithmiscompleteifitisguaranteedto find anexistingsolution in a finite amountof time. (Almost) all algorithms in thislecture

  33. AlgorithmsPathfindingExample Graph 8 5 4 3 6.4 5

  34. AlgorithmsGround Rules Example Graph Invalid Path PathsneverbitetheirowntailGenerally applicable

  35. AlgorithmsGround Rules Example Graph 1 TiesareresolvedlexicallyApplicableforexamplegraph 2 3

  36. Algorithms – British MuseumDescription • Algorithm: • Randomlyappend Nodes topathwhile not stuck. • Ifdestination was reached: Success • If stuck, startover

  37. AlgorithmsMunich Demo Graph

  38. AlgorithmsMunich Demo Graph Properties:1. BidirectionalEdges 2. StaticWeights 3. Weights = Distances 4. Main Roads 5. No Turn Restrictions 6. Basic Road Geometry

  39. Algorithms – British MuseumMunich Demo

  40. Algorithms – Depth FirstDescription • Algorithm:From „ArtificialIntelligence“ by Patrick H. Winston • Form a one-element queueconsistingof a zero-lengthpaththatcontainsonlytherootnode • Untilthefirstpath in thequeueterminates at thegoalnodeorthequeueisempty, • Remove thefirstpathfromthequeue; createnewpathsbyextendingthefirstpathto all theneighborsofthe terminal node • Reject all newpathswithloops • Add thenewpaths, ifany, tothefrontofthequeue • Ifthegoalnodeisfound, announcesuccess; otherwiseannouncefailure

  41. Algorithms – Depth FirstDescription • Algorithm:From „ArtificialIntelligence“ by Patrick H. Winston • Form a one-element queueconsistingof a zero-lengthpaththatcontainsonlytherootnode • Untilthefirstpath in thequeueterminates at thegoalnodeorthequeueisempty, • Remove thefirstpathfromthequeue; createnewpathsbyextendingthefirstpathto all theneighborsofthe terminal node • Reject all newpathswithloops • Add thenewpaths, ifany, tothefrontofthequeue • Ifthegoalnodeisfound, announcesuccess; otherwiseannouncefailure Divingintothe Search Tree

  42. Algorithms – DepthFirstCharacteristic Search Tree S G narrowanddeep

  43. Algorithms – DepthFirstPathfindingExample Graph A

  44. Algorithms – DepthFirstPathfindingExample Graph A B

  45. Algorithms – DepthFirstPathfindingExample Graph A B C

  46. Algorithms – DepthFirstPathfindingExample Graph A B Backtrack Backtrace C

  47. Algorithms – DepthFirstPathfindingExample Graph A B C E

  48. Algorithms – DepthFirstPathfindingExample Graph A B C C E

More Related