The use of computers in statistical physics is common because the sheer number of equations that
describe the behaviour of an entire system particle by particle often makes it impossible to solve
them exactly. Monte Carlo methods form a particularly important class of numerical methods for
solving problems in statistical physics. Although these methods are simple in principle, their
proper use requires a good command of statistical mechanics, as well as considerable computational
resources. The aim of this paper is to demonstrate how the usage of widely accessible graphics cards
on personal computers can elevate the computing power in Monte Carlo simulations by orders of
magnitude, thus allowing live classroom demonstration of phenomena that would otherwise be out of
reach. As an example, we use the public goods game on a square lattice where two strategies compete
for common resources in a social dilemma situation. We show that the second-order phase transition
to an absorbing …