In this page we give step by step instruction to install airlearning reinforcement learning package and get it up and running. If you have read the paper, then this page will give instruction on setting up the portion highlighted in red in the Air Learning Infrastructure:
The following instructions were tested on Windows 10, Ubuntu 16.04 WSL (Windows 10)
- Windows 10
- Tensorflow-gpu 1.8 (Tested)
- CUDA/CuDNN
(Here is a really good step by step instruction to install Tensorflow/CUDA/CuDNN on Windows 10)
P.S: For Ubuntu users, we have tested this on Ubuntu 16.04, 18.04, Ubuntu Mate platforms. The instructions are the same as below with one caveat:-You need two machines. The first machine will render the Air Learning Environment Generator. This portion is currently tested on Windows 10 machine (We will port it to Ubuntu soon). The second machine will be used to train the reinforcment learning algorithm. This second machine can be Windows 10 or Ubuntu.
On the other hand, if you have a Windows 10 machine, you can run both rendering and RL training on a single machine. So we are providing instruction to install the RL training on Windows 10 here.
Assuming you have installed Python, Pip, Tensorflow/CUDA/CuDNN from correctly from here, get the following packages:
pip install msgpack-rpc-python airsim keras-rl h5py Pillow gym opencv-python eventlet matplotlib PyDrive pandas
Clone the Air Learning Project
$ git clone --recursive https://github.com/harvard-edge/airlearning.git
$ cd airlearning/airlearning-rl
Lets call the directory where airlearning is cloned as <AIRLEARNING_ROOT>
$ cd airlearning-rl/misc/move_to_airsim/
$ python move.py
You need to point to the directory where Unreal Project files are installed. Please install them before you follow the instructions below.The instructions for installing Air Learning Environment Generator is here.
$ cd <AIRLEARNING_ROOT>\airlearning-rl\settings_folder\
$ vim machine_dependent_settings.py
Here is a sample machine_dependent_settings.py file. Please use this as a template and point to the location where you have installed the airlearning-ue4 project.
json_file_addr = "<AIRLEARNING_ROOT>\Content\JsonFiles\EnvGenConfig
game_file = "<AIRLEARNING_ROOT>\airlearning-ue4\AirLearning.uproject"
unreal_host_shared_dir = ""
unreal_exe_path = "C:\\Program Files\\Epic Games\\UE_4.18\\Engine\\Binaries\\Win64\\UE4Editor.exe"
Run the training
$ cd <AIRLEARNING_ROOT>\airlearning-rl\runtime\
$ python collect_data.py
This should start the AirLearning game mode and start the training