This repository contains a modular framework for testing Deep Reinforcement Learning algorithms in OpenAI's Gym. All the agents are implemented in Tensorflow.
- Python >= 3 - if you want to use Mujoco, you will need to install Python 3.5.2 (as of 23.7.2017)
- OpenAI gym
- Tensorflow and other packages listed in requirements.txt
Mujoco is required only if you want to test continuous control tasks like Reacher-v1. Installing Mujoco for Python is quite difficult as of 23.7.2017. Your best bet is to follow this thread. Be advised that installing xserver-xorg-dev might stop Ubuntu from receiving keyboard and mouse input.
You can run continuous control task using train_continuous_task.py and discrete control tasks with train_discrete_task.py.
Both of the scripts take the following four arguments:
- environment name
- agent name
- state preprocessing
- exploration policy
Most of the environments don't need any specific state preprocessing. Pass the value simple in this case.
On the other hand, environments like Atari are easier to solve if several frames are stacked on top of each other and preprocessed. In that case, pass the value atari.
You can contribute by create a new agent.
Each agent should have the following public methods:
- learn: perform a single training step
- act: generate an action given a state
- perceive: save a transition into the replay buffer (only Temporal Difference methods are supported for now)
- log_scalar: log scalar to a tensorboard summary; you can leave this method empty
- save: save the agent
- close: close the agent's session