Answers.Body: <p>A policy is a function that maps states to a probability distribution over all possible actions. </p>
  
  <p>So, in a typical Atari game, there might just be a handful of actions, represented by the keys that are used to play the game. In this context, the policy of a reinforcement learner might be represented by a pretty complex neural network that gets pixels as input and gives action probabilities as output. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-01T19:57:59.560Z
Answers.Text: @DennisSoemers Why does the epsilon-greedy assign high probability to actions that maximize the predicted returns? Isn't it just what makes an action randomly with the probability of epsilon, and choose actions with large rewards with (1 - epsilon)...?
Answers.UserDisplayName: Blaszard
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-01T20:10:41.993Z
Answers.Text: @Blaszard Correct. Suppose `epsilon = 0.1`, and you have `2` actions. There is an `0.9` probability of greedily selecting the best action (or choosing randomly among multiple "equally best" actions), and an `0.1` probability of selecting uniformly at random. In that second case, there is again an `0.5` probability of selecting the best action, and `0.5` probability of selecting the worst (for 2 actions). Mathematically, that can be summarized as a total probability of `0.95` for best action, and `0.05` for worst action.
Answers.UserDisplayName: Dennis Soemers
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-01T11:16:24.160Z
Answers.LastActivityDate: 2019-05-12T23:23:36.523Z
Answers.LastEditDate: 2019-05-12T23:23:36.523Z
Answers.UserDisplayName: BlindKungFuMaster
Body: <p>I'm confused with the two terminology - action and policy - in Reinforcement Learning. As far as I know, the action is:</p>
  
  <blockquote>
    <p>It is what the agent makes in a given state.</p>
  </blockquote>
  
  <p>However, the book I'm reading now (Hands-On Reinforcement Learning with Python) writes the following to explain policy:</p>
  
  <blockquote>
    <p>we defined the entity that tells us what to do in every state as policy.</p>
  </blockquote>
  
  <p>Now, I feel that the policy is the same as the action. So what is the difference between the two, and how can I use them apart correctly?</p>
  
Tags: <reinforcement-learning><terminology><comparison>
Title: What is the difference between policy and action in reinforcement learning?
UserDisplayName: Blaszard
ThreadText: # What is the difference between policy and action in reinforcement learning?
  
  (Asked by: username_0 on 2018-08-01)
  
  I'm confused with the two terminology - action and policy - in Reinforcement Learning. As far as I know, the action is:
  
  > It is what the agent makes in a given state.
  
  However, the book I'm reading now (Hands-On Reinforcement Learning with Python) writes the following to explain policy:
  
  > we defined the entity that tells us what to do in every state as policy.
  
  Now, I feel that the policy is the same as the action. So what is the difference between the two, and how can I use them apart correctly?
  
  **Tags:** reinforcement-learning, terminology, comparison
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-08-01. Score: 8 | Accepted answer
  
  A policy is a function that maps states to a probability distribution over all possible actions.
  
  So, in a typical Atari game, there might just be a handful of actions, represented by the keys that are used to play the game. In this context, the policy of a reinforcement learner might be represented by a pretty complex neural network that gets pixels as input and gives action probabilities as output.
  
  > **Comments:**
  > **username_0**: @username_2 Why does the epsilon-greedy assign high probability to actions that maximize the predicted returns? Isn't it just what makes an action randomly with the probability of epsilon, and choose actions with large rewards with (1 - epsilon)...?  
  > **username_2**: @username_0 Correct. Suppose `epsilon = 0.1`, and you have `2` actions. There is an `0.9` probability of greedily selecting the best action (or choosing randomly among multiple "equally best" actions), and an `0.1` probability of selecting uniformly at random. In that second case, there is again an `0.5` probability of selecting the best action, and `0.5` probability of selecting the worst (for 2 actions). Mathematically, that can be summarized as a total probability of `0.95` for best action, and `0.05` for worst action.  
  
  ---
  
  