Markov Chain — Random Walker & Stationary Convergence (2D)

This is the 2D companion to the 3D Markov Chain — Transition Matrix Simulator. Instead of propagating the full probability vector through the transition matrix every frame, it runs one real random walker: each hop samples the next state from the current row of P by cumulative-probability sampling, the same Monte-Carlo mechanism used to actually simulate Markov chains and MCMC samplers. Drag the state nodes to rearrange the graph, edit the transition matrix directly, and watch the walker's empirical visit-frequency histogram — accumulated hop by hop — converge to the theoretical stationary distribution, computed independently by power-iterating the matrix to a fixed point.