RLlib: Production-grade deep reinforcement learning
As we mentioned at the beginning, one of the motivations of Ray's creators is to build an easy-to-use distributed computing framework that can handle complex and heterogenous applications such as deep reinforcement learning. With that, they also created a widely-used deep RL library based on Ray. Training a model similar to ours is very simple using RLlib. The main steps are:
- Import the default training configs for Ape-X DQN as well as the trainer,
- Customize the training configs,
- Train the trainer.
That's it! The code necessary for that is very simple. All you need is the following:
Chapter06/rllib_apex_dqn.py
import pprint from ray import tune from ray.rllib.agents.dqn.apex import APEX_DEFAULT_CONFIG from ray.rllib.agents.dqn.apex import ApexTrainer if __name__ == '__main__': config = APEX_DEFAULT_CONFIG.copy() pp = pprint.PrettyPrinter...