OpenAI Gym (https://gym.openai.com) is an open source Python toolkit that offers many simulated environments to help you develop, compare, and train reinforcement learning algorithms, so you don't have to buy all the sensors and train your robot in the real environment, which can be costly in both time and money. In this section, we'll show you how to develop, compare, and train different reinforcement learning models on Raspberry Pi using TensorFlow in an OpenAI Gym's simulated environment called CartPole (https://gym.openai.com/envs/CartPole-v0).
To install OpenAI Gym, run the following commands:
git clone https://github.com/openai/gym.git
cd gym
sudo pip install -e .
You can verify that you have TensorFlow 1.6 and gym installed by running pip list (the last part of the Setting up TensorFlow on Raspberry Pi section covered...