This interactive application demonstrates random domino tilings of an Aztec diamond - a diamond-shaped union of unit squares. The simulation allows exploration of two distinct sampling methods:
The initial configuration is generated using the exact-sampling shuffling algorithm, producing a perfect sample from the weighted domino tiling measure, with random Bernoulli weights on 3/4 of edges. The Bernoulli weights are equal to $u$ or $v$ with probability 1/2, where $u$ and $v$ are user-defined parameters. The remaining 1/4 of edges are assigned a deterministic weight of 1.0.
After generating an initial configuration, you can observe the evolution of the system through Glauber dynamics - a Markov chain Monte Carlo method that preserves the stationary distribution. Each step attempts to flip a randomly chosen 2×2 block of cells according to the heat-bath probability determined by the edge weights.
Unlike the shuffling algorithm which generates an exact sample immediately, Glauber dynamics shows the system evolving over time.
You can change the weights before the Glauber dynamics, effectively running a dynamics out of equilibrium.
The "Show Weight Graph" button displays a graphical representation of the edge weights used in the simulation:
The graph visualization shows a 4×4 corner of the weight matrix to help understand the spatial arrangement of weights in the Aztec diamond graph.
The sampling runs entirely in your browser. For sizes up to about n≤120 the sampler is fast; larger n may take noticeable time (hard cap n=300 to protect your browser).
Link to code
(This simulation is interactive, written in JavaScript; see the source code of this page at the link)
Link to code
(C++ code for the simulation)