Simulation library
38 models across 8 fields. Every entry is an interactive model with an explanation, JavaScript and Python code, and a downloadable package.
Monte Carlo
- OS-001Monte Carlo πEstimate π from random points in a unit square and watch the error shrink like 1/√n.
- OS-002Monte Carlo integrationEstimate an integral as the average of f at random points, with an error bar you can compute.
- OS-003Buffon's needleDrop needles on a lined floor; the share that cross a line is 2ℓ/(πt), which gives an estimate of π.
- OS-004Monte Carlo option pricingPrice a European option as a discounted average payoff and check it against Black–Scholes.
- OS-005Metropolis–HastingsA Markov chain that samples any density known up to a constant; tune the step size and watch it mix.
Probability
- OS-006Coin flipFlip a fair or biased coin: the share of heads settles down, and long streaks keep happening.
- OS-007Dice rollRoll k dice with s sides and check the histogram of sums against the exact distribution.
- OS-008Birthday paradoxWhy 23 people give a better-than-even chance that two of them share a birthday.
- OS-009Monty Hall problemStay or switch? Thousands of games show when switching wins — and why the host’s knowledge matters.
- OS-010Galton boardBalls bouncing left or right through rows of pegs pile up into a binomial bell curve.
- OS-011Central limit theoremAverage n draws from almost any distribution and the means turn normal — at a speed you can measure.
Stochastic processes
- OS-012Random walkCoin-flip steps on a line or grid: distance grows like √n, and in 1-D and 2-D every walker comes back.
- OS-013Brownian motionParticles jiggle with Gaussian steps; their mean squared displacement grows as 4Dt, as Einstein predicted.
- OS-014Markov chainA process that remembers only its current state: stationary distribution, mixing and absorption, live.
- OS-015Poisson processEvents at random times with a constant rate: Poisson counts, exponential gaps and the waiting-time paradox.
- OS-016Gambler's ruinBet 1 unit until broke or at N: exact odds, expected game length, and why a small edge matters.
- OS-017Geometric Brownian motionThe standard stock-price model: log-normal paths whose mean and typical outcome drift apart.
Queueing & discrete-event
- OS-018M/M/1 queueOne server, random arrivals, random service: why waits explode as utilization ρ = λ/μ approaches 1.
- OS-019M/M/c queueSeveral servers, one shared line: Erlang C waiting probability and the pooling effect.
- OS-020Little's lawAverage number in system = arrival rate × average time in system, read off one picture.
- OS-021Discrete-event simulationClock, future event list, event routines: the method behind queue simulators, one event at a time.
Agents & cellular automata
- OS-022Game of LifeTwo rules on a grid of cells: gliders, guns, oscillators and soups that settle or keep going.
- OS-023Elementary cellular automataOne row of cells, eight neighborhood cases, 256 rules: from blank rows to chaos and universal computation.
- OS-024Schelling segregationAgents with mild preferences for similar neighbors sort themselves into strongly segregated clusters.
- OS-025Boids flockingSeparation, alignment and cohesion: three local steering rules that turn random headings into a flock.
- OS-026Forest fire modelTrees grow, lightning strikes, fires spread: a cellular automaton with fires of every size.
- OS-027Predator–preyWolves, sheep and grass on a grid: noisy population cycles, a phase loop and the risk of extinction.
Population & epidemics
- OS-028Logistic growthThe S-curve of a population meeting its carrying capacity, against unchecked exponential growth.
- OS-029SIR modelSusceptible, infected, recovered: the three-compartment ODE behind epidemic curves and R₀.
- OS-030Lotka–VolterraTwo coupled equations whose predator and prey populations circle forever on closed orbits.
Networks
- OS-031Random network (Erdős–Rényi)Link every pair at random: Poisson degrees, and a giant component that appears suddenly at mean degree 1.
- OS-032Epidemic on a networkSIR spreading along the edges of random, small-world and scale-free networks, compared with homogeneous mixing.
- OS-033PageRankRank pages by where a random surfer spends its time: power iteration vs a simulated walk.
Physics
- OS-034Projectile motionThe vacuum parabola against a trajectory with quadratic air drag, and why 45° stops being the best angle.
- OS-035Harmonic oscillatorA mass on a spring with friction and a periodic push: damping regimes, phase portraits and resonance.
- OS-036Double pendulumTwo nearly identical double pendulums that part ways: sensitive dependence on initial conditions.
- OS-037DiffusionThe heat equation solved two ways, by finite differences and by random walkers, against the exact Gaussian.
- OS-038Ising modelSpins on a grid that like to align: a phase transition at T_c ≈ 2.269, simulated with Metropolis flips.
No simulation matches that search. Try a broader term such as “random”, “queue” or “growth”.