Answers.Body: <p>I see three main ways to do this, which one makes more sense will depend on your application.</p>
  
  <p>One is to append that information to the state/observations like you mentioned. While this information is static for a particular episode, it will be different across episodes and the policy should learn to condition the actions it chooses based on this information.</p>
  
  <p>Another would be to leave goal information out entirely and force the agent to learn a policy that works when the goal is unknown. This will likely be more difficult to learn and you may end up with a policy that moves to the average of all goals or explores and tries them all.</p>
  
  <p>A third option and probably the most natural is to have some context cue that the agent can observe (e.g. often in lab experiments with rats, a cue is placed on a wall that lets the rat know which way to go to get a reward). This is similar to the first method, except that the cue has to be observed rather than given directly. For the Mountain Car example, this could be an extra signal that the agent only sees in a particular location, such as the bottom of the valley or when it moves close to a particular side.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-04T15:16:02.103Z
Answers.LastActivityDate: 2019-04-04T15:16:02.103Z
Answers.UserDisplayName: Brent
Body: <p>Policy learning refers to mapping an agent state onto an action to maximize reward. A linear policy, such as the one used in the <a href="https://arxiv.org/abs/1803.07055" rel="nofollow noreferrer">Augmented Random Search paper</a>, refers to learning a linear mapping between state and reward.</p>
  <p>When the entire state changes at each time-step, for example in the <a href="https://gym.openai.com/envs/MountainCarContinuous-v0/" rel="nofollow noreferrer">Continuous Mountain Car OpenAI Gym</a>, the position and speed of the car changes at each time-step.</p>
  <p>However, assume we also wanted to communicate the constant position of one or more goals. By &quot;constant&quot;, I mean does not change within a training episode, but may change between episodes. For example, if there was a goal on the left <em>and</em> right of the Mountain Car.</p>
  <p>Are there examples of how this constant/static information be communicated from the environment other than appending the location of the two goals to the state vector? Can static/constant state be differentiated from state which changes with each action?</p>
  
Tags: <reinforcement-learning><ai-design>
Title: How can certain information about the goal be given to the RL learning algorithm?
UserDisplayName: Seanny123
ThreadText: # How can certain information about the goal be given to the RL learning algorithm?
  
  (Asked by: username_0 on 2019-04-04)
  
  Policy learning refers to mapping an agent state onto an action to maximize reward. A linear policy, such as the one used in the [Augmented Random Search paper](https://arxiv.org/abs/1803.07055), refers to learning a linear mapping between state and reward.
  
  When the entire state changes at each time-step, for example in the [Continuous Mountain Car OpenAI Gym](https://gym.openai.com/envs/MountainCarContinuous-v0/), the position and speed of the car changes at each time-step.
  
  However, assume we also wanted to communicate the constant position of one or more goals. By "constant", I mean does not change within a training episode, but may change between episodes. For example, if there was a goal on the left *and* right of the Mountain Car.
  
  Are there examples of how this constant/static information be communicated from the environment other than appending the location of the two goals to the state vector? Can static/constant state be differentiated from state which changes with each action?
  
  **Tags:** reinforcement-learning, ai-design
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-04-04. Score: 4
  
  I see three main ways to do this, which one makes more sense will depend on your application.
  
  One is to append that information to the state/observations like you mentioned. While this information is static for a particular episode, it will be different across episodes and the policy should learn to condition the actions it chooses based on this information.
  
  Another would be to leave goal information out entirely and force the agent to learn a policy that works when the goal is unknown. This will likely be more difficult to learn and you may end up with a policy that moves to the average of all goals or explores and tries them all.
  
  A third option and probably the most natural is to have some context cue that the agent can observe (e.g. often in lab experiments with rats, a cue is placed on a wall that lets the rat know which way to go to get a reward). This is similar to the first method, except that the cue has to be observed rather than given directly. For the Mountain Car example, this could be an extra signal that the agent only sees in a particular location, such as the bottom of the valley or when it moves close to a particular side.
  
  
  ---
  
  