Completed: / exercises

HOMEWORK 2: Discrete Planning, Geometric Modeling.

Due date: 2026-03-29 23:59.
Recommended Resources:

Question 1: Value Iteration vs. Dijkstra, Running Times

In this exercise, you will experimentally compare value iteration and forward Dijkstra search for grid-based path planning.
You may use the provided implementation valit_grid.py from: https://github.com/alexanderjlavalle/RPPL
The Boolean variable use_dijkstra switches between the two methods; alternatively, you may use the GUI.

(a) Experimental Setup

Run both algorithms on at least three different grid worlds. You may:
  • Use the provided examples, or
  • Generate your own environments (e.g., using draw_circles.py).
Include challenging cases, such as:
  • Dense obstacle fields,
  • Narrow passages,
  • Varying goal distances.

(b) Parameter Study

For each environment, systematically vary:
  • Grid resolution,
  • Neighbor radius,
  • Obstacle arrangement.
Measure:
  • Running time,
  • Number of states explored.
Summarize your results in a table which reveals/explains the trends in terms of running times and the number of states explored.

(c) Interpreting Your Results

Based on your experimental findings, determine which of the following statements are consistent with your results:
Warning: You have not logged in. You cannot answer.

Question 2: Value Iteration vs. Dijkstra, Path Quality

Using the same setup as in Question 1 (varying grid resolution, neighbor radius, and obstacle characteristics), analyze how these factors affect:
  • The number of stages in the plan,
  • The Euclidean length of the resulting path.
Based on your experimental findings, determine which of the following statements are consistent with your results:
Warning: You have not logged in. You cannot answer.

Question 3: Segment Intersection Test

Let (๐‘Ž, ๐‘) and (๐‘, ๐‘‘) be two line segments in general position (no three points are collinear). Let lt(ยท,ยท,ยท) denote the left-turn test. Consider the following proposition about whether the two segments intersect:
  • The segments (๐‘Ž, ๐‘) and (๐‘, ๐‘‘) intersect โŸบ lt(๐‘Ž, ๐‘, ๐‘‘) โ‰  lt(๐‘, ๐‘, ๐‘‘) and lt(๐‘Ž, ๐‘, ๐‘) โ‰  lt(๐‘Ž, ๐‘, ๐‘‘).
Which of the following statements are correct observations or reasoning steps in proving the above proposition?
Warning: You have not logged in. You cannot answer.

Question 4: Segment Intersection, Degenerate Cases

Explain what happens to the intersection test from Question 3 when general position is violated:
(a) The segments are collinear (all four points on the same line).
(b) One segment endpoint lies exactly inside the other segment.
(c) Propose an extension to handle both degenerate cases.
Which of the following are true?
Warning: You have not logged in. You cannot answer.

Question 5: Reading Configurations from a Figure

The figure above shows a house-shaped rigid body that can freely rotate and translate in the plane. The rigid body has 5 vertices forming a pentagon (square base + triangular roof). The reference point (โ—) is at the bottom-left corner of the house in the body frame, i.e., at (0, 0) in body coordinates. The vertices of the house are: (0,0), (2,0), (2,2), (1,3), (0,2) in the body frame.
The dark gray house is the original configuration ๐‘žโ‚€ = (0, 0, 0). Five transformed configurations Aโ€“E are shown in different colors. For each, determine the configuration ๐‘ž = (๐‘ฅ, ๐‘ฆ, ๐œƒ), (๐‘ฅ, ๐‘ฆ) โˆˆ โ„ยฒ and ๐œƒ โˆˆ ๐‘†ยน, by reading the reference point position and the rigid body rotation from the figure.
Which of the following statements are correct?
Warning: You have not logged in. You cannot answer.

Question 6: Configuration A

Refer to the figure showing configurations Aโ€“E of the house-shaped rigid body. Configuration A is the blue house.
For a configuration ๐‘ž = (๐‘ฅ, ๐‘ฆ, ๐œƒ), a point in the body frame coordinate system (๐‘Ž, ๐‘) is transformed to the world coordinates (๐‘Žโ‚, ๐‘โ‚) by:
\begin{bmatrix} a_1 \\ b_1 \end{bmatrix} = \begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix} \begin{bmatrix} a \\ b \end{bmatrix} + \begin{bmatrix} x \\ y \end{bmatrix} \\\
Which of the following statements about the configuration A are correct?
Warning: You have not logged in. You cannot answer.

Question 7: Configuration B

Configuration B is the teal/green house.
Which of the following statements are correct about configuration B?
Warning: You have not logged in. You cannot answer.

Question 8: Configuration C

Configuration C is the coral-red house.
Which of the following statements are correct about configuration C?
Warning: You have not logged in. You cannot answer.

Question 9: Configuration D

Configuration D is the deep-pink house.
Which of the following statements are correct about configuration D?
Warning: You have not logged in. You cannot answer.

Question 10: Configuration E

Configuration E is the purple house.
Which of the following statements are correct about configuration E?
Warning: You have not logged in. You cannot answer.

Authors

Anna LaValle
?