A collection of RL algorithms.
See model_zoo
for pretrained models on various environments.
For running a general model:
python -m rl.run --env=<env>
where <env>
is the name of a configuration file under configs/
(like snake_spr
).
For running a model using explicit multithreading:
mpiexec -n <n_threads> python -m rl.run_mpi
which splits up rollouts and gradient computation onto <n_threads>
threads. Currently, this only makes sense for PPO
as the training bottleneck for DQN
-like agents are the update steps (which TensorFlow parallelizes across threads) and not environment interaction.
For running a model on GPU:
CUDA_VISIBLE_DEVICES=<device> python -m rl.run --env=<env>
where <device>
is the id of the GPU to use (i.e. CUDA_VISIBLE_DEVICES=0
).
scripts/setup.sh
pre-commit
installed. Run pre-commit install
in the root of the repo