DQN for CartPole Inverted Pendulum Balance Control
Abstract
The inverted pendulum stabilization is considered one of the classical problems used to measure the performance of deep reinforcement learning algorithms. In this paper, the Double Deep Q-Network (Double DQN) algorithm is implemented using the PyTorch framework, which operates in the CartPole-v1 environment created by OpenAI Gym. Moreover, this research explores the key factors of the Double DQN model architecture. The key advantage of the Double DQN is in the separation of the actions choosing and estimation stages, which prevents overestimation of Q-value and improves the learning stability and quality of control at the end of the training process. Specifically, this part of the paper highlights such key architectural features of the algorithm as the structure of the three-layer fully connected neural network, the use of the ReLU activation function, the weight initialization strategy based on the Xavier initialization, the update policy for the two networks, and the Adam optimization strategy. Besides, ablation studies were performed with respect to the baseline DQN. The results showed that after 160 training iterations, Double DQN reached an average score of 196.5 on the last 100 iterations. As compared to the baseline DQN, the Double DQN achieved a faster convergence by 20% and better training stability.
References
- Sutton, R. S., & Barto, A. G. (2018). Reinforcement learning: An introduction (2nd ed.). MIT Press.
- Arulkumaran, K., Deisenroth, M. P., Brundage, M., & Bharath, A. A. (2017). Deep reinforcement learning: A brief survey. IEEE Signal Processing Magazine, 34(6), 26–38.
- Zhao, W., Queralta, J. P., & Westerlund, T. (2020). Sim-to-real transfer in deep reinforcement learning for robotics: A survey. In Proceedings of the IEEE Symposium Series on Computational Intelligence (pp. 737–744).
- Mnih, V., et al. (2015). Human-level control through deep reinforcement learning. Nature, 518(7540), 529–533.
- van Hasselt, H., Guez, A., & Silver, D. (2016). Deep reinforcement learning with double Q-learning. In Proceedings of the AAAI Conference on Artificial Intelligence, 30(1), 2094–2100.
- Brockman, G., et al. (2016). OpenAI Gym. arXiv preprint arXiv: 1606.01540.
- Watkins, C. J. C. H., & Dayan, P. (1992). Q-learning. Machine Learning, 8(3–4), 279–292.
- Glorot, X., & Bengio, Y. (2010). Understanding the difficulty of training deep feedforward neural networks. In Proceedings of the 13th International Conference on Artificial Intelligence and Statistics (pp. 249–256).
- Kingma, D. P., & Ba, J. (2015). Adam: A method for stochastic optimization. In Proceedings of the International Conference on Learning Representations.
- Wang, Z., Schaul, T., Hessel, M., van Hasselt, H., Lanctot, M., & de Freitas, N. (2016). Dueling network architectures for deep reinforcement learning. In Proceedings of the 33rd International Conference on Machine Learning (pp. 1995–2003).