From deb33bce84efa42ac9d8d8c9dc90492da7b59b4c Mon Sep 17 00:00:00 2001 From: Sven Mika Date: Thu, 10 Dec 2020 14:55:19 +0100 Subject: [PATCH] [RLlib] Add DQN SoftQ learning test case. (#12712) --- rllib/BUILD | 2 ++ rllib/tuned_examples/dqn/cartpole-dqn-softq.yaml | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 rllib/tuned_examples/dqn/cartpole-dqn-softq.yaml diff --git a/rllib/BUILD b/rllib/BUILD index daed4b8f7..bd612d0ff 100644 --- a/rllib/BUILD +++ b/rllib/BUILD @@ -172,6 +172,7 @@ py_test( data = [ "tuned_examples/dqn/cartpole-simpleq.yaml", "tuned_examples/dqn/cartpole-dqn.yaml", + "tuned_examples/dqn/cartpole-dqn-softq.yaml", "tuned_examples/dqn/cartpole-dqn-param-noise.yaml", ], args = ["--yaml-dir=tuned_examples/dqn"] @@ -186,6 +187,7 @@ py_test( data = [ "tuned_examples/dqn/cartpole-simpleq.yaml", "tuned_examples/dqn/cartpole-dqn.yaml", + "tuned_examples/dqn/cartpole-dqn-softq.yaml", "tuned_examples/dqn/cartpole-dqn-param-noise.yaml", ], args = ["--yaml-dir=tuned_examples/dqn", "--torch"] diff --git a/rllib/tuned_examples/dqn/cartpole-dqn-softq.yaml b/rllib/tuned_examples/dqn/cartpole-dqn-softq.yaml new file mode 100644 index 000000000..c6919140b --- /dev/null +++ b/rllib/tuned_examples/dqn/cartpole-dqn-softq.yaml @@ -0,0 +1,16 @@ +cartpole-dqn: + env: CartPole-v0 + run: DQN + stop: + episode_reward_mean: 150 + timesteps_total: 100000 + config: + # Works for both torch and tf. + framework: tf + model: + fcnet_hiddens: [64] + fcnet_activation: linear + n_step: 3 + exploration_config: + type: SoftQ + temperature: 0.5 \ No newline at end of file