09.05.2023 Views

pdfcoffee

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Reinforcement Learning

Today there exists a large number of platforms that can be used for the creation of an

environment. Some popular ones are:

• OpenAI Gym: It contains a collection of environments that we can use to

train our RL agents. In this chapter, we'll be using the OpenAI Gym interface.

• Unity ML-Agents SDK: It allows developers to transform games and

simulations created using the Unity editor into environments where

intelligent agents can be trained using DRL, evolutionary strategies, or

other machine learning methods through a simple-to-use Python API. It

works with TensorFlow and provides the ability to train intelligent agents

for 2D/3D and VR/AR games. You can learn more about it here: https://

github.com/Unity-Technologies/ml-agents.

• Gazebo: In Gazebo, we can build three-dimensional worlds with physicsbased

simulation. Gazebo along with Robot Operating System (ROS) and

the OpenAI Gym interface is gym-gazebo and can be used to train RL agents.

To know more about this, you can refer to the white paper: https://arxiv.

org/abs/1608.05742.

• Blender learning environment: It's a Python interface for the Blender game

engine, and it also works over OpenAI Gym. It has at its base Blender: a free

3D modeling software with an integrated game engine. This provides an easy

to use, powerful set of tools for creating games. It provides an interface to

the Blender game engine, and the games themselves are designed in Blender.

We can then create the custom virtual environment to train an RL agent on a

specific problem (https://github.com/LouisFoucard/gym-blender).

• Malmö: Built by the Microsoft Team, Malmö is a platform for AI

experimentation and research built on top of Minecraft. It provides a simple

API for creating tasks and missions. You can learn more about Project Malmo

here: https://www.microsoft.com/en-us/research/project/projectmalmo/.

We will be using OpenAI Gym to provide an environment for our agent. OpenAI

Gym is an open source toolkit to develop and compare RL algorithms. It contains a

variety of simulated environments that can be used to train agents and develop new

RL algorithms.

The first thing to do is install OpenAI Gym, the following command will install the

minimal gym package:

pip install gym

If you want to install all (free) gym modules prefix it by [all]:

pip install gym[all]

[ 416 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!