From 0c9e5db9cbc2c47cdf3c480cafcdf32425c378ca Mon Sep 17 00:00:00 2001 From: Sven Mika Date: Thu, 27 Feb 2020 21:49:08 +0100 Subject: [PATCH] Fix SAC bug (twin Q not used for min'ing over both Q-nets in loss func). (#7354) --- rllib/agents/sac/sac_policy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rllib/agents/sac/sac_policy.py b/rllib/agents/sac/sac_policy.py index e87124e14..1d4ec6c35 100644 --- a/rllib/agents/sac/sac_policy.py +++ b/rllib/agents/sac/sac_policy.py @@ -160,7 +160,7 @@ def actor_critic_loss(policy, model, _, train_batch): # Q-values for current policy (no noise) in given current state q_t_det_policy = model.get_q_values(model_out_t, policy_t) if policy.config["twin_q"]: - twin_q_t_det_policy = model.get_q_values(model_out_t, policy_t) + twin_q_t_det_policy = model.get_twin_q_values(model_out_t, policy_t) q_t_det_policy = tf.reduce_min( (q_t_det_policy, twin_q_t_det_policy), axis=0)