Random Walk Simulator

Simulate and visualize random walks in 1D, 2D, and 3D

Walk Configuration

Visualization Options

Help

What is a Random Walk?

A random walk is a mathematical model describing a path consisting of successive random steps. Each step's direction (and sometimes length) is determined randomly.

Applications:

  • Stock market modeling (price movements)
  • Molecular diffusion (Brownian motion)
  • Animal foraging behavior
  • Polymer physics
  • Network analysis
1D Random Walk

Movement along a line: at each step, move either left (-1) or right (+1) with equal probability.

Expected distance from origin: √n where n is the number of steps

Use case: Simple gambling scenarios, one-dimensional diffusion

2D Random Walk

Movement on a plane: at each step, move in a random direction (up, down, left, right, or any angle).

Expected distance from origin: √n

Use case: Particle diffusion, random search patterns

3D Random Walk

Movement in 3D space: at each step, move in a random direction in three dimensions.

Expected distance from origin: √n

Use case: Molecular motion in liquids/gases, 3D search algorithms

Biased Random Walk

A walk where certain directions are more likely than others. The bias parameter controls the strength of the directional preference.

Use case: Drift in physical systems, biased search algorithms

Lévy Flight

A random walk where step lengths follow a heavy-tailed probability distribution. Occasional very long steps allow for efficient exploration.

Use case: Animal foraging, optimization algorithms, financial modeling

Brownian Motion

Continuous random walk where steps are drawn from a Gaussian distribution. Models thermal motion of particles.

Use case: Financial mathematics (stock prices), physics (particle motion)

Key Statistics
  • Displacement: Distance between start and end positions
  • Max Distance: Furthest point reached from origin
  • Path Length: Total distance traveled
  • Efficiency: Displacement / Path Length (1.0 = straight line, 0.0 = returns to start)
  • Mean Squared Displacement: Average of squared distances, grows linearly with time for simple random walks