Make TRoom a bit larger
This commit is contained in:
parent
e2932b5e4b
commit
2444d09220
@ -249,7 +249,7 @@ class GoalRewardTRoom(MazeTask):
|
|||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
scale: float,
|
scale: float,
|
||||||
goals: List[Tuple[float, float]] = [(2.0, -3.0)],
|
goals: List[Tuple[float, float]] = [(2.0, -4.0)],
|
||||||
) -> None:
|
) -> None:
|
||||||
super().__init__(scale)
|
super().__init__(scale)
|
||||||
self.goals = []
|
self.goals = []
|
||||||
@ -270,6 +270,7 @@ class GoalRewardTRoom(MazeTask):
|
|||||||
[B, E, E, B, E, E, B],
|
[B, E, E, B, E, E, B],
|
||||||
[B, E, E, B, E, E, B],
|
[B, E, E, B, E, E, B],
|
||||||
[B, E, B, B, B, E, B],
|
[B, E, B, B, B, E, B],
|
||||||
|
[B, E, E, E, E, E, B],
|
||||||
[B, E, E, R, E, E, B],
|
[B, E, E, R, E, E, B],
|
||||||
[B, B, B, B, B, B, B],
|
[B, B, B, B, B, B, B],
|
||||||
]
|
]
|
||||||
|
@ -28,7 +28,7 @@ def test_point_maze(maze_id):
|
|||||||
|
|
||||||
@pytest.mark.parametrize("v", [0, 1])
|
@pytest.mark.parametrize("v", [0, 1])
|
||||||
def test_maze_args(v):
|
def test_maze_args(v):
|
||||||
env = gym.make(f"PointTRoom-v{v}", task_kwargs={"goals": [(-2.0, -3.0)]})
|
env = gym.make(f"PointTRoom-v{v}", task_kwargs={"goals": [(-2.0, -4.0)]})
|
||||||
assert env.reset().shape == (7,)
|
assert env.reset().shape == (7,)
|
||||||
s, _, _, _ = env.step(env.action_space.sample())
|
s, _, _, _ = env.step(env.action_space.sample())
|
||||||
assert s.shape == (7,)
|
assert s.shape == (7,)
|
||||||
|
Loading…
Reference in New Issue
Block a user