Solving the MountainCar environment
The MountainCar-v0
environment simulates a car on a one-dimensional track, situated between two hills. The simulation starts with the car placed between the hills, as shown in the following rendered output:
Figure 10.2: The MountainCar simulation – the starting point
The goal is to get the car to climb up the taller hill – the one on the right – and ultimately hit the flag:
Figure 10.3: The MountainCar simulation – the car climbing the hill on the right
The simulation is set up with the car’s engine being too weak to directly climb the taller hill. The only way to reach the goal is to drive the car back and forth until enough momentum is built for climbing. Climbing the left hill can help to achieve this goal, as reaching the left peak will bounce the car back to the right, as shown in the following screenshot:
Figure 10.4: The...