CartPole Programming Practice
摘要
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.