Home▸Articles▸Algorithms & AI

RRT* Motion Planning: A Dynamic Approach to Pathfinding

A powerful algorithm for finding optimal paths in complex environments, RRT* has applications ranging from robotics to video game design.

mysimulator teamUpdated June 2026≈ 3 min read▶ Open the simulation

What is RRT* Motion Planning?

Rapidly-exploring random trees (RRT) and its improved variant, RRT*, are algorithms designed for motion planning in high-dimensional spaces. These algorithms construct a tree of possible paths from the start to the goal point, with each node representing a configuration space position.

The key innovation of RRT* is that it not only explores the space randomly but also restructures its tree by rewiring nodes to find shorter and more optimal paths, leading to asymptotically optimal solutions.

How Does It Work?

In each iteration of RRT*, a new node is generated in the configuration space by randomly sampling points. If this point lies within an obstacle-free region and is closer to the goal than any existing node, it becomes a candidate for connection. The algorithm then connects this node to its nearest neighbor with the least cost, ensuring that the tree grows efficiently.

The rewire step is crucial as it allows the tree to adapt and improve over time by potentially replacing suboptimal paths with shorter ones, thereby reducing the overall path length.

live demo · related simulation● LIVE

Why Does It Matter?

RRT* is particularly valuable in scenarios where the environment is highly dynamic or partially unknown. Its ability to efficiently explore and adapt makes it ideal for applications such as autonomous navigation, robotics, and video game pathfinding.

Moreover, RRT* can handle a wide range of constraints and obstacles, making it a versatile tool for solving complex motion planning problems.

Real-World Applications

In robotics, RRT* is used to plan paths for robots in cluttered environments. For instance, it can help a robot navigate through a factory floor with numerous obstacles and moving parts.

In video game design, RRT* can be employed to create realistic movement patterns for non-player characters (NPCs) that avoid obstacles while reaching their goals.

Frequently asked questions

What is the difference between RRT and RRT*?

RRT constructs a tree by randomly sampling points in the configuration space, but it does not rewire nodes to improve paths. In contrast, RRT* also explores randomly but includes a rewiring step that can replace suboptimal paths with shorter ones, leading to asymptotically optimal solutions.

How does RRT* handle dynamic environments?

RRT* is designed to adapt to changes in the environment by continuously re-evaluating and potentially rewiring its tree structure. This makes it suitable for scenarios where obstacles or the goal position may change over time.

Can RRT* be used in 2D environments as well?

Yes, RRT* can be applied to both 2D and 3D environments. The algorithm's principles remain the same regardless of the dimensionality of the space being explored.

What are some limitations of RRT*?

RRT* can be computationally intensive, especially in high-dimensional spaces or with a large number of obstacles. Additionally, its performance may degrade if the sampling distribution is poorly chosen or if the step size is not tuned appropriately.

Try it live

Everything above runs in your browser — open RRT* Motion Planning — Rapidly-Exploring Random Trees and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open RRT* Motion Planning — Rapidly-Exploring Random Trees simulation

What did you find?

Add reproduction steps (optional)