1
$\begingroup$

I am new to Machine Learning, and I am trying to solve MountainCar-v0 using Q-learning. I can solve the problem now, but I am still confused.

According to the MountainCar-v0's Wiki, the reward remains -1 for every step, even if the car has reached the destination. How does the invariant reward help the agent learn? If every step gives the same reward, how can the agent tell if it is a good move or a bad move?

Thanks in advance!

$\endgroup$

1 Answer 1

1
$\begingroup$

Well, some inefficient agents will need more steps to reach the goal. Others will have a more target-oriented, efficient way to reach the goal. The efficient agents will need less steps and have a better/bigger score.

$\endgroup$
2
  • $\begingroup$ Btw, I don't know the project but this is a basic approach of optimization. $\endgroup$
    – MBDev
    Apr 30, 2018 at 10:34
  • $\begingroup$ Worth adding that this fixed reward per step approach only works for episodic problems. In an episodic, non-discounted problem with a fixed reward pre time step, then negative rewards encourage faster solutions that end the episode in lowest number of steps, and positive rewards encourage extending the episode to the highest possible number of steps. $\endgroup$ Jun 29, 2018 at 12:48

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.