Rapidly Exploring Random Tree

Move the endpoints or drop obstacles to see how a randomly growing tree finds a way to the goal.

What you are looking at

Square
The start where the tree takes root.
Ring
The goal the tree tries to reach.
Branches
Accepted connections between sampled positions.
Bold path
The route back along the tree after it reaches the goal.

Try this

  1. Tap empty space to add an obstacle and see the tree regrow around it.
  2. Drag the start or goal to make the tree search a different part of the map.

Key idea

An RRT expands toward random samples, rejecting connections that cross obstacles until a branch reaches the goal.