Code
Code
Five commands, a network for the action values
The five commands are the ones of the tabular agent. Each turns at a fixed rate, and the sharper turns drive more slowly:
The network maps the 28 numbers to five action values , one per command, so the greedy action is the argmax of its output.
Training
Training follows the DQN section. The agent acts -greedily, with falling from 1 to 0.05 over the first 30% of the 100,000 steps. It stores every transition in a replay buffer, learns from random minibatches of 256 transitions, and computes its targets with a target network that is copied from the trained network every 2,000 steps. The loss is the Huber loss of the TD error. Double DQN changes only the target: the trained network picks the next action, and the target network evaluates it. A goal or a collision ends the target; after a timeout the target still bootstraps, because the robot still has a future. Every 10,000 steps the code runs the greedy policy on 50 fixed episodes and records three numbers: the success rate, the network’s estimate of the start states, and the discounted return actually collected from them. The return is measured as on the DDPG page, by letting each episode run past the timeout, so the two pages can be compared.Code
Code
Test on the common episodes
The final networks, not the best checkpoints, run on the same 300 test episodes as the go-to-goal controller and the tabular agent.Code
Code
References
- Mnih, V., Kavukcuoglu, K., Silver, D., Rusu, A., Veness, J., et al. (2015). Human-level control through deep reinforcement learning. Nature. DOI
- Sutton, R., Barto, A. (2018). Reinforcement Learning: An Introduction. Link
Found an error on this page? Report an issue.

