mirror of
https://github.com/wassname/ray.git
synced 2026-06-29 18:10:13 +08:00
Keep parameter space noise consistent with action space noise (Fix 5173) (#5193)
* make parameter space noise consistent with action space noise * modified according to lint check * indent
This commit is contained in:
@@ -58,7 +58,10 @@ class DDPGPostprocessing(object):
|
||||
distance_in_action_space = np.sqrt(
|
||||
np.mean(np.square(clean_actions - noisy_actions)))
|
||||
self.pi_distance = distance_in_action_space
|
||||
if distance_in_action_space < self.config["exploration_ou_sigma"]:
|
||||
if distance_in_action_space < \
|
||||
self.config["exploration_ou_sigma"] * self.cur_noise_scale:
|
||||
# multiplying the sampled OU noise by noise scale is
|
||||
# equivalent to multiplying the sigma of OU by noise scale
|
||||
self.parameter_noise_sigma_val *= 1.01
|
||||
else:
|
||||
self.parameter_noise_sigma_val /= 1.01
|
||||
|
||||
Reference in New Issue
Block a user