diff --git a/template/{{environment_name}}/envs/grid_world.py b/template/{{environment_name}}/envs/grid_world.py index cda19dc..08df753 100644 --- a/template/{{environment_name}}/envs/grid_world.py +++ b/template/{{environment_name}}/envs/grid_world.py @@ -38,10 +38,10 @@ def __init__(self, render_mode=None, size=5): i.e. 0 corresponds to "right", 1 to "up" etc. """ self._action_to_direction = { - Actions.right: np.array([1, 0]), - Actions.up: np.array([0, 1]), - Actions.left: np.array([-1, 0]), - Actions.down: np.array([0, -1]), + Actions.right.value: np.array([1, 0]), + Actions.up.value: np.array([0, 1]), + Actions.left.value: np.array([-1, 0]), + Actions.down.value: np.array([0, -1]), } assert render_mode is None or render_mode in self.metadata["render_modes"]