Created
February 11, 2020 15:36
-
-
Save ikatsov/4ddcf86d5bb61805c5bda327678aef24 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import ray | |
| import ray.rllib.agents.dqn as dqn | |
| def train_dqn(): | |
| config = dqn.DEFAULT_CONFIG.copy() | |
| config["log_level"] = "WARN" | |
| config["train_batch_size"] = 256 | |
| config["buffer_size"] = 10000 | |
| config["hiddens"] = [128, 128, 128] | |
| trainer = dqn.DQNTrainer(config=config, env=HiLoPricingEnv) | |
| for i in range(50): | |
| result = trainer.train() | |
| print(pretty_print(result)) | |
| train_dqn() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment