Random Walk Laboratory

How paths randomly chosen evolve.

The walks

More walks, steps, and directions take longer to simulate and draw. Your browser can only handle so much; large settings may slow things down.

About Random Walk Laboratory

I made this tool after reading this Pudding piece about pi π. Each dot may start from 0,0 but as random chance dictates where they walk, where will they end up? Explore how repeated random steps create large-scale patterns. Each step is 1 unit in length.

“Any heading” allows the dot to move in any direction, with all angles equally likely. This is the most basic random walk.

“Minimum turn from reverse” doesn't allow the dot to go directly back in the direction it just came from. Ever onward!

“Avoid visited points nearby” tells the dots to avoid going anywhere they have already been. As you experiment, you'll see this can result in dots that become trapped before they reach their total steps, as the only way to move is to where they have already been.

The color of each dot is made to more easily distinguish between different paths.

Learn more: MIT random walk introduction · Wikipedia.