The 3D version races 40 independent noisy sample paths (a Monte Carlo view of the drift-diffusion model). This 2D companion computes the same physics from the opposite direction: instead of sampling individual trajectories, it directly numerically solves the Fokker-Planck (forward-Kolmogorov) equation for the entire probability-density field p(x,t) — the continuous distribution over every possible evidence trajectory at once:
∂p/∂t = -v·∂p/∂x + (σ²/2)·∂²p/∂x² (finite-difference, absorbing p=±a → 0)
flux into upper wall: J_upper(t) = (σ²/2)·p(a-dx,t)/dx
flux into lower wall: J_lower(t) = (σ²/2)·p(-a+dx,t)/dx
Every choice/RT statistic is read directly off that boundary flux — not counted from discrete finishers. "Simulated P(upper)" is the running ratio ∫J_upper / ∫(J_upper+J_lower), and "Mean decision time" is the flux-weighted average ∫t·(J_upper+J_lower)dt / ∫(J_upper+J_lower)dt. Both are compared live to the closed-form gambler's-ruin probability used by the 3D twin:
z = z0 + a, U = 2a
P(upper) = (1 - e^(-2vz/σ²)) / (1 - e^(-2vU/σ²)) (v ≠ 0)
Standalone verification (Node, no dependencies, six parameter sets incl. a stability stress test at small a/σ): the flux-integrated PDE solution matched the closed-form P(upper) to within ±0.4 percentage points, and an entirely independent 200,000-path Monte Carlo simulation of the same SDE matched both to within ±0.6 points, with residual PDE probability mass after the run below 1e-13 in every case — three independent computations of the same phenomenon agreeing to high precision.
- Drift rate v — steepens the density's drift toward the upper wall; near 0 the field splits its flux evenly.
- Boundary separation a — wider boundaries slow the field's decay and sharpen the eventual split (speed-accuracy tradeoff).
- Noise σ — more diffusion spreads the density faster in both directions, letting more mass reach the "wrong" wall even under a strong drift.
- Starting bias z₀/a — shifts the initial density packet off-center before the field starts evolving.
Real-world relevance: this Fokker-Planck view is exactly how the drift-diffusion model is solved analytically in the cognitive-science literature to derive predicted RT distributions and choice probabilities for experiment design — the sample-path view (3D twin) is what a single trial looks like; this density view is what the whole population of trials looks like at once.