Skip to content

Commit

Permalink
docs: docstring clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
koulanurag committed Feb 19, 2024
1 parent a2d33f6 commit b977437
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions maze_world/envs/maze.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@ def __init__(
@property
def action_space(self):
"""
Actions available corresponding to each index: ["right", "up", "left", "down"].
Specifies available discrete action for the environment, where
0. "right"
1. "up"
2. "left"
3. "down"
:return: Discrete action space object representing the possible actions.
:rtype: gym.spaces.Discrete
Expand Down Expand Up @@ -219,7 +223,7 @@ def step(self, action: int):
:param action: The action to take.
:type action: int
:return: A tuple containing:
:return:
- observation: Agent's current observation of the environment.
- reward (float): Reward received after taking the step.
- terminated (bool): Whether the episode has terminated or not.
Expand Down Expand Up @@ -256,6 +260,9 @@ def step(self, action: int):
return observation, reward, terminated, False, info

def render(self):
"""
Compute the render frames as specified by `render_mode` during the initialization of the environment.
"""
if self.render_mode == "rgb_array":
return self._render_frame()

Expand Down

0 comments on commit b977437

Please sign in to comment.