from Bak's "Adaptive Learning by Extremal Dynamics and Negative Feedback", for cs224n/psych209