From 2493e0c8a53447c552601a645f18ea0f5172b5b7 Mon Sep 17 00:00:00 2001 From: Richard Jozsa <38407205+richardjozsa@users.noreply.github.com> Date: Wed, 31 Aug 2022 16:37:02 +0200 Subject: [PATCH] Unnecessary lines in Base4, and changes for box space, to fit better for our needs (#7324) --- freqtrade/freqai/RL/Base4ActionRLEnv.py | 4 ---- freqtrade/freqai/RL/BaseEnvironment.py | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/freqtrade/freqai/RL/Base4ActionRLEnv.py b/freqtrade/freqai/RL/Base4ActionRLEnv.py index ef5b1c107..d2b92a954 100644 --- a/freqtrade/freqai/RL/Base4ActionRLEnv.py +++ b/freqtrade/freqai/RL/Base4ActionRLEnv.py @@ -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") diff --git a/freqtrade/freqai/RL/BaseEnvironment.py b/freqtrade/freqai/RL/BaseEnvironment.py index bba3c4a1b..bb43f5300 100644 --- a/freqtrade/freqai/RL/BaseEnvironment.py +++ b/freqtrade/freqai/RL/BaseEnvironment.py @@ -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