mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
add action_masks
This commit is contained in:
parent
fd940dbba2
commit
afd54d39a5
|
@ -141,6 +141,9 @@ class BaseEnvironment(gym.Env):
|
|||
Unique to the environment action count. Must be inherited.
|
||||
"""
|
||||
|
||||
def action_masks(self) -> list[bool]:
|
||||
return [self._is_valid(action.value) for action in self.actions]
|
||||
|
||||
def seed(self, seed: int = 1):
|
||||
self.np_random, seed = seeding.np_random(seed)
|
||||
return [seed]
|
||||
|
|
Loading…
Reference in New Issue
Block a user