The CartPole (Available from: https://www.gymlibrary.dev/environments/classic_control/cart_pole/) problem of reinforcement learning is a classic version of inverted pendulum problem in control theory, and it can be solved using DRL methods. This chapter aims to present programming examples for addressing the CartPole problem by employing two DRL methods. In the practical exercises for the CartPole problem, Python is taken as the programming language, PyTorch library is chosen to build and train neural networks, and Cart Pole environment from OpenAI Gym (Available from: https://www.gymlibrary.dev/) is chosen as the environment of the problem. The DQN model and actor-critic model are both selected to solve the CartPole problem by programming. After conducting two experiments, the respective results are presented. Based on these results, the actor-critic model is superior to the DQN model.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

CartPole Programming Practice

  • Jianhua Li

摘要

The CartPole (Available from: https://www.gymlibrary.dev/environments/classic_control/cart_pole/) problem of reinforcement learning is a classic version of inverted pendulum problem in control theory, and it can be solved using DRL methods. This chapter aims to present programming examples for addressing the CartPole problem by employing two DRL methods. In the practical exercises for the CartPole problem, Python is taken as the programming language, PyTorch library is chosen to build and train neural networks, and Cart Pole environment from OpenAI Gym (Available from: https://www.gymlibrary.dev/) is chosen as the environment of the problem. The DQN model and actor-critic model are both selected to solve the CartPole problem by programming. After conducting two experiments, the respective results are presented. Based on these results, the actor-critic model is superior to the DQN model.