Browse Source

Update Minigrid with pre-commit, fix ci, and clean up (#465)

Mark Towers 3 months ago
parent
commit
5165f40122
100 changed files with 164 additions and 118 deletions
  1. 1 1
      .github/ISSUE_TEMPLATE/bug.md
  2. 1 1
      .github/ISSUE_TEMPLATE/proposal.md
  3. 14 0
      .github/dependabot.yml
  4. 0 0
      docker_entrypoint
  5. 16 0
      .github/docker/py-old.Dockerfile
  6. 3 6
      py.Dockerfile
  7. 1 1
      .github/stale.yml
  8. 1 1
      .github/workflows/build-docs-dev.yml
  9. 1 1
      .github/workflows/build-docs-version.yml
  10. 0 22
      .github/workflows/build.yml
  11. 1 1
      .github/workflows/manual-build-docs-version.yml
  12. 1 1
      .github/workflows/pre-commit.yml
  13. 6 19
      .github/workflows/build-publish.yml
  14. 33 0
      .github/workflows/pytest.yml
  15. 31 15
      .pre-commit-config.yaml
  16. 0 1
      CNAME
  17. 0 1
      CODE_OF_CONDUCT.rst
  18. 3 3
      README.md
  19. 5 3
      docs/_scripts/gen_env_docs.py
  20. 8 1
      docs/_scripts/gen_gifs.py
  21. 12 12
      docs/_static/img/minigrid-white.svg
  22. 12 12
      docs/_static/img/minigrid.svg
  23. BIN
      docs/_static/videos/babyai/ActionObjDoor.gif
  24. BIN
      docs/_static/videos/babyai/BlockedUnlockPickup.gif
  25. BIN
      docs/_static/videos/babyai/BossLevel.gif
  26. BIN
      docs/_static/videos/babyai/BossLevelNoUnlock.gif
  27. BIN
      docs/_static/videos/babyai/FindObjS5.gif
  28. BIN
      docs/_static/videos/babyai/GoTo.gif
  29. BIN
      docs/_static/videos/babyai/GoToDoor.gif
  30. BIN
      docs/_static/videos/babyai/GoToImpUnlock.gif
  31. BIN
      docs/_static/videos/babyai/GoToLocal.gif
  32. BIN
      docs/_static/videos/babyai/GoToObj.gif
  33. BIN
      docs/_static/videos/babyai/GoToObjDoor.gif
  34. BIN
      docs/_static/videos/babyai/GoToRedBall.gif
  35. BIN
      docs/_static/videos/babyai/GoToRedBallGrey.gif
  36. BIN
      docs/_static/videos/babyai/GoToRedBallNoDists.gif
  37. BIN
      docs/_static/videos/babyai/GoToRedBlueBall.gif
  38. BIN
      docs/_static/videos/babyai/GoToSeq.gif
  39. BIN
      docs/_static/videos/babyai/KeyCorridor.gif
  40. BIN
      docs/_static/videos/babyai/KeyInBox.gif
  41. BIN
      docs/_static/videos/babyai/MiniBossLevel.gif
  42. BIN
      docs/_static/videos/babyai/MoveTwoAcross.gif
  43. BIN
      docs/_static/videos/babyai/OneRoomS8.gif
  44. BIN
      docs/_static/videos/babyai/Open.gif
  45. BIN
      docs/_static/videos/babyai/OpenDoor.gif
  46. BIN
      docs/_static/videos/babyai/OpenDoorsOrder.gif
  47. BIN
      docs/_static/videos/babyai/OpenRedDoor.gif
  48. BIN
      docs/_static/videos/babyai/OpenTwoDoors.gif
  49. BIN
      docs/_static/videos/babyai/Pickup.gif
  50. BIN
      docs/_static/videos/babyai/PickupAbove.gif
  51. BIN
      docs/_static/videos/babyai/PickupDist.gif
  52. BIN
      docs/_static/videos/babyai/PickupLoc.gif
  53. BIN
      docs/_static/videos/babyai/PutNext.gif
  54. BIN
      docs/_static/videos/babyai/PutNextLocal.gif
  55. BIN
      docs/_static/videos/babyai/Synth.gif
  56. BIN
      docs/_static/videos/babyai/SynthLoc.gif
  57. BIN
      docs/_static/videos/babyai/SynthSeq.gif
  58. BIN
      docs/_static/videos/babyai/UnblockPickup.gif
  59. BIN
      docs/_static/videos/babyai/Unlock.gif
  60. BIN
      docs/_static/videos/babyai/UnlockLocal.gif
  61. BIN
      docs/_static/videos/babyai/UnlockPickup.gif
  62. BIN
      docs/_static/videos/babyai/UnlockToUnlock.gif
  63. BIN
      docs/_static/videos/minigrid/BlockedUnlockPickupEnv.gif
  64. BIN
      docs/_static/videos/minigrid/CrossingEnv.gif
  65. BIN
      docs/_static/videos/minigrid/DistShiftEnv.gif
  66. BIN
      docs/_static/videos/minigrid/DoorKeyEnv.gif
  67. BIN
      docs/_static/videos/minigrid/DynamicObstaclesEnv.gif
  68. BIN
      docs/_static/videos/minigrid/EmptyEnv.gif
  69. BIN
      docs/_static/videos/minigrid/FetchEnv.gif
  70. BIN
      docs/_static/videos/minigrid/FourRoomsEnv.gif
  71. BIN
      docs/_static/videos/minigrid/GoToDoorEnv.gif
  72. BIN
      docs/_static/videos/minigrid/GoToObjectEnv.gif
  73. BIN
      docs/_static/videos/minigrid/KeyCorridorEnv.gif
  74. BIN
      docs/_static/videos/minigrid/LavaGapEnv.gif
  75. BIN
      docs/_static/videos/minigrid/LockedRoomEnv.gif
  76. BIN
      docs/_static/videos/minigrid/MemoryEnv.gif
  77. BIN
      docs/_static/videos/minigrid/MultiRoomEnv.gif
  78. BIN
      docs/_static/videos/minigrid/ObstructedMaze_1Dlhb.gif
  79. BIN
      docs/_static/videos/minigrid/ObstructedMaze_Full.gif
  80. BIN
      docs/_static/videos/minigrid/ObstructedMaze_Full_V1.gif
  81. BIN
      docs/_static/videos/minigrid/PlaygroundEnv.gif
  82. BIN
      docs/_static/videos/minigrid/PutNearEnv.gif
  83. BIN
      docs/_static/videos/minigrid/RedBlueDoorEnv.gif
  84. BIN
      docs/_static/videos/minigrid/UnlockEnv.gif
  85. BIN
      docs/_static/videos/minigrid/UnlockPickupEnv.gif
  86. BIN
      docs/_static/videos/wfc/DungeonMazeScaled.gif
  87. BIN
      docs/_static/videos/wfc/MazeSimple.gif
  88. BIN
      docs/_static/videos/wfc/ObstaclesAngular.gif
  89. BIN
      docs/_static/videos/wfc/ObstaclesBlackdots.gif
  90. BIN
      docs/_static/videos/wfc/ObstaclesHogs3.gif
  91. BIN
      docs/_static/videos/wfc/RoomsFabric.gif
  92. 3 3
      docs/api/wrapper.md
  93. 5 5
      docs/content/create_env_tutorial.md
  94. 1 1
      docs/content/installation.md
  95. 1 2
      docs/content/publications.md
  96. 2 2
      docs/content/training.md
  97. 1 1
      docs/environments/minigrid/index.md
  98. 0 1
      docs/index.md
  99. 1 1
      docs/release_notes.md
  100. 0 0
      minigrid/envs/babyai/core/levelgen.py

+ 1 - 1
.github/ISSUE_TEMPLATE/bug.md

@@ -24,4 +24,4 @@ Add any other context about the problem here.
 
 ### Checklist
 
-- [ ] I have checked that there is no similar [issue](https://github.com/Farama-Foundation/MiniGrid/issues) in the repo (**required**)
+- [ ] I have checked that there is no similar [issue](https://github.com/Farama-Foundation/MiniGrid/issues) in the repo (**required**)

+ 1 - 1
.github/ISSUE_TEMPLATE/proposal.md

@@ -6,7 +6,7 @@ title: "[Proposal] Proposal title"
 
 
 
-### Proposal 
+### Proposal
 
 A clear and concise description of the proposal.
 

+ 14 - 0
.github/dependabot.yml

@@ -0,0 +1,14 @@
+# To get started with Dependabot version updates, you'll need to specify which
+# package ecosystems to update and where the package manifests are located.
+# Please see the documentation for all configuration options:
+# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
+
+version: 2
+updates:
+  # Enable version updates for GitHub Actions
+  - package-ecosystem: "github-actions"
+    # Look for GitHub Actions workflows in the `root` directory
+    directory: "/"
+    # Check the for updates once a week
+    schedule:
+      interval: "weekly"

+ 0 - 0
docker_entrypoint


+ 16 - 0
.github/docker/py-old.Dockerfile

@@ -0,0 +1,16 @@
+# A Dockerfile that sets up a full Gym install with test dependencies
+ARG PYTHON_VERSION
+FROM python:$PYTHON_VERSION
+
+SHELL ["/bin/bash", "-o", "pipefail", "-c"]
+
+RUN apt-get -y update \
+    && apt-get install --no-install-recommends -y \
+    xvfb
+
+COPY ../.. /usr/local/minigrid/
+WORKDIR /usr/local/minigrid/
+
+RUN pip install .[wfc,testing] gymnasium==0.29.1 numpy==1.26.4
+
+ENTRYPOINT ["/usr/local/minigrid/.github/docker/docker_entrypoint"]

+ 3 - 6
py.Dockerfile

@@ -8,12 +8,9 @@ RUN apt-get -y update \
     && apt-get install --no-install-recommends -y \
     xvfb
 
-COPY . /usr/local/minigrid/
+COPY ../.. /usr/local/minigrid/
 WORKDIR /usr/local/minigrid/
 
-RUN pip install .[wfc,testing] --no-cache-dir
-
-RUN ["chmod", "+x", "/usr/local/minigrid/docker_entrypoint"]
-
-ENTRYPOINT ["/usr/local/minigrid/docker_entrypoint"]
+RUN pip install .[wfc,testing]
 
+ENTRYPOINT ["/usr/local/minigrid/.github/docker/docker_entrypoint"]

+ 1 - 1
.github/stale.yml

@@ -59,4 +59,4 @@ only: issues
 
 # issues:
 #   exemptLabels:
-#     - confirmed
+#     - confirmed

+ 1 - 1
.github/workflows/build-docs-dev.yml

@@ -46,4 +46,4 @@ jobs:
         with:
           folder: _build
           target-folder: main
-          clean: false
+          clean: false

+ 1 - 1
.github/workflows/build-docs-version.yml

@@ -59,4 +59,4 @@ jobs:
           folder: _build
           clean-exclude: |
             *.*.*/
-            main
+            main

+ 0 - 22
.github/workflows/build.yml

@@ -1,22 +0,0 @@
-name: build
-on: [pull_request, push]
-
-permissions:
-  contents: read
-
-jobs:
-  build:
-    runs-on: ubuntu-latest
-    strategy:
-      matrix:
-        python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
-    steps:
-      - uses: actions/checkout@v2
-      - run: |
-           docker build -f py.Dockerfile \
-             --build-arg PYTHON_VERSION=${{ matrix.python-version }} \
-             --tag minigrid-docker .      
-      - name: Run tests
-        run: docker run minigrid-docker pytest --ignore tests/test_wfc
-      - name: Run doctest
-        run: docker run minigrid-docker pytest --doctest-modules minigrid/

+ 1 - 1
.github/workflows/manual-build-docs-version.yml

@@ -71,4 +71,4 @@ jobs:
           folder: _build
           clean-exclude: |
             *.*.*/
-            main
+            main

+ 1 - 1
.github/workflows/pre-commit.yml

@@ -17,4 +17,4 @@ jobs:
       - uses: actions/setup-python@v5
       - run: pip install pre-commit
       - run: pre-commit --version
-      - run: pre-commit run --all-files
+      - run: pre-commit run --all-files

+ 6 - 19
.github/workflows/build-publish.yml

@@ -8,10 +8,6 @@
 name: build-publish
 
 on:
-  push:
-    branches: [master]
-  pull_request:
-    branches: [master]
   release:
     types: [published]
 
@@ -21,26 +17,17 @@ jobs:
     permissions:
       contents: read
     steps:
-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v4
       - name: Set up Python
         uses: actions/setup-python@v4
         with:
-          python-version: '3.x'
+          python-version: '3.10'
       - name: Install pypa/build
-        run: >-
-          python -m
-          pip install -U
-          build
+        run: python -m pip install -U build
       - name: Build a binary wheel and a source tarball
-        run: >-
-          python -m
-          build
-          --sdist
-          --wheel
-          --outdir dist/
-          .
+        run: python -m build --sdist --wheel --outdir dist/ .
       - name: Store wheels
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
           path: dist
 
@@ -51,7 +38,7 @@ jobs:
     if: github.event_name == 'release' && github.event.action == 'published'
     steps:
       - name: Download dists
-        uses: actions/download-artifact@v3
+        uses: actions/download-artifact@v4
         with:
           name: artifact
           path: dist

+ 33 - 0
.github/workflows/pytest.yml

@@ -0,0 +1,33 @@
+name: build
+on: [pull_request, push]
+
+permissions:
+  contents: read
+
+jobs:
+  build-latest:
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
+    steps:
+      - uses: actions/checkout@v4
+      - run: |
+           docker build -f .github/docker/py.Dockerfile \
+             --build-arg PYTHON_VERSION=${{ matrix.python-version }} \
+             --tag minigrid-docker .
+      - name: Run tests
+        run: docker run minigrid-docker pytest
+      - name: Run doctest
+        run: docker run minigrid-docker pytest --doctest-modules minigrid/
+
+  build-old:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - run: |
+          docker build -f .github/docker/py-old.Dockerfile \
+             --build-arg PYTHON_VERSION="3.10" \
+             --tag minigrid-docker .
+      - name: Run tests
+        run: docker run minigrid-docker pytest

+ 31 - 15
.pre-commit-config.yaml

@@ -1,17 +1,33 @@
 ---
 repos:
+  - repo: https://github.com/pre-commit/pre-commit-hooks
+    rev: v5.0.0
+    hooks:
+      - id: check-symlinks
+      - id: destroyed-symlinks
+      - id: trailing-whitespace
+      - id: end-of-file-fixer
+      - id: check-yaml
+      - id: check-toml
+      - id: check-ast
+      - id: check-added-large-files
+      - id: check-merge-conflict
+      - id: check-executables-have-shebangs
+      - id: check-shebang-scripts-are-executable
+      - id: detect-private-key
+      - id: debug-statements
   - repo: https://github.com/python/black
-    rev: 23.12.1
+    rev: 24.10.0
     hooks:
       - id: black
   - repo: https://github.com/codespell-project/codespell
-    rev: v2.2.6
+    rev: v2.3.0
     hooks:
       - id: codespell
         args:
           - --ignore-words-list=linz
   - repo: https://github.com/PyCQA/flake8
-    rev: 7.0.0
+    rev: 7.1.1
     hooks:
       - id: flake8
         args:
@@ -36,18 +52,18 @@ repos:
 #          - --convention=google
 #        additional_dependencies: ["toml"]
   - repo: https://github.com/asottile/pyupgrade
-    rev: v3.15.0
+    rev: v3.19.1
     hooks:
       - id: pyupgrade
         args: ["--py37-plus"]
-  - repo: local
-    hooks:
-      - id: pyright
-        name: pyright
-        entry: pyright
-        language: node
-        pass_filenames: false
-        types: [python]
-        additional_dependencies: ["pyright@1.1.383"]
-        args:
-          - --project=pyproject.toml
+#  - repo: local
+#    hooks:
+#      - id: pyright
+#        name: pyright
+#        entry: pyright
+#        language: node
+#        pass_filenames: false
+#        types: [python]
+#        additional_dependencies: ["pyright@1.1.383"]
+#        args:
+#          - --project=pyproject.toml

+ 0 - 1
CNAME

@@ -1 +0,0 @@
-minigrid.farama.org

+ 0 - 1
CODE_OF_CONDUCT.rst

@@ -65,4 +65,3 @@ Attribution
 -----------
 This Code of Conduct is adapted from `Python's Code of Conduct <https://www.python.org/psf/conduct/>`_, which is under a `Creative Commons License
 <https://creativecommons.org/licenses/by-sa/3.0/>`_.
-

File diff suppressed because it is too large
+ 3 - 3
README.md


+ 5 - 3
docs/_scripts/gen_env_docs.py

@@ -4,17 +4,20 @@ import os
 import re
 from itertools import chain
 
-from gymnasium.envs.registration import registry
+import gymnasium
 from tqdm import tqdm
 
+import minigrid
 from utils import env_name_format, trim
 
+gymnasium.register_envs(minigrid)
+
 readme_path = os.path.join(
     os.path.dirname(os.path.dirname(os.path.dirname(__file__))),
     "README.md",
 )
 
-all_envs = list(registry.values())
+all_envs = list(gymnasium.registry.values())
 
 filtered_envs_by_type = {}
 env_names = []
@@ -120,7 +123,6 @@ title: {formatted_env_name}
 |---|---|
 | Action Space | `{re.sub(' +', ' ', action_space_table)}` |
 | Observation Space | `{re.sub(' +', ' ', observation_space_table)}` |
-| Reward Range | `{env.reward_range}` |
 | Creation | `gymnasium.make("{env_spec.id}")` |
 """
 

+ 8 - 1
docs/_scripts/gen_gifs.py

@@ -7,6 +7,10 @@ import gymnasium
 from PIL import Image
 from tqdm import tqdm
 
+import minigrid
+
+gymnasium.register_envs(minigrid)
+
 # snake to camel case: https://stackoverflow.com/questions/1175208/elegant-python-function-to-convert-camelcase-to-snake-case # noqa: E501
 pattern = re.compile(r"(?<!^)(?=[A-Z])")
 
@@ -22,7 +26,7 @@ os.makedirs(output_dir, exist_ok=True)
 envs_completed = []
 
 # iterate through all envspecs
-for env_spec in tqdm(gymnasium.envs.registry.values()):
+for env_spec in tqdm(gymnasium.registry.values()):
     # minigrid.envs:Env or minigrid.envs.babyai:Env
     if not isinstance(env_spec.entry_point, str):
         continue
@@ -44,6 +48,9 @@ for env_spec in tqdm(gymnasium.envs.registry.values()):
         # try catch in case missing some installs
         try:
             env = gymnasium.make(env_spec.id, render_mode="rgb_array")
+            env.reset(seed=123)
+            env.action_space.seed(123)
+
             # the gymnasium needs to be rgb renderable
             if not ("rgb_array" in env.metadata["render_modes"]):
                 continue

+ 12 - 12
docs/_static/img/minigrid-white.svg

@@ -57,22 +57,22 @@
    inkscape:window-maximized="1"
    inkscape:current-layer="layer3"
    showguides="true">
-   
-   
-   
-   
+
+
+
+
    <inkscape:grid
    type="xygrid"
    id="grid7671"
    dotted="true" />
-   
-   
-   
-   
-   
-   
-   
-   
+
+
+
+
+
+
+
+
   </sodipodi:namedview>
   <g
    id="layer3"

+ 12 - 12
docs/_static/img/minigrid.svg

@@ -57,22 +57,22 @@
    inkscape:window-maximized="1"
    inkscape:current-layer="layer3"
    showguides="true">
-   
-   
-   
-   
+
+
+
+
    <inkscape:grid
    type="xygrid"
    id="grid7671"
    dotted="true" />
-   
-   
-   
-   
-   
-   
-   
-   
+
+
+
+
+
+
+
+
   </sodipodi:namedview>
   <g
    id="layer3"

BIN
docs/_static/videos/babyai/ActionObjDoor.gif


BIN
docs/_static/videos/babyai/BlockedUnlockPickup.gif


BIN
docs/_static/videos/babyai/BossLevel.gif


BIN
docs/_static/videos/babyai/BossLevelNoUnlock.gif


BIN
docs/_static/videos/babyai/FindObjS5.gif


BIN
docs/_static/videos/babyai/GoTo.gif


BIN
docs/_static/videos/babyai/GoToDoor.gif


BIN
docs/_static/videos/babyai/GoToImpUnlock.gif


BIN
docs/_static/videos/babyai/GoToLocal.gif


BIN
docs/_static/videos/babyai/GoToObj.gif


BIN
docs/_static/videos/babyai/GoToObjDoor.gif


BIN
docs/_static/videos/babyai/GoToRedBall.gif


BIN
docs/_static/videos/babyai/GoToRedBallGrey.gif


BIN
docs/_static/videos/babyai/GoToRedBallNoDists.gif


BIN
docs/_static/videos/babyai/GoToRedBlueBall.gif


BIN
docs/_static/videos/babyai/GoToSeq.gif


BIN
docs/_static/videos/babyai/KeyCorridor.gif


BIN
docs/_static/videos/babyai/KeyInBox.gif


BIN
docs/_static/videos/babyai/MiniBossLevel.gif


BIN
docs/_static/videos/babyai/MoveTwoAcross.gif


BIN
docs/_static/videos/babyai/OneRoomS8.gif


BIN
docs/_static/videos/babyai/Open.gif


BIN
docs/_static/videos/babyai/OpenDoor.gif


BIN
docs/_static/videos/babyai/OpenDoorsOrder.gif


BIN
docs/_static/videos/babyai/OpenRedDoor.gif


BIN
docs/_static/videos/babyai/OpenTwoDoors.gif


BIN
docs/_static/videos/babyai/Pickup.gif


BIN
docs/_static/videos/babyai/PickupAbove.gif


BIN
docs/_static/videos/babyai/PickupDist.gif


BIN
docs/_static/videos/babyai/PickupLoc.gif


BIN
docs/_static/videos/babyai/PutNext.gif


BIN
docs/_static/videos/babyai/PutNextLocal.gif


BIN
docs/_static/videos/babyai/Synth.gif


BIN
docs/_static/videos/babyai/SynthLoc.gif


BIN
docs/_static/videos/babyai/SynthSeq.gif


BIN
docs/_static/videos/babyai/UnblockPickup.gif


BIN
docs/_static/videos/babyai/Unlock.gif


BIN
docs/_static/videos/babyai/UnlockLocal.gif


BIN
docs/_static/videos/babyai/UnlockPickup.gif


BIN
docs/_static/videos/babyai/UnlockToUnlock.gif


BIN
docs/_static/videos/minigrid/BlockedUnlockPickupEnv.gif


BIN
docs/_static/videos/minigrid/CrossingEnv.gif


BIN
docs/_static/videos/minigrid/DistShiftEnv.gif


BIN
docs/_static/videos/minigrid/DoorKeyEnv.gif


BIN
docs/_static/videos/minigrid/DynamicObstaclesEnv.gif


BIN
docs/_static/videos/minigrid/EmptyEnv.gif


BIN
docs/_static/videos/minigrid/FetchEnv.gif


BIN
docs/_static/videos/minigrid/FourRoomsEnv.gif


BIN
docs/_static/videos/minigrid/GoToDoorEnv.gif


BIN
docs/_static/videos/minigrid/GoToObjectEnv.gif


BIN
docs/_static/videos/minigrid/KeyCorridorEnv.gif


BIN
docs/_static/videos/minigrid/LavaGapEnv.gif


BIN
docs/_static/videos/minigrid/LockedRoomEnv.gif


BIN
docs/_static/videos/minigrid/MemoryEnv.gif


BIN
docs/_static/videos/minigrid/MultiRoomEnv.gif


BIN
docs/_static/videos/minigrid/ObstructedMaze_1Dlhb.gif


BIN
docs/_static/videos/minigrid/ObstructedMaze_Full.gif


BIN
docs/_static/videos/minigrid/ObstructedMaze_Full_V1.gif


BIN
docs/_static/videos/minigrid/PlaygroundEnv.gif


BIN
docs/_static/videos/minigrid/PutNearEnv.gif


BIN
docs/_static/videos/minigrid/RedBlueDoorEnv.gif


BIN
docs/_static/videos/minigrid/UnlockEnv.gif


BIN
docs/_static/videos/minigrid/UnlockPickupEnv.gif


BIN
docs/_static/videos/wfc/DungeonMazeScaled.gif


BIN
docs/_static/videos/wfc/MazeSimple.gif


BIN
docs/_static/videos/wfc/ObstaclesAngular.gif


BIN
docs/_static/videos/wfc/ObstaclesBlackdots.gif


BIN
docs/_static/videos/wfc/ObstaclesHogs3.gif


BIN
docs/_static/videos/wfc/RoomsFabric.gif


+ 3 - 3
docs/api/wrapper.md

@@ -14,8 +14,8 @@ field which can be used as an optional compass. Using dictionaries makes it
 easy for you to add additional information to observations
 if you need to, without having to encode everything into a single tensor.
 
-There are a variety of wrappers to change the observation format available in [minigrid/wrappers.py](/minigrid/wrappers.py). 
-If your RL code expects one single tensor for observations, take a look at `FlatObsWrapper`. 
+There are a variety of wrappers to change the observation format available in [minigrid/wrappers.py](/minigrid/wrappers.py).
+If your RL code expects one single tensor for observations, take a look at `FlatObsWrapper`.
 There is also an `ImgObsWrapper` that gets rid of the 'mission' field in observations, leaving only the image field tensor.
 
 Please note that the default observation format is a partially observable view of the environment using a
@@ -36,4 +36,4 @@ obs, _ = env.reset() # This now produces an RGB tensor only
 ```{toctree}
 :hidden:
 wrappers
-```
+```

+ 5 - 5
docs/content/create_env_tutorial.md

@@ -6,7 +6,7 @@ firstpage:
 
 # Tutorial on Creating Environments
 
-In this tutorial, we will go through the process of creating a new environment. 
+In this tutorial, we will go through the process of creating a new environment.
 
 ## Boilerplate Code
 
@@ -55,7 +55,7 @@ Then, in the `__init__` function, we pass the required arguments to the parent c
 
 ## Generate the grid-world
 
-To create your own grid-world environment we override the function `_gen_grid`. We can see from the `MiniGridEnv` class 
+To create your own grid-world environment we override the function `_gen_grid`. We can see from the `MiniGridEnv` class
 
 ```python
 # MiniGridEnv._gen_grid
@@ -64,7 +64,7 @@ def _gen_grid(self, width, height):
     pass
 ```
 
-`_gen_grid` takes in two inputs `width` and `height`, which are used to specify the size of the environment. 
+`_gen_grid` takes in two inputs `width` and `height`, which are used to specify the size of the environment.
 
 ### Create World
 
@@ -207,7 +207,7 @@ class SimpleEnv(MiniGridEnv):
         # Generate vertical separation wall
         for i in range(0, height):
             self.grid.set(5, i, Wall())
-        
+
         # Place the door and key
         self.grid.set(5, 6, Door(COLOR_NAMES[0], is_locked=True))
         self.grid.set(3, 6, Key(COLOR_NAMES[0]))
@@ -232,7 +232,7 @@ def main():
     manual_control = ManualControl(env, seed=42)
     manual_control.start()
 
-    
+
 if __name__ == "__main__":
     main()
 ```

+ 1 - 1
docs/content/installation.md

@@ -25,4 +25,4 @@ If you want to install the package in [development mode](https://setuptools.pypa
 python3 -m pip install -e .
 ```
 
-An installation in development mode (i.e., an editable install) is useful if you want to modify the source code of `minigrid` and have your changes take effect immediately.
+An installation in development mode (i.e., an editable install) is useful if you want to modify the source code of `minigrid` and have your changes take effect immediately.

+ 1 - 2
docs/content/publications.md

@@ -41,7 +41,7 @@ List of publications & submissions using Minigrid or BabyAI (please open a pull
 - [Working Memory Graphs](https://arxiv.org/abs/1911.07141) (MSR, Nov 2019)
 - [Fast Task-Adaptation for Tasks Labeled Using Natural Language in Reinforcement Learning](https://arxiv.org/pdf/1910.04040.pdf) (Oct 2019, University of Antwerp)
 - [Generalization in Reinforcement Learning with Selective Noise Injection and Information Bottleneck](https://arxiv.org/abs/1910.12911) (MSR, NeurIPS, Oct 2019)
-- [Recurrent Independent Mechanisms](https://arxiv.org/pdf/1909.10893.pdf) (Mila, Sept 2019) 
+- [Recurrent Independent Mechanisms](https://arxiv.org/pdf/1909.10893.pdf) (Mila, Sept 2019)
 - [Learning Effective Subgoals with Multi-Task Hierarchical Reinforcement Learning](http://surl.tirl.info/proceedings/SURL-2019_paper_10.pdf) (Tsinghua University, August 2019)
 - [Mastering emergent language: learning to guide in simulated navigation](https://arxiv.org/abs/1908.05135) (University of Amsterdam, Aug 2019)
 - [Transfer Learning by Modeling a Distribution over Policies](https://arxiv.org/abs/1906.03574) (Mila, June 2019)
@@ -61,4 +61,3 @@ List of publications & submissions using Minigrid or BabyAI (please open a pull
 - [BabyAI: First Steps Towards Grounded Language Learning With a Human In the Loop](https://arxiv.org/abs/1810.08272) (Mila, ICLR, Oct 2018)
 
 This environment has been built as part of work done at [Mila](https://mila.quebec). The Dynamic obstacles environment has been added as part of work done at [IAS in TU Darmstadt](https://www.ias.informatik.tu-darmstadt.de/) and the University of Genoa for mobile robot navigation with dynamic obstacles.
-

+ 2 - 2
docs/content/training.md

@@ -8,7 +8,7 @@ firstpage:
 
 The environments in the Minigrid library can be trained easily using [StableBaselines3](https://stable-baselines3.readthedocs.io/en/master/). In this tutorial we show how a PPO agent can be trained on the `MiniGrid-Empty-16x16-v0` environment.
 
-## Create Custom Feature Extractor 
+## Create Custom Feature Extractor
 
 Although `StableBaselines3` is fully compatible with `Gymnasium`-based environments (which includes Minigrid), the default CNN architecture does not directly support the Minigrid observation space. Thus, to train an agent on Minigrid environments, we need to create a custom feature extractor. This can be done by creating a feature extractor class that inherits from `stable_baselines3.common.torch_layers.BaseFeaturesExtractor`
 
@@ -64,4 +64,4 @@ By default the observation of Minigrid environments are dictionaries. Since the
 
 ## Further Reading
 
-One can also pass dictionary observations to StableBaseline3 policies, for a walkthrough the process of doing so see [here](https://stable-baselines3.readthedocs.io/en/master/guide/custom_policy.html#multiple-inputs-and-dictionary-observations). An implementation utilizing this functionality can be found [here](https://github.com/BolunDai0216/MinigridMiniworldTransfer/blob/main/minigrid_gotoobj_train.py).
+One can also pass dictionary observations to StableBaseline3 policies, for a walkthrough the process of doing so see [here](https://stable-baselines3.readthedocs.io/en/master/guide/custom_policy.html#multiple-inputs-and-dictionary-observations). An implementation utilizing this functionality can be found [here](https://github.com/BolunDai0216/MinigridMiniworldTransfer/blob/main/minigrid_gotoobj_train.py).

+ 1 - 1
docs/environments/minigrid/index.md

@@ -41,4 +41,4 @@ RedBlueDoorEnv
 UnlockEnv
 UnlockPickupEnv
 
-```
+```

+ 0 - 1
docs/index.md

@@ -85,4 +85,3 @@ environments/wfc/index
 release_notes
 Github <https://github.com/Farama-Foundation/MiniGrid>
 ```
-

+ 1 - 1
docs/release_notes.md

@@ -9,4 +9,4 @@ title: Release Notes
     :github: https://github.com/Farama-Foundation/Minigrid/releases
     :pypi: https://pypi.org/project/minigrid/
     :changelog-url:
-```
+```

+ 0 - 0
minigrid/envs/babyai/core/levelgen.py


Some files were not shown because too many files changed in this diff