Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed issue when generating documentation #414

Merged
merged 13 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-docs-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
run: pip install -r docs/requirements.txt

- name: Register Envs
run: pip install -e .
run: pip install -e .[wfc]

- name: Build Envs Docs
run: python docs/_scripts/gen_env_docs.py
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-docs-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run: pip install -r docs/requirements.txt

- name: Register Envs
run: pip install -e .
run: pip install -e .[wfc]

- name: Build Envs Docs
run: python docs/_scripts/gen_env_docs.py
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual-build-docs-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
run: pip install -r docs/requirements.txt

- name: Register Envs
run: pip install -e .
run: pip install -e .[wfc]

- name: Build Envs Docs
run: python docs/_scripts/gen_env_docs.py
Expand Down
8 changes: 4 additions & 4 deletions minigrid/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ def register_minigrid_envs():

register(
id="MiniGrid-ObstructedMaze-2Dlhb-v1",
entry_point="minigrid.envs.obstructedmaze_v1:ObstructedMaze_Full",
entry_point="minigrid.envs:ObstructedMaze_Full_V1",
kwargs={
"agent_room": (2, 1),
"key_in_box": True,
Expand All @@ -490,7 +490,7 @@ def register_minigrid_envs():

register(
id="MiniGrid-ObstructedMaze-1Q-v1",
entry_point="minigrid.envs.obstructedmaze_v1:ObstructedMaze_Full",
entry_point="minigrid.envs:ObstructedMaze_Full_V1",
kwargs={
"agent_room": (1, 1),
"key_in_box": True,
Expand All @@ -502,7 +502,7 @@ def register_minigrid_envs():

register(
id="MiniGrid-ObstructedMaze-2Q-v1",
entry_point="minigrid.envs.obstructedmaze_v1:ObstructedMaze_Full",
entry_point="minigrid.envs:ObstructedMaze_Full_V1",
kwargs={
"agent_room": (2, 1),
"key_in_box": True,
Expand All @@ -514,7 +514,7 @@ def register_minigrid_envs():

register(
id="MiniGrid-ObstructedMaze-Full-v1",
entry_point="minigrid.envs.obstructedmaze_v1:ObstructedMaze_Full",
entry_point="minigrid.envs:ObstructedMaze_Full_V1",
)

# Playground
Expand Down
1 change: 1 addition & 0 deletions minigrid/envs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
ObstructedMaze_Full,
ObstructedMazeEnv,
)
from minigrid.envs.obstructedmaze_v1 import ObstructedMaze_Full_V1
from minigrid.envs.playground import PlaygroundEnv
from minigrid.envs.putnear import PutNearEnv
from minigrid.envs.redbluedoors import RedBlueDoorEnv
Expand Down
2 changes: 1 addition & 1 deletion minigrid/envs/obstructedmaze_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from minigrid.envs.obstructedmaze import ObstructedMazeEnv


class ObstructedMaze_Full(ObstructedMazeEnv):
class ObstructedMaze_Full_V1(ObstructedMazeEnv):
"""
A blue ball is hidden in one of the 4 corners of a 3x3 maze. Doors
are locked, doors are obstructed by a ball and keys are hidden in
Expand Down
5 changes: 5 additions & 0 deletions minigrid/minigrid_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,11 @@ def pprint_grid(self):

output = ""

# check if self.agent_pos & self.agent_dir is None
# should not be after env is reset
if self.agent_pos is None:
return super().__str__()

for j in range(self.grid.height):
for i in range(self.grid.width):
if i == self.agent_pos[0] and j == self.agent_pos[1]:
Expand Down
Loading