- Tapping into Rhythm Music & Science, 2026
- Motivation & Working Memory BSc thesis, RUG, 2021
- Consciousness in Animals BA thesis, RUG, 2021
- Nothing posted yet.
Content goes here
An ensemble of random walkers taking one unit step per tick, in one dimension and two. The cloud spreads as the square root of time; an absorbing wall at the origin turns the walk into a first-passage problem, and a field turns diffusion into drift. How it works: Start releases the ensemble. The graphs average over every walker and demonstrate convergence to the theoretical curves as the simulation progresses, while the canvas draws only a handful of individual paths. The dotted lines on the graphs are the theoretical results, not fits to the data.
How it works
Start releases the ensemble. Every walker takes one unit step per tick: ±1 in one dimension, or one of four directions in two. Nothing else.
The canvas and the graphs do different jobs. The graphs average over the whole ensemble, thousands of walkers, none of them drawn. The canvas draws a handful of individual paths, the way sample paths are drawn in a textbook. Both counts are set independently in the control panel.
The 1-D view is the x(t) diagram, with time running across and position vertical, t = 0 pinned to the left. Both axes rescale in place so the whole history stays on screen. The dotted envelope is $\pm\sqrt{t}$, the scale the ensemble spreads at. The 2-D views draw each shown walker's recent path on a torus, so a walker leaving one edge returns at the opposite one. Only the drawing wraps: positions are stored unwrapped, so the measured $\langle r^2 \rangle$ is the true displacement rather than a value that saturates at the box size.
Variants:
1-D free and 2-D free are the plain walk. The position distribution is Gaussian and the mean squared displacement grows as $\langle r^2 \rangle = t$ in either dimension[1].
1-D on [0, ∞) puts an absorbing wall at the origin. Every walker is released at x0, set by the Release at slider, and a walker reaching 0 is absorbed: it stops existing and its path ends there, marked with a dot on the wall. The ensemble thins as the run goes on, so the surviving fraction is measured directly rather than inferred. The walk is recurrent, so every path ends eventually with probability 1[3], and yet the mean time to do so is infinite: first-passage times follow $P(t) \propto t^{-3/2}$, a tail heavy enough to diverge, and survival decays as $S(t) \propto t^{-1/2}$[4]. Since absorbed walkers are not replaced, the statistics come from however many were started.
2-D in a field biases the x-steps by b, giving each walker a mean drift of b/2 per step. b runs either way about zero. The walkers still spread diffusively about their centre, but that centre now moves linearly, so $\langle r^2 \rangle$ bends up away from the diffusive line as the ballistic term takes over.
Graphs:
The pair shown depends on the setup. For the free walks:
(a) position distribution P(x) in 1-D, or radial
distribution P(r) in 2-D, over the whole ensemble, against the Gaussian and
Rayleigh forms respectively.
(b) mean squared displacement
$\langle r^2 \rangle$ against t on log-log axes, against the diffusive
$\langle r^2 \rangle = t$. A slope of 1 is diffusion; the field setup bends
towards slope 2.
For the absorbing setup:
(a) first-passage time distribution P(t),
log-binned on log-log axes, against $t^{-3/2}$.
(b) surviving fraction S(t), the fraction of the
ensemble still walking, against $t^{-1/2}$.
References
- Einstein, A. (1905). Uber die von der molekularkinetischen Theorie der Warme geforderte Bewegung von in ruhenden Flussigkeiten suspendierten Teilchen. Ann. Phys. 322, 549-560. the diffusion law
- von Smoluchowski, M. (1906). Zur kinetischen Theorie der Brownschen Molekularbewegung und der Suspensionen. Ann. Phys. 326, 756-780. the random-walk derivation
- Pólya, G. (1921). Uber eine Aufgabe der Wahrscheinlichkeitsrechnung betreffend die Irrfahrt im Strassennetz. Math. Ann. 84, 149-160. recurrence of the walk in one and two dimensions
- Redner, S. (2001). A Guide to First-Passage Processes. Cambridge University Press, ISBN 978-0-521-65248-3. first-passage and survival exponents
