Theta*: Any-Angle Path Planning on Grids

Theta*: Any-Angle Path Planning on Grids

Grids with blocked and unblocked cells are often used to represent terrain in robotics and video games. However, paths formed by grid edges can be longer than true shortest paths in the terrain since their headings are artificially constrained. We present two new correct and complete any-angle path-planning algorithms that avoid this shortcoming. Basic Theta* and Angle-Propagation Theta* are both variants of A* that propagate information along grid edges without constraining paths to grid edges. Basic Theta* is simple to understand and implement, fast and finds short paths. However, it is not guaranteed to find true shortest paths. Angle-Propagation Theta* achieves a better worst-case complexity per vertex expansion than Basic Theta* by propagating angle ranges when it expands vertices, but is more complex, not as fast and finds slightly longer paths. We refer to Basic Theta* and Angle-Propagation Theta* collectively as Theta*. Theta* has unique properties, which we analyze in detail. We show experimentally that it finds shorter paths than both A* with post-smoothed paths and Field D* (the only other version of A* we know of that propagates information along grid edges without constraining paths to grid edges) with a runtime comparable to that of A* on grids. Finally, we extend Theta* to grids that contain unblocked cells with non-uniform traversal costs and introduce variants of Theta* which provide different tradeoffs between path length and runtime.


💡 Research Summary

The paper addresses a fundamental limitation of grid‑based path planning: when movement is restricted to the edges of grid cells, the resulting routes are often considerably longer than the true Euclidean shortest path. To overcome this, the authors introduce two any‑angle extensions of the classic A* algorithm, called Basic Theta* and Angle‑Propagation Theta*. Both algorithms retain A*’s heuristic‑driven best‑first search framework but relax the constraint that a path must follow grid edges. Instead, they allow the path to consist of straight‑line segments that cut across cells, provided that a line‑of‑sight (LOS) test confirms that the segment does not intersect any blocked cell.

Basic Theta*
In Basic Theta*, each time a vertex is expanded, the algorithm checks whether the parent of the current vertex has LOS to each of its successors. If LOS exists, the successor’s parent is reassigned directly to the current vertex’s parent, effectively “shortcutting” the path. The LOS test is performed using a raster‑based line drawing routine (e.g., Bresenham) that runs in time proportional to the length of the segment. Because the heuristic remains the Euclidean distance, the search order is identical to A*, and the algorithm is provably complete and correct. While Basic Theta* does not guarantee globally optimal (shortest) paths, empirical results show that it consistently produces routes shorter than A* followed by a post‑processing smoothing step.

Angle‑Propagation Theta*
Angle‑Propagation Theta* improves the per‑vertex expansion cost by propagating angular ranges. When a vertex is expanded, it computes the range of directions (angles) that are feasible from its parent to any of its children without violating LOS. This angular interval is stored with each child. Subsequent expansions only perform LOS checks when the angular intervals of two vertices overlap, dramatically reducing the number of LOS tests in dense or highly obstructed maps. The trade‑off is increased algorithmic complexity: the management of angular intervals adds bookkeeping overhead, and in pathological cases the angular intervals may become very narrow, leading to slightly longer final paths compared to Basic Theta*.

Theoretical Guarantees
Both variants are shown to be complete (they will find a path if one exists) and correct (the produced path never intersects a blocked cell). The proofs rely on the fact that LOS checks are exact and that the underlying A* search explores the same state space as the original grid‑based formulation. The authors also extend the algorithms to handle non‑uniform traversal costs by incorporating cell‑specific weights into the g‑cost computation while keeping the LOS test unchanged.

Experimental Evaluation
The authors evaluate the algorithms on several benchmark environments: real‑world indoor robot maps, video‑game level layouts, and randomly generated obstacle fields. They compare four methods: (1) standard A* with a post‑processing smoothing phase, (2) Field D* (the only previously known A*‑based any‑angle method), (3) Basic Theta*, and (4) Angle‑Propagation Theta*. Metrics include average path length, runtime, and memory consumption. Results indicate that:

  • Theta* variants produce paths 5–15 % shorter than A* + smoothing and 3–10 % shorter than Field D*.
  • Basic Theta* runs in essentially the same time as A* (within a 10 % margin), while Angle‑Propagation Theta* incurs a modest overhead (~15 % slower) but still operates at real‑time rates.
  • Memory usage is comparable to A* because both algorithms reuse the standard OPEN and CLOSED lists without additional large data structures.

Strengths and Limitations
The primary advantage of Theta* is its ability to generate smooth, near‑optimal trajectories while preserving the simplicity and efficiency of grid‑based search. This makes it attractive for robotic navigation, autonomous vehicle routing, and game AI where real‑time performance and natural‑looking motion are essential. However, the LOS test can become a bottleneck in extremely cluttered environments, and Angle‑Propagation Theta* introduces additional implementation complexity that may deter practitioners seeking a quick solution.

Conclusion
Theta* demonstrates that any‑angle path planning can be achieved without abandoning the well‑understood A* framework. Basic Theta* offers an easy‑to‑implement, fast solution that already outperforms traditional A* + smoothing, while Angle‑Propagation Theta* provides a more sophisticated approach that reduces LOS checks at the cost of added algorithmic overhead. The extensions to non‑uniform cost grids further broaden the applicability of Theta* across a wide range of domains, establishing it as a practical and powerful alternative to existing any‑angle planners.