Unnecessary lines in Base4, and changes for box space, to fit better for our needs (#7324)

This commit is contained in:
Richard Jozsa 2022-08-31 16:37:02 +02:00 committed by GitHub
parent 1a8e1362a1
commit 2493e0c8a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 5 deletions

View File

@ -66,10 +66,6 @@ class Base4ActionRLEnv(BaseEnvironment):
self._position = Positions.Neutral
trade_type = "neutral"
self._last_trade_tick = None
elif action == Actions.Exit.value:
self._position = Positions.Neutral
trade_type = "neutral"
self._last_trade_tick = None
else:
print("case not defined")

View File

@ -57,7 +57,7 @@ class BaseEnvironment(gym.Env):
self.shape = (window_size, self.signal_features.shape[1] + 3)
self.set_action_space()
self.observation_space = spaces.Box(
low=-np.inf, high=np.inf, shape=self.shape, dtype=np.float32)
low=-1, high=1, shape=self.shape, dtype=np.float32)
# episode
self._start_tick: int = self.window_size