We kick off our journey of practical reinforcement learning and PyTorch with the basic, yet important, reinforcement learning algorithms, including random search, hill climbing, and policy gradient. We will start by setting up the working environment and OpenAI Gym, and you will become familiar with reinforcement learning environments through the Atari and CartPole playgrounds. We will also demonstrate how to develop algorithms to solve the CartPole problem step by step. Also, we will review the essentials of PyTorch and prepare for the upcoming learning examples and projects.
This chapter contains the following recipes:
- Setting up the working environment
- Installing OpenAI Gym
- Simulating Atari environments
- Simulating the CartPole environment
- Reviewing the fundamentals of PyTorch
- Implementing and evaluating a random search policy
- Developing the hill-climbing algorithm
- Developing a policy gradient algorithm