2
$\begingroup$

Imagine that the agent receives a positive reward upon reaching a state 𝑠. Once the state 𝑠 has been reached the positive reward associated with it vanishes and appears somewhere else in the state space, say at state 𝑠′. The reward associated to 𝑠′ also vanishes when the agent visits that state once and re-appears at state 𝑠. This goes periodically forever. Will discounted Q-learning converge to the optimal policy in this setup? Is yes, is there any proof out there, I couldn't find anything.

$\endgroup$
  • $\begingroup$ "Once the state 𝑠 has been reached the positive reward associated with it vanishes and appears somewhere else in the state space, say at state 𝑠′": why should the reward vanish? The reward is just a scalar value you receive from the environment after having performed an action. The reward can't really vanish. Maybe you mean the "return" or "value" of a state? $\endgroup$ – nbro Feb 6 at 16:31
  • 1
    $\begingroup$ No, assume that the reward is dynamic and the environment gives the agent a positive scalar value only for the first visit. $\endgroup$ – Perissiane Feb 6 at 16:32
  • $\begingroup$ How "assume that the reward is dynamic and the environment gives the agent a positive scalar value only for the first visit." is related to your question? Actually, in your question, you're saying that "sometimes you receive a reward for entering state $s$ and sometimes for entering state $s'$". This can be just a regular scenario, if the environment is stochastic: in general, if the environment is stochastic, if you enter state s once and you receive a reward $r$, in future visits of the state $s$, the environment may give you different reward, say $r'$ (or $-r$) $\endgroup$ – nbro Feb 6 at 16:35
  • 1
    $\begingroup$ I should have been more clear: I meant that assume the agent visits state $s$ for the first time. The reward for this transition is positive. However, the agent will not receive any positive reward if it visits state $s$ for the second time and so on. The positive reward now is given to the agent if it visits state $s'$. Once the agent visits state $s'$ it gets a positive reward and the positive reward goes back to state $s$. So, somehow the agent has to learn a cycle behavior between states $s$ and $s'$. $\endgroup$ – Perissiane Feb 6 at 17:10
3
$\begingroup$

No, it will not converge in the general case (maybe it might in extremely convenient special cases, not sure, didn't think hard enough about that...).

Practically everything in Reinforcement Learning theory (including convergence proofs) relies on the Markov property; the assumption that the current state $s_t$ includes all relevant information, that the history leading up to $s_t$ is no longer relevant. In your case, this property is violated; it is important to remember whether or not we visited $s$ more recently than $s'$.

I suppose if you "enhance" your states such that they include that piece of information, then it should converge again. This means that you'd essentially double your state-space. For every state that you have in your "normal" state space, you'd have to add a separate copy that would be used in cases where $s$ was visited more recently than $s'$.

$\endgroup$
  • 1
    $\begingroup$ @Perissiane I can't really comment on that without specifics... maybe they "enhanced" the states as I described. Or maybe with "handle" they must mean "turns out to perform decently well empirically", which is of course very different from having a theoretical convergence proofs. Often when there are "mild" violations of things like the Markov property, most RL algorithms can still perform well empirically, it's just the theory that breaks down first. $\endgroup$ – Dennis Soemers Feb 7 at 10:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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