mirror of
https://github.com/saymrwulf/stable-baselines3.git
synced 2026-06-06 00:03:28 +00:00
Update docstring
This commit is contained in:
parent
5c94a225ef
commit
6ae8421615
1 changed files with 4 additions and 0 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in a new issue