1
$\begingroup$

I am new to Reinforcement Learning and trying to understand the concept of reaping rewards during episodic tasks. I think in games like tic-tac-toe, rewards will be in terms of a win or lose. But does that mean we need to finish the entire game to gain the reward? I mean reward will make sense only if three of the tokens are in one line. Each game of tic-tac-toe will be different as the sequence of actions followed will be different. So does reward come into the picture only after completing the game? And what if the game is a draw?

$\endgroup$
1
  • $\begingroup$ This question seems to be related to or a duplicate of this, this or this. $\endgroup$
    – nbro
    Sep 10, 2021 at 18:27

1 Answer 1

1
$\begingroup$

There is two ways to formulate a reward function for these types of problems. First there is sparse reward:

Win +1

Loss -1

All other rewards are 0.

As the opposite there also exist dense rewards, which could be some signal for every timestep which tells you how well you're doing, i.e. give rewards in chess if you kick an opponents piece of the board.

Sparse rewards is harder to learn from since a lot of the time your reward and so your gradient is 0. On the other hand reward functions for dense reward require careful crafting by hand and leave room for human error and bias.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .