Update docstring

This commit is contained in:
Antonin Raffin 2020-01-28 10:28:44 +01:00
parent 5c94a225ef
commit 6ae8421615

View file

@ -144,6 +144,8 @@ class BaseRLModel(ABC):
"""
Rescale the action from [low, high] to [-1, 1]
(no need for symmetric action space)
:param action: Action to scale
"""
low, high = self.action_space.low, self.action_space.high
return 2.0 * ((action - low) / (high - low)) - 1.0
@ -152,6 +154,8 @@ class BaseRLModel(ABC):
"""
Rescale the action from [-1, 1] to [low, high]
(no need for symmetric action space)
:param scaled_action: Action to un-scale
"""
low, high = self.action_space.low, self.action_space.high
return low + (0.5 * (scaled_action + 1.0) * (high - low))