PFRL: a PyTorch-based deep reinforcement learning library
  • Python 97.8%
  • Shell 2.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-21 21:26:25 -04:00
.github Update the auto-assigned reviewer list 2021-06-23 12:15:32 +09:00
.pfnci Pin pyglet==1.5.27 in CI to avoid errors 2023-07-16 22:53:45 +09:00
assets Crops PFRL png 2020-08-03 10:25:15 +09:00
docs Applies lint 2025-12-11 00:34:29 -07:00
examples Fix grammar: remove unnecessary 'be' in sentence 2026-03-02 08:41:07 +08:00
examples_tests fix & add examples_tests 2020-07-15 17:41:46 +09:00
pfrl feat(replay_buffers): fix SumTreeQueue._find empty-subtree boundary & add zero-float p/q SumTreePqQ32 + Laser Phoenix Lattice salience gate 2026-10-21 21:26:25 -04:00
tests feat(replay_buffers): fix SumTreeQueue._find empty-subtree boundary & add zero-float p/q SumTreePqQ32 + Laser Phoenix Lattice salience gate 2026-10-21 21:26:25 -04:00
tools Applies lint 2025-12-11 00:34:29 -07:00
.flake8 Initial commit 2020-06-25 17:01:08 +09:00
.gitignore Initial commit 2020-06-25 17:01:08 +09:00
CONTRIBUTING.md Update CONTRIBUTING.md 2025-12-10 23:39:19 -07:00
LICENSE Initial commit 2020-06-25 17:01:08 +09:00
MANIFEST.in Initial commit 2020-06-25 17:01:08 +09:00
pytest.ini Initial commit 2020-06-25 17:01:08 +09:00
README.md chore: fix some typos 2024-04-11 19:55:16 +08:00
readthedocs.yml Initial commit 2020-06-25 17:01:08 +09:00
requirements-dev.txt make optuna optional 2020-11-01 17:01:24 +09:00
requirements.txt make optuna optional 2020-11-01 17:01:24 +09:00
setup.cfg Merge commit '9be4726d32' into optuna-integration2 2020-11-04 11:53:42 +09:00
setup.py Applies lint 2025-12-11 00:34:29 -07:00
test_examples.sh Initial commit 2020-06-25 17:01:08 +09:00

PFRL

Documentation Status PyPI

PFRL is a deep reinforcement learning library that implements various state-of-the-art deep reinforcement algorithms in Python using PyTorch.

Boxing Humanoid Grasping Atlas SlimeVolley

Installation

PFRL is tested with Python 3.7.7. For other requirements, see requirements.txt.

PFRL can be installed via PyPI:

pip install pfrl

It can also be installed from the source code:

python setup.py install

Refer to Installation for more information on installation.

Getting started

You can try PFRL Quickstart Guide first, or check the examples ready for Atari 2600 and Open AI Gym.

For more information, you can refer to PFRL's documentation.

Blog Posts

Algorithms

Algorithm Discrete Action Continuous Action Recurrent Model Batch Training CPU Async Training Pretrained models*
DQN (including DoubleDQN etc.) ✓ ✓ (NAF) ✓ ✓ x ✓
Categorical DQN ✓ x ✓ ✓ x x
Rainbow ✓ x ✓ ✓ x ✓
IQN ✓ x ✓ ✓ x ✓
DDPG x ✓ x ✓ x ✓
A3C ✓ ✓ ✓ ✓ (A2C) ✓ ✓
ACER ✓ ✓ ✓ x ✓ x
PPO ✓ ✓ ✓ ✓ x ✓
TRPO ✓ ✓ ✓ ✓ x ✓
TD3 x ✓ x ✓ x ✓
SAC x ✓ x ✓ x ✓

*Note on Pretrained models: PFRL provides pretrained models (sometimes called a 'model zoo') for our reproducibility scripts on Atari environments (DQN, IQN, Rainbow, and A3C) and Mujoco environments (DDPG, TRPO, PPO, TD3, SAC), for each benchmarked environment.

Following algorithms have been implemented in PFRL:

Following useful techniques have been also implemented in PFRL:

Environments

Environments that support the subset of OpenAI Gym's interface (reset and step methods) can be used.

Contributing

Any kind of contribution to PFRL would be highly appreciated! If you are interested in contributing to PFRL, please read CONTRIBUTING.md.

License

MIT License.

Citations

To cite PFRL in publications, please cite our paper on ChainerRL, the library on which PFRL is based:

@article{JMLR:v22:20-376,
  author  = {Yasuhiro Fujita and Prabhat Nagarajan and Toshiki Kataoka and Takahiro Ishikawa},
  title   = {ChainerRL: A Deep Reinforcement Learning Library},
  journal = {Journal of Machine Learning Research},
  year    = {2021},
  volume  = {22},
  number  = {77},
  pages   = {1-14},
  url     = {http://jmlr.org/papers/v22/20-376.html}
}