1 / 32

Graphs

Graphs. David Johnson. Describing the Environment. How do you tell a person/robot how to get somewhere ? Tell me how to get to the student services building…. World Representation. Landmarks Paths/Roads Map This is abstracted as a graph Not in the sense of a plot. Graphs.

yeo-sexton
Download Presentation

Graphs

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. Graphs David Johnson

  2. Describing the Environment • How do you tell a person/robot how to get somewhere? • Tell me how to get to the student services building…

  3. World Representation • Landmarks • Paths/Roads • Map • This is abstracted as a graph • Not in the sense of a plot

  4. Graphs • A graph is a set of landmarks and the paths between them • A graph G has • Set of vertices (or nodes) V • Set of edges E • A graph is a classic data structure in CS V1 E1 V2 E2 V3

  5. Graphs • A directed graph means • E(A,B) does not imply E(B,A) • What kind of robot would need a graph that is not bidirectional? • Edges may have weights • Where would this be appropriate? V1 E1 1.4 V2 2.6 E2 V3

  6. Paths • A path is a sequence of vertices such that for Vi and Vi+1 Ei,i+1 exists • A graph is connected if there is a path between all V • For what kind of robot and environment would this not be true? V1 E1 1.4 V2 2.6 E2 V3

  7. Imagine a simple robot • What is the simplest kind of robot you can think of?

  8. Point Robots • A point robot can move along the infinitesimal width edges of a graph. • Path planning for this simple case is just searching a graph for a path.

  9. Finding Paths • Given a start and end, how do we find a path between them? V1 V1 V3 V7 V8 V2 V4 V6 V5

  10. Depth First Search (DFS) • Always take the first option V1 V1 V3 V7 V8 V2 V4 V6 V5

  11. Depth First Search (DFS) • Always take the first option V1 V1 V3 V7 V8 V2 V4 V6 V5

  12. Depth First Search (DFS) • Always take the first option V1 V1 V3 V7 V8 V2 V4 V6 V5

  13. Depth First Search (DFS) • Always take the first option V1 V1 V3 V7 V8 V2 V4 V6 V5

  14. Depth First Search (DFS) • Always take the first option V1 V1 V3 V7 V8 V2 V4 V6 V5

  15. Depth First Search (DFS) • Always take the first option V1 V1 V3 V7 V8 V2 V4 V6 V5

  16. Depth First Search (DFS) • Always take the first option V1 V1 V3 V7 V8 V2 V4 V6 V5

  17. Breadth First Search (BFS) • Exhaust all possibilities at same level first V1 V1 V3 V7 V8 V2 V4 V6 V5

  18. Breadth First Search (BFS) • Exhaust all possibilities at same level first V1 V1 V3 V7 V8 V2 V4 V6 V5

  19. Breadth First Search (BFS) • Exhaust all possibilities at same level first V1 V1 V3 V7 V8 V2 V4 V6 V5

  20. Breadth First Search (BFS) • Exhaust all possibilities at same level first V1 V1 V3 V7 V8 V2 V4 V6 V5

  21. Representing a graph in Matlab • Demo

  22. Wavefront planner • Use BFS on a grid • Label cells with values • Start with zero • Expand from start • Add +1 to neighbors of current wavefront • Use gradient descent to search from goal to start

  23. Representations: A Grid • Distance is reduced to discrete steps • For simplicity, we’ll assume distance is uniform • Direction is now limited from one adjacent cell to another

  24. Representations: Connectivity • 8-Point Connectivity • (chessboard metric) • 4-Point Connectivity • (Manhattan metric)

  25. The Wavefront Planner: Setup

  26. The Wavefront in Action (Part 1) • Starting with the goal, set all adjacent cells with “0” to the current cell + 1 • 4-Point Connectivity or 8-Point Connectivity? • Your Choice. We’ll use 8-Point Connectivity in our example

  27. The Wavefront in Action (Part 2) • Now repeat with the modified cells • This will be repeated until goal is reached • 0’s will only remain when regions are unreachable

  28. The Wavefront in Action (Part 3) • Repeat again...

  29. The Wavefront in Action (Part 4) • And again...

  30. The Wavefront in Action (Part 5) • And again until...

  31. The Wavefront in Action (Done) • You’re done

  32. The Wavefront • To find the shortest path simply always move toward a cell with a lower number • The numbers generated by the Wavefront planner are roughly proportional to their distance from the goal Two possible shortest paths shown

More Related