Files
baselines/README.md

86 lines
3.0 KiB
Markdown
Raw Normal View History

<img src="data/logo.jpg" width=25% align="right" /> [![Build status](https://travis-ci.org/openai/baselines.svg?branch=master)](https://travis-ci.org/openai/baselines)
2017-05-17 14:41:46 -07:00
2017-07-20 09:00:24 -07:00
# Baselines
2017-05-17 14:41:46 -07:00
2017-07-20 09:00:24 -07:00
OpenAI Baselines is a set of high-quality implementations of reinforcement learning algorithms.
2017-05-17 14:41:46 -07:00
These algorithms will make it easier for the research community to replicate, refine, and identify new ideas, and will create good baselines to build research on top of. Our DQN implementation and its variants are roughly on par with the scores in published papers. We expect they will be used as a base around which new ideas can be added, and as a tool for comparing a new approach against existing ones.
## Prerequisites
Baselines requires python3 (>=3.5) with the development headers. You'll also need system packages CMake, OpenMPI and zlib. Those can be installed as follows
### Ubuntu
```bash
sudo apt-get update && sudo apt-get install cmake libopenmpi-dev python3-dev zlib1g-dev
```
### Mac OS X
Installation of system packages on Mac requires [Homebrew](https://brew.sh). With Homebrew installed, run the follwing:
```bash
brew install cmake openmpi
```
## Virtual environment
From the general python package sanity perspective, it is a good idea to use virtual environments (virtualenvs) to make sure packages from different projects do not interfere with each other. You can install virtualenv (which is itself a pip package) via
```bash
pip install virtualenv
```
Virtualenvs are essentially folders that have copies of python executable and all python packages.
To create a virtualenv called venv with python3, one runs
```bash
virtualenv /path/to/venv --python=python3
```
To activate a virtualenv:
```
. /path/to/venv/bin/activate
```
More thorough tutorial on virtualenvs and options can be found [here](https://virtualenv.pypa.io/en/stable/)
2017-05-17 14:41:46 -07:00
## Installation
Clone the repo and cd into it:
2017-05-17 14:41:46 -07:00
```bash
2017-08-18 09:25:39 -07:00
git clone https://github.com/openai/baselines.git
cd baselines
```
If using virtualenv, create a new virtualenv and activate it
```bash
virtualenv env --python=python3
. env/bin/activate
```
Install baselines package
```bash
2017-08-18 09:25:39 -07:00
pip install -e .
2017-05-17 14:41:46 -07:00
```
## Testing the installation
All unit tests in baselines can be run using pytest runner:
```
pip install pytest
pytest
```
## Subpackages
2017-08-18 09:25:39 -07:00
- [A2C](baselines/a2c)
2017-11-16 10:02:32 -08:00
- [ACER](baselines/acer)
2017-08-18 09:25:39 -07:00
- [ACKTR](baselines/acktr)
- [DDPG](baselines/ddpg)
2017-07-20 08:52:35 -07:00
- [DQN](baselines/deepq)
2018-01-23 12:00:00 +09:00
- [GAIL](baselines/gail)
- [HER](baselines/her)
2017-11-16 10:02:32 -08:00
- [PPO1](baselines/ppo1) (Multi-CPU using MPI)
- [PPO2](baselines/ppo2) (Optimized for GPU)
2017-07-20 08:52:35 -07:00
- [TRPO](baselines/trpo_mpi)
To cite this repository in publications:
@misc{baselines,
author = {Dhariwal, Prafulla and Hesse, Christopher and Klimov, Oleg and Nichol, Alex and Plappert, Matthias and Radford, Alec and Schulman, John and Sidor, Szymon and Wu, Yuhuai},
title = {OpenAI Baselines},
year = {2017},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/openai/baselines}},
}