added metadata and reward_range for each tasks
This commit is contained in:
parent
106317015d
commit
2c933da684
@ -4,7 +4,7 @@ import numpy as np
|
||||
|
||||
class Atari:
|
||||
LOCK = None
|
||||
|
||||
metadata = {}
|
||||
def __init__(
|
||||
self,
|
||||
name,
|
||||
@ -64,6 +64,7 @@ class Atari:
|
||||
self._last_lives = None
|
||||
self._done = True
|
||||
self._step = 0
|
||||
self.reward_range = [-np.inf, np.inf]
|
||||
|
||||
@property
|
||||
def observation_space(self):
|
||||
|
@ -3,12 +3,14 @@ import numpy as np
|
||||
|
||||
|
||||
class Crafter:
|
||||
metadata = {}
|
||||
def __init__(self, task, size=(64, 64), seed=None):
|
||||
assert task in ("reward", "noreward")
|
||||
import crafter
|
||||
|
||||
self._env = crafter.Env(size=size, reward=(task == "reward"), seed=seed)
|
||||
self._achievements = crafter.constants.achievements.copy()
|
||||
self.reward_range = [-np.inf, np.inf]
|
||||
|
||||
@property
|
||||
def observation_space(self):
|
||||
|
@ -3,6 +3,7 @@ import numpy as np
|
||||
|
||||
|
||||
class DeepMindControl:
|
||||
metadata = {}
|
||||
def __init__(self, name, action_repeat=1, size=(64, 64), camera=None):
|
||||
domain, task = name.split("_", 1)
|
||||
if domain == "cup": # Only domain with multiple words.
|
||||
@ -19,6 +20,7 @@ class DeepMindControl:
|
||||
if camera is None:
|
||||
camera = dict(quadruped=2).get(domain, 0)
|
||||
self._camera = camera
|
||||
self.reward_range = [-np.inf, np.inf]
|
||||
|
||||
@property
|
||||
def observation_space(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user