Reputation dynamics in stochastic games