From cd2696f7e606e7cc4d1e4cf40ceea12f4c67a58e Mon Sep 17 00:00:00 2001 From: Daniel Filan Date: Tue, 19 Jul 2022 17:06:53 -0700 Subject: [PATCH 1/2] Give parabola finite action space --- src/seals/diagnostics/parabola.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/seals/diagnostics/parabola.py b/src/seals/diagnostics/parabola.py index 837a34b..f47c4f0 100644 --- a/src/seals/diagnostics/parabola.py +++ b/src/seals/diagnostics/parabola.py @@ -32,7 +32,7 @@ def __init__(self, x_step: float = 0.05, bounds: float = 5): super().__init__( state_space=spaces.Box(low=state_low, high=state_high), - action_space=spaces.Box(low=-np.inf, high=np.inf, shape=()), + action_space=spaces.Box(low=-2*bounds, high=2*bounds, shape=()), ) def terminal(self, state: int, n_actions_taken: int) -> bool: From 36c30ea0d5560675f9660b91fde3c1b23bc1b2ed Mon Sep 17 00:00:00 2001 From: Daniel Filan Date: Thu, 4 Aug 2022 18:53:10 -0700 Subject: [PATCH 2/2] Add whitespace around * sign --- src/seals/diagnostics/parabola.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/seals/diagnostics/parabola.py b/src/seals/diagnostics/parabola.py index f47c4f0..07c9b8b 100644 --- a/src/seals/diagnostics/parabola.py +++ b/src/seals/diagnostics/parabola.py @@ -32,7 +32,7 @@ def __init__(self, x_step: float = 0.05, bounds: float = 5): super().__init__( state_space=spaces.Box(low=state_low, high=state_high), - action_space=spaces.Box(low=-2*bounds, high=2*bounds, shape=()), + action_space=spaces.Box(low=(-2) * bounds, high=2 * bounds, shape=()), ) def terminal(self, state: int, n_actions_taken: int) -> bool: