Brief
The 2D Ising model is a grid of magnetic spins, each +1 or -1, that line up below a critical temperature T_c and become disordered above it. Implement three Monte Carlo update rules. Metropolis: flip one spin and accept with a probability set by the energy change. Checkerboard-vectorised heat-bath Gibbs: update all 'black' squares at once, then all 'white' ones, each drawn from its exact conditional probability. Wolff cluster updates: grow a cluster of aligned spins and flip it all at once. Drive all of them with your I01 RNG. Measure integrated autocorrelation times (how many steps pass before samples are effectively independent). Get error bars by blocking/batch means (average over long blocks so correlated samples do not fake a small error). Locate T_c from Binder-cumulant crossings (a statistic whose curves for different grid sizes cross at T_c) for L = 16..128.
VICTORY CONDITIONS
- Within 0.2%, with a 2-sigma interval that covers the exact value. Show critical slowing down (tau ~ L^z: near T_c the autocorrelation time tau grows as a power of the grid size L) for Metropolis, and show that Wolff largely removes it. (|T_c estimate - exact| / exact, with a 2-sigma error bar; dynamic exponent z (how fast the autocorrelation time grows with grid size)).
- A public repository with a README that shows your result and how to reproduce it.
Terms in plain words
- Ising model
- A grid of +1/-1 spins where neighbours prefer to agree; it has a sharp phase transition at a known temperature.
- Integrated autocorrelation time
- Roughly how many Markov chain steps it takes to get the equivalent of one independent sample.
- Batch means
- Splitting a long correlated run into blocks and using the spread of block averages to get an honest error bar.
- Binder cumulant
- A ratio of moments of the magnetisation whose curves for different grid sizes cross at the critical temperature.
- Critical slowing down
- The sharp increase in autocorrelation time near the critical point, which makes single-spin updates very inefficient.
- Wolff cluster algorithm
- An update that flips a whole connected cluster of aligned spins at once, which avoids most critical slowing down.
Why it rates ★★☆☆☆
A physics classic. The autocorrelation and error-bar discipline is what transfers to MCMC in ML.