Skip to main content

TF-Agents: A Reinforcement Learning Library for TensorFlow

Project description

# TF-Agents: A library for Reinforcement Learning in TensorFlow

*NOTE:* Current TF-Agents pre-release is under active development and
interfaces may change at any time. Feel free to provide feedback and comments.

The documentation, examples and tutorials will grow over the next few weeks.

## Table of contents

<a href="#Agents">Agents</a><br>
<a href="#Tutorials">Tutorials</a><br>
<a href='#Examples'>Examples</a><br>
<a href="#Installation">Installation</a><br>
<a href='#Contributing'>Contributing</a><br>
<a href='#Principles'>Principles</a><br>
<a href='#Citation'>Citation</a><br>
<a href='#Disclaimer'>Disclaimer</a><br>

<a id='Agents'></a>
## Agents

In TF-Agents, the core elements of RL algorithms are implemented as `Agents`.
An agent encompasses two main responsibilities: defining a Policy to interact
with the Environment, and how to learn/train that Policy from collected

Currently the following algorithms are available under TF-Agents:

* DQN: __Human level control through deep reinforcement learning__ Mnih et al., 2015
* DDQN: __Deep Reinforcement Learning with Double Q-learning__ Hasselt et al., 2015
* DDPG: __Continuous control with deep reinforcement learning__ Lilicrap et al.
* TD3: __Addressing Function Approximation Error in Actor-Critic Methods__ Fujimoto et al.
* REINFORCE: __Simple Statistical Gradient-Following Algorithms for Connectionist Reinforcement Learning__ Williams
* PPO: __Proximal Policy Optimization Algorithms__ Schulman et al.
* SAC: __Soft Actor Critic__ Haarnoja et al.

<a id='Tutorials'></a>
## Tutorials

See [`tf_agents/colabs/`](
for tutorials on the major components provided.

<a id='Examples'></a>
## Examples
End-to-end examples training agents can be found under each agent directory.

* DQN: [`tf_agents/agents/dqn/examples/`](

<a id='Installation'></a>
## Installation

To install the latest version, use nightly builds of TF-Agents under the pip package
`tf-agents-nightly`, which requires you install on one of `tf-nightly` and
`tf-nightly-gpu` and also `tensorflow-probability-nightly`.
Nightly builds include newer features, but may be less stable than the versioned releases.

To install the nightly build version, run the following:

# Installing with the `--upgrade` flag ensures you'll get the latest version.
pip install --user --upgrade tf-agents-nightly # depends on tf-nightly

<a id='Contributing'></a>
## Contributing

We're eager to collaborate with you! See [``](
for a guide on how to contribute. This project adheres to TensorFlow's
[code of conduct]( By participating, you are expected to
uphold this code.

<a id='Principles'></a>
## Principles

This project adheres to [Google's AI principles](
By participating, using or contributing to this project you are expected to
adhere to these principles.

<a id='Citation'></a>
## Citation

If you use this code please cite it as:

title = {{TF-Agents}: A library for Reinforcement Learning in TensorFlow},
author = "{Sergio Guadarrama, Anoop Korattikara, Oscar Ramirez,
Pablo Castro, Ethan Holly, Sam Fishman, Ke Wang, Ekaterina Gonina,
Chris Harris, Vincent Vanhoucke, Eugene Brevdo}",
howpublished = {\url{}},
url = "",
year = 2018,
note = "[Online; accessed 30-November-2018]"

<a id='Disclaimer'></a>
## Disclaimer

This is not an official Google product.

Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for tf-agents-nightly, version 0.2.0.dev20190117
Filename, size File type Python version Upload date Hashes
Filename, size tf_agents_nightly-0.2.0.dev20190117-py2.py3-none-any.whl (448.5 kB) File type Wheel Python version py2.py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page