Worm algorithm (Prokof'ev & Svistunov 2001): An exact MC scheme that operates in the extended configuration space of "open" worldlines (worms).
A worm consists of two defects (Ira and Masha) that propagate, creating/destroying loop segments. When the worm closes, a valid loop configuration is recovered.
For the XY model, the current-current correlation function is the Green's function of the loop gas. Winding numbers W_x, W_y count net loops wrapping the torus — W²/2 gives the superfluid stiffness.
The algorithm eliminates critical slowing down: autocorrelation time τ ~ L^z with z≈0 vs z≈2 for local updates.
The critical point of the 2D XY model (Kosterlitz-Thouless transition) occurs at βJ_c ≈ 0.4541.