Reinforcement learning is quickly advancing, and the DQN model we just looked at has quickly become outpaced by more advanced algorithms. There are several variations and advancements in RL algorithms that could fill several chapters, but most of that material would be considered academic. As such, we will instead look at some more practical examples of the various RL models the Keras RL API provides.
The first simple example we can work with is changing our previous example to work with a new gym environment. Open up Chapter_5_5.py and follow the next exercise:
- Change the environment name in the following code:
if __name__ == "__main__":
env = gym.make('MountainCar-v0')
- In this case, we are going to use the MountainCar environment, as shown:
Example of MountainCar environment
- Run the code as you normally would and see how the DQNAgent...