A Metropolis (Markov chain Monte Carlo) algorithm approach to studying the phase transition in Potts models (including Ising).