Inferensys

Glossary

RRT*

RRT* (Rapidly-exploring Random Tree Star) is an asymptotically optimal variant of the RRT algorithm that includes a rewiring step to continuously improve path cost as the tree grows.
Developer reviewing LLM cost optimization spreadsheet on laptop, calculator and coffee on desk, casual finance-technical moment.
ALGORITHM

What is RRT*?

RRT* (Rapidly-exploring Random Tree Star) is an asymptotically optimal, sampling-based motion planning algorithm.

RRT* is an extension of the Rapidly-exploring Random Tree (RRT) algorithm that introduces a rewiring step to continuously improve the cost of the path as the tree grows, guaranteeing convergence towards an optimal solution as the number of samples approaches infinity. It builds a tree of feasible trajectories from a start state by sampling the configuration space, but unlike basic RRT, it connects new samples to the lowest-cost parent within a local neighborhood and rewires existing nearby nodes if a cheaper path through the new node is found.

This cost-to-come optimization makes RRT* a foundational anytime algorithm for kinodynamic planning in robotics, where finding smooth, efficient paths for non-holonomic systems is critical. Its probabilistic completeness and asymptotic optimality balance exploration with incremental refinement, making it suitable for complex, high-dimensional spaces where deterministic planners struggle, though its convergence can be computationally intensive compared to its non-optimal predecessor.

ALGORITHM MECHANICS

Key Features of RRT*

RRT* (Rapidly-exploring Random Tree Star) is an asymptotically optimal sampling-based motion planning algorithm. It extends the basic RRT by incorporating a cost-based rewiring step, which continuously refines the tree to converge towards the optimal path as more samples are drawn.

01

Asymptotic Optimality

The defining property of RRT* is its asymptotic optimality. This guarantees that as the number of sampled states approaches infinity, the cost of the best-found path converges to the true optimal cost with probability one. This is a strict improvement over the basic RRT, which is only probabilistically complete (guaranteed to find a solution, but not necessarily the best one).

  • Key Mechanism: The rewiring step enables this property by allowing the algorithm to replace parent connections in the tree if a new, lower-cost connection to a node is discovered.
  • Practical Implication: In real-world applications with finite computation time, RRT* produces significantly better paths than RRT after the same number of iterations.
02

Cost-to-Come and Rewiring

RRT* maintains a cost-to-come value for every node in the tree, representing the total cost of the path from the root (start) to that node. The rewiring process is the core of RRT*'s optimization.

  • Near Node Selection: For a new sample x_new, the algorithm finds a set of near nodes within a ball of radius r(n) (which shrinks as the number of nodes n increases).
  • Best Parent Connection: It connects x_new to the near node that provides the minimum cost-to-come to x_new via a collision-free local path.
  • Rewiring Near Nodes: Crucially, it then checks if connecting existing near nodes to x_new* would lower their cost-to-come. If so, it rewires the tree by changing their parent to x_new`. This local optimization propagates cost improvements throughout the tree over time.
03

Incremental Optimization

RRT* is an anytime algorithm that provides a feasible solution quickly and then incrementally improves it. Unlike batch optimization methods that require a complete re-solve, RRT* refines the solution incrementally with each new sample.

  • Initial Solution: Like RRT, it finds an initial, possibly suboptimal, path relatively fast.
  • Continuous Refinement: Every new random sample offers an opportunity to discover a shorter path segment or a more efficient connection via the rewiring process.
  • Use Case: This makes it highly suitable for real-time replanning scenarios where computation time is bounded; the system can execute the current best path while the planner continues to refine it in the background.
04

Sampling-Based Exploration

As a sampling-based planner, RRT* does not require an explicit representation of the configuration space's obstacles. It explores the space by randomly sampling states and attempting to connect them to the growing tree.

  • Bias towards Exploration: The algorithm inherently biases growth towards large, unexplored regions of the space, making it efficient for high-dimensional problems (e.g., robotic arms with many joints).
  • Probabilistic Completeness: It shares the probabilistic completeness of RRT: if a feasible path exists, the probability of finding it approaches 1 as the number of samples goes to infinity.
  • Handles Complex Constraints: This random sampling approach allows it to naturally handle non-holonomic and kinodynamic constraints by using a steering function to generate feasible local paths between nodes.
05

Steering Function & Local Planning

A critical component of RRT* (and RRT) is the steering function. This function is responsible for generating a feasible, collision-free trajectory from a parent node x_near towards a target sample x_rand or x_new.

  • Role: It acts as a local planner. For holonomic systems, this may be a simple straight-line connection. For systems with dynamics (kinodynamic planning), it is a more complex controller that respects velocity and acceleration limits.
  • Connection Validation: The output of the steering function must be checked for collisions before a node is added to the tree.
  • Impact on Optimality: The quality and reachability of the steering function directly influence the efficiency of the search and the smoothness of the final path. Poor steering can limit the algorithm's ability to find the true optimum.
06

Relation to Other Planners

RRT* sits within a family of sampling-based and optimal planners, each with distinct trade-offs.

  • vs. RRT: The core differentiator is the rewiring for optimality. RRT finds a solution; RRT* improves it.
  • vs. PRM (Probabilistic Roadmap): PRM is a multi-query method that builds a global roadmap. RRT* is a single-query, tree-based method that is often more efficient for finding an initial solution.
  • vs. A/D/LPA***: These are graph-search algorithms optimal for discrete, low-dimensional grids. RRT* is designed for continuous, high-dimensional spaces where building a full graph is infeasible.
  • Evolution: RRT* has spawned many variants like Informed RRT* (which uses an ellipsoidal heuristic to focus sampling) and RRT*-Smart (which uses path optimization waypoints to guide sampling).
COMPARATIVE ANALYSIS

RRT* vs. Other Planning Algorithms

A feature and performance comparison of RRT* against other prominent path and motion planning algorithms used in robotics and autonomous systems.

Feature / MetricRRT* (Rapidly-exploring Random Tree Star)RRT (Rapidly-exploring Random Tree)A* / Lattice PlannerD* Lite / LPA*

Algorithm Type

Sampling-based, Asymptotically Optimal

Sampling-based, Probabilistically Complete

Search-based, Optimal (for given discretization)

Incremental Search-based, Optimal (for given graph)

Optimality Guarantee

Asymptotically optimal (converges to optimum)

None (finds a feasible path)

Optimal for the discretized graph

Optimal for the updated graph

Completeness Guarantee

Probabilistically complete

Probabilistically complete

Resolution complete

Resolution complete

Primary Use Case

High-dimensional C-space, kinodynamic planning

Quickly finding any feasible path in complex spaces

Grid-based or lattice-based navigation

Replanning in dynamic/unknown environments

Real-Time Replanning

Supports anytime improvement, not inherently incremental

Can be restarted, not inherently incremental

No, full replan required

Yes, designed for efficient incremental updates

Handles Dynamic Obstacles

Requires full re-sampling from scratch

Requires full re-sampling from scratch

No, static graph assumption

Yes, core capability via cost map updates

Path Quality

Continuously improves towards optimal

Often suboptimal, jagged

Optimal for graph, smooth if using motion primitives

Optimal for updated graph

Computational Cost per Replan

High (grows tree, performs re-wiring)

Moderate (grows tree)

Moderate to High (full graph search)

Low (focused search, reuses previous results)

Memory Usage

Moderate (tree structure)

Moderate (tree structure)

High (full graph in memory)

High (full graph plus search history)

Convergence Rate

Slower initial solution than RRT, then improves

Fast initial solution

Fast for moderate graph sizes

Fast for localized changes

RRT*

Frequently Asked Questions

RRT* (Rapidly-exploring Random Tree Star) is a foundational sampling-based motion planning algorithm. These questions address its core mechanics, applications, and how it compares to other planning methods in real-time replanning systems.

RRT* (Rapidly-exploring Random Tree Star) is an asymptotically optimal, sampling-based motion planning algorithm that incrementally builds a tree of feasible paths from a start state, continuously rewiring the tree to improve path cost as it grows towards a goal region. It works by iteratively sampling a random point in the configuration space, finding the nearest node in the existing tree, and extending a new node towards the sample. The key innovation over basic RRT is the rewiring step: after adding a new node, the algorithm checks if any nearby nodes in the tree could be reached with a lower total cost by using the new node as a parent, and rewires them if so. This process of cost-to-come propagation ensures the tree converges towards an optimal solution given sufficient runtime and samples.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.