Added Env 'ColumbusTest3_1'

This commit is contained in:
Dominik Moritz Roth 2022-06-19 15:59:23 +02:00
parent 57d8068da7
commit abad4bd6f1
2 changed files with 8 additions and 3 deletions

5
env.py
View File

@ -200,3 +200,8 @@ class ColumbusEnv(gym.Env):
def close(self):
pygame.display.quit()
pygame.quit()
class ColumbusTest3_1(ColumbusEnv):
def __init__(self):
super(ColumbusEnv, self).__init__(observables.CnnObservable())

View File

@ -8,6 +8,9 @@ class Observable():
self.obs = None
pass
def _set_env(self, env):
self.env = env
def get_observation_space():
print("[!] Using dummyObservable. Env won't output anything")
return spaces.Box(low=0, high=255,
@ -28,9 +31,6 @@ class CnnObservable(Observable):
else:
self.scaler = pygame.transform.scale
def _set_env(self, env):
self.env = env
def get_observation_space(self):
return spaces.Box(low=0, high=255,
shape=(self.out_width, self.out_height), dtype=np.uint8)