A state machine designed to replicate the evolution of strategies in a repeated game