HomeAlgorithms & AIRRT* Motion Planning in 2D — Informed Sampling

RRT* Motion Planning in 2D — Informed Sampling

Interactive 2D RRT* motion planner with Informed Sampling: watch a search tree grow through random sampling around circular obstacles in a flat configuration space, rewire toward lower cost, and — once a first path is found — restrict sampling to a shrinking ellipse for faster convergence.

Algorithms & AI2DAdvanced60 FPS📱 Mobile-adapted⇄ 3D version
2d-planning-algorithms ↗ Open standalone

RRT and RRT* are sampling-based motion-planning algorithms that solve "find a route from start to goal through obstacles" in continuous space without ever building a grid. This simulator grows the search tree in a flat 2D configuration space scattered with circular obstacles: each iteration samples a random point, connects the tree's nearest node toward it with a fixed step, and rejects the extension if it collides. In RRT* mode two extra passes run every iteration — choosing the cheapest nearby parent for the new node, then rewiring any neighbour that would get cheaper by routing through it — visibly straightening the tree as more iterations run. Because the configuration space is 2D, once a first path exists the planner can restrict further sampling to the Informed-RRT* ellipse — the set of points whose combined distance to start and goal cannot exceed the current best path cost — which is exactly the optimization real 2D path planners for warehouse robots and mobile platforms use to converge fast instead of continuing to waste samples on regions that could never shorten the route.

⚙ Under the hood

Watch a 2D RRT/RRT* search tree grow through random sampling around circular obstacles in a flat configuration space, then switch on Informed Sampling to restrict further samples to the shrinking cost ellipse once a first path is found.

RRTRRT-starmotion-planningpathfindingroboticsgraph-searchinformed-sampling2D

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)