Drunkard's Walk

A Diffusion Simulation

Imagine: the town drunk's been at it again! He's in the city square at a light post and is trying to get home. He's so inebriated however, he can only stagger in random directions from the light post. (Each step is a uniform unit distance). The question is:

How far is he likely to get from the light post after n steps?

This is a classic question in diffusion theory and this simple simulation is an attempt to model phenomena that occur in many places in the natural world. Read more about this interesting problem!


A walk defaults to 250 unit steps, taken in random directions within 360°.

  • 'Walk' Button: start or pause the movement
  • 'Reset' Button: when paused, restart app
  • 'Speed' slider: may be adjusted at any time
  • 'Goal' distance for a given step goal: the white circle
  • The summary table shows the walk summary and updates
  • Canvas dimensions are shown below the summary table

To customize a walk and/or restart a walk: Click 'Customize the Walk,' then:

  1. Select a random direction modality
  2. Select how many steps (Larger step values are shown unconnected and with a reduced transparency to show how the path overlaps)
  3. Select a target goal:
    • Stop when steps are achieved
    • Stop when the goal distance is achieved

Remember, any new customization will reset the app!


Example Walks

250StepDW
250 Steps, 360°
Goal 15.8 met
Canvas: [-30, 30], inc = 2
500StepDW
500 Steps, 90°
Goal 22.4 met
Canvas: [-38, 38], inc = 2
100StepDW
100 Steps, 60°
Goal 10 met
Canvas: [-24, 24], inc = 1
1000StepDW
1,000 Steps, 360°
Goal 31.6 met
Canvas: [-65, 65], inc = 5
10765StepDW
10,765 Steps, 360°
Forced Goal 70.7 met
Canvas: [-100, 100], inc = 10
25000StepDW
25,000 Steps, 360°
Goal 158.1 met
Canvas: [-200, 200], inc = 25
250StepDW
250 Steps, 360°
Goal 15.8 unmet
Canvas: [-30, 30], inc = 2
250StepDW
500 Steps, 45°
Goal 22.4 met
Canvas: [-38, 38], inc = 2
250000StepDW
25000 Steps, 360°
Goal 158.1 met
Canvas: [-200, 200], inc = 25