Setting up the environment

The following are the three main tools required to create deep RL algorithms:

  • Programming language: Python is the first choice for the development of machine learning algorithms on account of its simplicity and the third-party libraries that are built around it. 
  • Deep learning framework: In this book, we use TensorFlow because, as we'll see in the TensorFlow section, it is scalable, flexible, and very expressive. Despite this, many other frameworks can be used in its place, including PyTorch and Caffe.
  • Environment: Throughout the book, we'll use many different environments to demonstrate how to deal with different types of problems and to highlight the strengths of RL algorithms.

In this book, we use Python 3.7, but all versions above 3.5 should work. We also assume that you've already installed numpy and matplotlib.

If you haven't already installed TensorFlow, you can do so through their website or by typing the following in a Terminal window:

$ pip install tensorflow

Alternatively, you can type the following command, if your machine has GPUs: 

$ pip install tensorflow-gpu

You can find all the installation instructions and the exercises relating to this chapter on the GitHub repository, which can be found here: https://github.com/PacktPublishing/Reinforcement-Learning-Algorithms-with-Python.

Now, let's look at how to install the environments.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset