HomeAlgorithms & AIWang-Landau Density of States (2D)

Wang-Landau Density of States (2D)

A 2D flat-histogram Monte Carlo simulator: watch the Wang-Landau algorithm build the density of states g(E) of a 2D Ising spin lattice one random walk at a time, then read off the specific-heat and free-energy curve at any temperature from the single converged run.

Algorithms & AI2DAdvanced60 FPS📱 Mobile-adapted⇄ 3D version
2d-physics-ext-topic-73 ↗ Open standalone

The Wang-Landau algorithm is a flat-histogram Monte Carlo method that estimates the density of states g(E) of a statistical system in a single random walk — replacing separate Metropolis simulations at every temperature with one run whose output gives the full thermodynamics of the system at any temperature by direct summation. This 2D simulator runs the algorithm live on a 2D Ising spin lattice: a grid of red/blue spins shows the current microstate, a bar chart builds up ln g(E) in real time as the modification factor ln f halves each time the visit histogram becomes flat enough (exactly as in the original 2001 Wang-Landau paper), and a third panel turns the running g(E) estimate into an actual specific-heat and free-energy curve you can read at any temperature with a slider — the "one run, every temperature" payoff made visible.

⚙ Under the hood

A 2D flat-histogram Monte Carlo simulator: watch the Wang-Landau algorithm build the density of states g(E) of a 2D Ising spin lattice one random walk at a time, then read off the specific-heat and free-energy curve at any temperature from the single converged run.

monte carloising modelcomputational physicsstatistical mechanicsdensity of statesalgorithms

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)