Question: Is there an ideal ratio in reinforcement learning between the positive and negative rewards?

Suppose I have the scenario of moving a robot across the river. There are two options, walk across the bridge or walk across the river. If it walks across the river then the robot breaks so the idea is to reinforce the robot to walk across the bridge. What would be the best rewards values? Does this ratio vary between cases?

```
option1:

Bridge: +10
River: -10

Option2:

Bridge: +10
River: -1

Option3:

Bridge: +1
River: -10

```

Answer: 
Your Q learning update expression looks correct. The `Total Reward` will not be the same at the end of each episode because the starting position of taxi is different in each episode so the number of steps necessary to reach the final destination will be different in each episode. The graph that you posted shows that the algorithm converged after short amount of episodes so 100000 episodes might be too much. Since the environment is simple try manually calculating optimal policy for some starting specific position and then see if the algorithm does the same sequence of actions.
Great answer by @Brale. I want to point out another thing. The plateau in a graph ---like the one you shared--- indicates convergence, and the converged value may not always be *zero*. In general, you need to verify the learned behavior by your algorithm. For instance, if you are using Gym's LunarLander environment, you should also double-check what is it that your algorithm has learned *after* converging. Put another way, your algorithm might converge, but not to the desired behavior.