I'm using self play to teach a model to play games (e.g. board games). Basically the model is playing against itself. When playing as player 2 I switch the perspective as if it is player 1 to train the model on this data too.

In the end one player wins and gets the reward. There is no other reward. Do I need to add a negative reward (in retrospect) for the action the loosing player took one step before the winning player made his action?

An example since this sentences was quite long and disturbing: Assume a model learning tic tac toe. Player 1 wins with the last move witch was taken in this game. He gets a reward. Player 2 lost obviously. Would it be beneficial to give a penalty for the move he took (the second last move)? If so why?


1 Answer 1


4 months later I cans say negativ rewards are very crucial. Without them both players seemed to play for them self. No sign of competition. But with negativ rewards for a lose, agents started competing.

In the case of board games you have to store the two last played moves. This way you can reward the last move with a positiv reward (because the last move lead to a win). The second last move was the losing player's move which gets a negativ reward.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.