# Tag Info

7

Importance sampling is typically used when the distribution of interest is difficult to sample from - e.g. it could be computationally expensive to draw samples from the distribution - or when the distribution is only known up to a multiplicative constant, such as in Bayesian statistics where it is intractable to calculate the marginal likelihood; that is $$... 3 We estimate a value using sampling on whole episodes, and we take this values to construct the target policy. The crucial bit that you are missing is that there is no single value of V(s) (or Q(s,a)) of a state (or a state action pair). These value functions are always defined with respect to some policy \pi(a|s) and is given the notation of V^{\pi}(... 2 Let's fix some notation: we're collecting data from behavior policy \pi_0 and we want to evaluate a policy \pi. Of course, if we had plenty of data from policy \pi that would be the best way to evaluate \pi as we just take the empirical average (without any importance sampling) and CLT gives us confidence intervals that shrink at \frac{1}{\sqrt n} ... 2 Since A_t is already determined (because we are calculating Q(S_t,A_t)), I think \pi(A_t|S_t) is definitely 1. But what about \mu (A_t|S_t)? Is it 1 or not? You could assign values of 1 to each to get the right answer, but the situation is different. You can see that more clearly in the definition of action value, q(s,a):$$q_{\pi}(s,a) = \mathbb{...

1

Sutton and Barto explain it themselves in section 5.9. I post it with a bit of context. The equation you're looking for is 5.13.

1

According to my understanding, you don't use just the current behavior policy for sampling. The importance sampling ratio is calculated as the product of the probability ratios for both the target and behaviour policy throughout the trajectory. See the calculation below, where the product is happening for all the probabilities throughout the trajectories. (...

Only top voted, non community-wiki answers of a minimum length are eligible