Answers.Body: <p>It usually does not matter, but I'm sure there are situations where it could matter.  In theory, if a reward for good behavior is higher than the rewards for bad behavior, then the neural network will be trained such that the higher rewards are preferred, even if those higher rewards are negative.  For example, if a bad reward is -100, then a relatively good reward could be -50, and the network will then be more likely to choose the action with -50 reward over the action with -100 reward.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-17T03:47:44.270Z
Answers.LastActivityDate: 2020-02-17T03:47:44.270Z
Answers.UserDisplayName: sOvr9000
Answers.Body: <p>There are no hard and fast rules for it. Your reward should be such that it motivates the agent to attain the goal in the most effective way.  In a grid world if you want your agent to reach goal state quicker but award +2 for a move and +5 for reaching goal then your agent might simply wander around and never reach the goal. However, if you set a reward of -1 for each move and  +1 or +10(or even 0) for reaching the goal then your agent will learn to reach the goal state faster.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-17T04:37:29.203Z
Answers.LastActivityDate: 2020-02-17T04:37:29.203Z
Answers.UserDisplayName: Bhuwan Bhatt
Body: <p>Is there an ideal ratio in reinforcement learning between the positive and negative rewards?</p>
  
  <p>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?</p>
  
  <pre><code>option1:
  
  Bridge: +10
  River: -10
  
  Option2:
  
  Bridge: +10
  River: -1
  
  Option3:
  
  Bridge: +1
  River: -10
  </code></pre>
  
Tags: <reinforcement-learning><rewards>
Title: Is there a good ratio between the positive and negative rewards in reinforcement learning?
UserDisplayName: Mark
ThreadText: # Is there a good ratio between the positive and negative rewards in reinforcement learning?
  
  (Asked by: username_0 on 2020-02-16)
  
  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
  
  **Tags:** reinforcement-learning, rewards
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2020-02-17. Score: 3 | Accepted answer
  
  There are no hard and fast rules for it. Your reward should be such that it motivates the agent to attain the goal in the most effective way. In a grid world if you want your agent to reach goal state quicker but award +2 for a move and +5 for reaching goal then your agent might simply wander around and never reach the goal. However, if you set a reward of -1 for each move and +1 or +10(or even 0) for reaching the goal then your agent will learn to reach the goal state faster.
  
  
  ---
  
  ### Answer by username_1 on 2020-02-17. Score: 3
  
  It usually does not matter, but I'm sure there are situations where it could matter. In theory, if a reward for good behavior is higher than the rewards for bad behavior, then the neural network will be trained such that the higher rewards are preferred, even if those higher rewards are negative. For example, if a bad reward is -100, then a relatively good reward could be -50, and the network will then be more likely to choose the action with -50 reward over the action with -100 reward.
  
  
  ---
  
  