This code accompanies 'Corruption Drives the Emergence of Civil Society' by Abdullah et al (2013).
The code estimates the transition matrix between strategies (described in the paper) playing a public goods game from which the stationary distribution is calculated using the power iteration method. Finally a phase diagram is plotted as a function of B (or any other arbitrary parameter).
The method is based on 'Social Learning promotes Institutions for Governing the Commons' Sigmund et al, Nature 2010.
Requires NumPy, SciPy and Matplotlib