To implement a Q-learning algorithm we'll use the OpenAI Gym framework, which is a TensorFlow compatible toolkit for developing and comparing Reinforcement Learning algorithms.
OpenAI Gym consists of two main parts:
- The Gym open source library: A collection of problems and environments that can be used to test Reinforcement Learning algorithms. All these environments have a shared interface, allowing you to write RL algorithms.
- The OpenAI Gym service: A site and API allowing people to meaningfully compare the performance of their trained agents.
See more references at https://gym.openai.com.
To get started, you'll need to have Python 2.7 or Python 3.5. To install Gym, use the pip installer:
sudo pip install gym.
Once installed, you can list Gym's environments as follows:
>>>from gym import envs
>>>print(envs.registry.all())
The output list...