Answers.Body: <p>I don't understand your question very clearly.</p>
  
  <p>Q-value of a particular state-action pair (s,a) under policy <span class="math-container">$\pi$</span> is the total reward you would expect to collect if you start from the state s, take the action a, and follow policy <span class="math-container">$\pi$</span> from then on.</p>
  
  <p>In the literature, this is referred to as state-action values.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-16T00:59:10.080Z
Answers.Text: So, the Q value is not a value assigned to individual states and their actions? Instead, the q value is the sum of rewards I would expect to get , starting from the current state to the terminal state, following policy π? Also, the value that I would assign to the individual states and their actions to measure how good that action is, is called the state-action value?
Answers.UserDisplayName: BG10
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-16T04:02:15.290Z
Answers.Text: I think you are getting a bit confused. State value functions (represented by V(s)) is the total sum of rewards you would expect to get if you start at state s, and go to the terminal state. On the other hand, state-action value functions, denoted by Q(s,a) is a function of both the state and action. It denotes the total expected reward that you'll get it you start in state s and take action a in state s. According to this, you have to take action a in state s. It doesn't matter how you act in the remaining states. Does this help?
Answers.UserDisplayName: pecey
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-16T06:10:05.283Z
Answers.Text: So for the state value functions and state-action value functions, all they tell you is how good it is for an agent to be in that particular state(and perform a particular action for the Q(s,a)  ) while following the policy π . We will always be changing states during an episode ( every action we take means changing to another state) and will get to choose the state we will be in next. Using the state value function, we will be able to know which is the best possible state ( the one with the highest state value function) and will go to that state because we know it's the best for our policy π
Answers.UserDisplayName: BG10
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-15T14:27:43.487Z
Answers.LastActivityDate: 2020-04-15T14:27:43.487Z
Answers.UserDisplayName: pecey
Answers.Body: <blockquote>
    <p>Am I right to say that the Q value of a particular state and action is the same as the state-action pair value of that same state and action?</p>
  </blockquote>
  
  <p>In general <span class="math-container">$Q$</span> is used as the symbol for action value and <span class="math-container">$Q(s,a)$</span> is the action value function.</p>
  
  <p>The phrase "state-action pair value" is used to mean the same thing in some texts.</p>
  
  <p>So, yes, you are right. At least I cannot think of or find any counter-examples where the two things could be used to refer to different things in the same text.</p>
  
  <p>It <em>is</em> possible to work with different formulae for Q - e.g. finite horizon, discounted, average reward. There are also conceptual differences between a "true" action value, what you are currently estimating, and implementation details such as how you implement a Q function in code. In addition, there is also the advantage function usually labelled <span class="math-container">$A(s,a)$</span> which <em>might</em> also be considered as a "state-action pair value" by some authors.</p>
  
  <p>However, those would not generally be flagged in documents by labelling one a "Q value" and another "state-action pair value" without at least some other text. So in general you are safe to consider the two terms to mean the same thing.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-16T00:42:53.043Z
Answers.Text: Yes, I feel the action value is a little confusing to me in the sense that it can mean the 'true' or 'estimated' value. However, isn't the action value based on the rewards, which is constant all the time?(because action value states how good it is to perform a certain action a in state s) If so, then shouldn't the action value be constant also? Also, we 'estimate' the action value because we are lacking the transition and reward probabilities?      
  Thanks!
Answers.UserDisplayName: BG10
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-16T01:01:31.547Z
Answers.Text: @BG10 Yes, right, it's assumed that there's an optimal value function (either state-action or just state value functions) and then there's an estimate of the optimal value function, which is what you have or want to find. While estimating this value function, e.g. with Q-learning, you will not necessarily encounter "constant rewards all the time". For example, in the case of Q-learning, while exploring the environment, you will have to take actions to "explore" (unknown parts of the environment) and to "exploit" (get more reward from actions that you currently think are the best).
Answers.UserDisplayName: nbro
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-16T01:02:16.600Z
Answers.Text: @BG10 Typically, you will trade-off between exploration and exploitation, and this often done randomly, e.g. with a the $\epsilon$-greedy policy. So, no, in general, you will not encounter "constant rewards" even if the environment is deterministic (i.e. the transition probabilities and reward function do not change). If you need more clarifications, I think you should ask a new question on the site. _Actually, you should ask this question on the site anyway!_
Answers.UserDisplayName: nbro
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-15T14:28:10.400Z
Answers.LastActivityDate: 2020-04-15T14:33:15.477Z
Answers.LastEditDate: 2020-04-15T14:33:15.477Z
Answers.UserDisplayName: Neil Slater
Body: <p>Am I right to say that the Q value of a particular state and action is the same as the state-action pair value of that same state and action? </p>
  
Tags: <reinforcement-learning><q-learning><terminology><value-functions>
Title: Is the Q value the same as the state-action pair value?
UserDisplayName: BG10
ThreadText: # Is the Q value the same as the state-action pair value?
  
  (Asked by: username_0 on 2020-04-15)
  
  Am I right to say that the Q value of a particular state and action is the same as the state-action pair value of that same state and action?
  
  **Tags:** reinforcement-learning, q-learning, terminology, value-functions
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2020-04-15. Score: 1
  
  I don't understand your question very clearly.
  
  Q-value of a particular state-action pair (s,a) under policy $\pi$ is the total reward you would expect to collect if you start from the state s, take the action a, and follow policy $\pi$ from then on.
  
  In the literature, this is referred to as state-action values.
  
  > **Comments:**
  > **username_0**: So, the Q value is not a value assigned to individual states and their actions? Instead, the q value is the sum of rewards I would expect to get , starting from the current state to the terminal state, following policy π? Also, the value that I would assign to the individual states and their actions to measure how good that action is, is called the state-action value?  
  > **username_1**: I think you are getting a bit confused. State value functions (represented by V(s)) is the total sum of rewards you would expect to get if you start at state s, and go to the terminal state. On the other hand, state-action value functions, denoted by Q(s,a) is a function of both the state and action. It denotes the total expected reward that you'll get it you start in state s and take action a in state s. According to this, you have to take action a in state s. It doesn't matter how you act in the remaining states. Does this help?  
  > **username_0**: So for the state value functions and state-action value functions, all they tell you is how good it is for an agent to be in that particular state(and perform a particular action for the Q(s,a)  ) while following the policy π . We will always be changing states during an episode ( every action we take means changing to another state) and will get to choose the state we will be in next. Using the state value function, we will be able to know which is the best possible state ( the one with the highest state value function) and will go to that state because we know it's the best for our policy π  
  
  ---
  
  ### Answer by username_2 on 2020-04-15. Score: 1
  
  > Am I right to say that the Q value of a particular state and action is the same as the state-action pair value of that same state and action?
  
  In general $Q$ is used as the symbol for action value and $Q(s,a)$ is the action value function.
  
  The phrase "state-action pair value" is used to mean the same thing in some texts.
  
  So, yes, you are right. At least I cannot think of or find any counter-examples where the two things could be used to refer to different things in the same text.
  
  It *is* possible to work with different formulae for Q - e.g. finite horizon, discounted, average reward. There are also conceptual differences between a "true" action value, what you are currently estimating, and implementation details such as how you implement a Q function in code. In addition, there is also the advantage function usually labelled $A(s,a)$ which *might* also be considered as a "state-action pair value" by some authors.
  
  However, those would not generally be flagged in documents by labelling one a "Q value" and another "state-action pair value" without at least some other text. So in general you are safe to consider the two terms to mean the same thing.
  
  > **Comments:**
  > **username_0**: Yes, I feel the action value is a little confusing to me in the sense that it can mean the 'true' or 'estimated' value. However, isn't the action value based on the rewards, which is constant all the time?(because action value states how good it is to perform a certain action a in state s) If so, then shouldn't the action value be constant also? Also, we 'estimate' the action value because we are lacking the transition and reward probabilities?       Thanks!  
  > **username_3**: @username_0 Yes, right, it's assumed that there's an optimal value function (either state-action or just state value functions) and then there's an estimate of the optimal value function, which is what you have or want to find. While estimating this value function, e.g. with Q-learning, you will not necessarily encounter "constant rewards all the time". For example, in the case of Q-learning, while exploring the environment, you will have to take actions to "explore" (unknown parts of the environment) and to "exploit" (get more reward from actions that you currently think are the best).  
  > **username_3**: @username_0 Typically, you will trade-off between exploration and exploitation, and this often done randomly, e.g. with a the $\epsilon$-greedy policy. So, no, in general, you will not encounter "constant rewards" even if the environment is deterministic (i.e. the transition probabilities and reward function do not change). If you need more clarifications, I think you should ask a new question on the site. _Actually, you should ask this question on the site anyway!_  
  
  ---
  
  