# Tag Info

3

OpenAI's Gym is a standardised API, useful for reinforcement learning, applied to a range of interesting environments many of which you can then access for free with little effort. It is very simple to use, and IMO worth learning if you want to practice RL using Python to any depth at all. You could use it to ensure you have good understanding of basic ...

3

It doesn't seem that it is a "proper" symbol. I guess that $\sup$ simply refers to the supremum, that is, you want to select actions that maximize the quantity that comes to the right of $\sup$, while $\text{dist}$ is simply a proxy for any possible distance between distributions. For example, you can replace $\text{dist}$ with the Kullback-Leibler ...

3

I think you are a bit confused about what is the update function and the target. The equation you have there, and what is done in the video is the estimation of the true value of a certain state. In Temporal-Difference algorithms this is called the TD-Target. The reason for your confusion might be that in the video he starts from the end state and goes ...

3

This is simply from definition of return in average reward setting (look at equation $10.9$). The "standard" TD error is defined as \begin{equation} TD_{\text{error}} = R_{t+1} + V(S_{t+1}) - V(S_t) \end{equation} In average reward setting, average reward $r(\pi)$ is subtracted from reward at $t$, $R_t$, so TD error in this case is \begin{equation} TD_{\text{...

2

Well, the way to know that the agent is actually learning is by looking at its behavior while it performs the task, and by comparing against a known optimal performance. So, does your agent reaches the goal quickly? Does it step out of the grid frequently? What is the maximum possible sum of rewards / minimum number of steps attainable? Is the agent close ...

2

I think you can break this problem down into two parts to try and find the solution. 1. Can the neural network model the desired function? Take the tabular function you have learned in the exact agent, and treat it as training data for the neural network model, using the same loss function and other hyperparameters as you intend to use when the NN is being ...

2

About the first question, you are right. The $i$ denotes a sample trajectory corresponding to a whole episode. However, Sutton's version is exactly the same one as Levine's if you choose $N=1$. About the second question, the Policy Gradient theorem only tells you what is the gradient up to a constant, so basically any constant is irrelevant. Now, even if ...

2

If $\pi$ is a random policy, and after running through this algorithm, and for each state take the $\max Q(s,a)$ for all possible actions, why would that not be equal to $Q_{\pi^*}(s, a)$ (optimal Q function)? Assuming that the estimates for $Q_{\pi}(s,a)$ have converged to close to correct values from many samples, then a policy based on $\pi'(s) = \text{... 2 Since the environment has some randomness in it, purely memorizing a trajectory to victory will not work. You will have to memorize every single trajectory for that to work, and there are an infinite number of them. So, you will need to add some sort of bias to your learning model - i.e., what to do when the observations in your pickle file don't match the ... 2 What's exactly the point of time.sleep() in this code? I don't really understand it, you're simply stopping the execution of the program for$0.01$seconds, how will that affect the simulator in any way ? It's not running in parallel, it does one step of the simulation when you call env.step function and returns the next state and reward. Calling sleep ... 2 Q-learning uses an exploratory policy, derived from the current estimate of the$Q$function, such as the$\epsilon$-greedy policy, to select the action$a$from the current state$s$. After having taken this action$a$from$s$, the reward$r$and the next state$s'$are observed. At this point, to update the estimate of the$Q$function, you use a target ... 1 TD($\lambda$) can be thought of as a combination of TD and MC learning, so as to avoid to choose one method or the other and to take advantage of both approaches. More precisely, TD($\lambda$) is temporal-difference learning with a$\lambda$-return, which is defined as an average of all$n$-step returns, for all$n$, where an$n$-step return is the target ... 1 The$\epsilon$-greedy policy is a policy that chooses the best action (i.e. the action associated with the highest value) with probability$1-\epsilon \in [0, 1]$and a random action with probability$\epsilon $. The problem with$\epsilon$-greedy is that, when it chooses the random actions (i.e. with probability$\epsilon$), it chooses them uniformly (i.e. ... 1 Your are correct that epsilon in epsilon-greedy and temperature parameter in the "softmax distribution" are different parameters, although they serve a similar purpose. The original author of the code has taken a small liberty with variable names in the select_action method in order to use just one simple name as a positional argument. Should the ... 1 What's the difference between the two terms? Don't they mean the same thing? They mean different things, and can occur in any combination. A known, deterministic environment This is an environment where the researcher knows how to calculate all the transitions in advance of observing them, and the transition from state$s$given action$a$is always to ... 1 You have a simple mistake in your TD Error function: TD_error = reward + gamma * max(Q[next_state]) - Q[state][action] You have made Q[next_state] a Python dict, so this will take the maximum key which is 3 for all your Q table entries. This is why you end up with values very close to 3 at the end, which is impossible for your problem, the maximum return ... 1 I thought about my input-layer. I had the 500 states one hot encoded. So 499 of every input node would be 0. And 0 is very bad in an neural network. I tried the same code with the "CardPole-v0" and it worked. So think about your input guys 1 It is quite common in DQN to instead of having the neural network represent function$f(s,a) = \hat{q}(s,a,\theta)$directly, it actually represents$f(s)= [\hat{q}(s,1,\theta), \hat{q}(s,2,\theta), \hat{q}(s,3,\theta) . . . \hat{q}(s,N_a,\theta)]$where$N_a\$ is the maximum action, and the input the current state. That is what is going on here. It is ...

1

I would like to point out this paper: https://arxiv.org/pdf/1712.00378.pdf, that answers exactly that question. We then showed that, when learning policies for time-unlimited tasks, it is necessary for correct value estimation, to continue bootstrapping at the end of the partial episodes when termination is due to time limits, or any early termination ...

1

One important consideration here: in the last decade or two the machine learning and artificial intelligence fields, which contains the majority of reinforcement learning work as subfields, consider conferences to be the more impactful publishing venues. The particular venue a researcher chooses depends on the data and/or application domain of your use of ...

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