index.html 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680
  1. <!doctype html>
  2. <html class="no-js" lang="en" data-content_root="../">
  3. <head><meta charset="utf-8"/>
  4. <meta name="viewport" content="width=device-width,initial-scale=1"/>
  5. <meta name="color-scheme" content="light dark">
  6. <meta name="description" content="Minigrid contains simple and easily configurable grid world environments to conduct Reinforcement Learning research. This library was previously known as gym-minigrid.">
  7. <meta property="og:title" content="MiniGrid Documentation" />
  8. <meta property="og:type" content="website" />
  9. <meta property="og:description" content="Minigrid contains simple and easily configurable grid world environments to conduct Reinforcement Learning research. This library was previously known as gym-minigrid." />
  10. <meta property="og:url" content="https://minigrid.farama.org/_modules/index.html" /><meta property="og:image" content="https://minigrid.farama.org//_static/img/minigrid-github.png" /><meta name="twitter:card" content="summary_large_image"><link rel="index" title="Index" href="../genindex/" /><link rel="search" title="Search" href="../search/" />
  11. <link rel="canonical" href="https://minigrid.farama.org/_modules/index.html" />
  12. <link rel="shortcut icon" href="../_static/minigrid-favicon.png"/><!-- Generated with Sphinx 7.2.6 and Furo 2023.08.19.dev1 -->
  13. <title>Overview: module code - MiniGrid Documentation</title>
  14. <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=a746c00c" />
  15. <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=3e7f4c72" />
  16. <link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?v=49cbaffd" />
  17. <style>
  18. body {
  19. --color-code-background: #f8f8f8;
  20. --color-code-foreground: black;
  21. }
  22. @media not print {
  23. body[data-theme="dark"] {
  24. --color-code-background: #202020;
  25. --color-code-foreground: #d0d0d0;
  26. }
  27. @media (prefers-color-scheme: dark) {
  28. body:not([data-theme="light"]) {
  29. --color-code-background: #202020;
  30. --color-code-foreground: #d0d0d0;
  31. }
  32. }
  33. }
  34. </style></head>
  35. <body>
  36. <header class="farama-header" aria-label="Farama header">
  37. <div class="farama-header__container">
  38. <div class="farama-header__left--mobile">
  39. <label class="nav-overlay-icon" for="__navigation">
  40. <div class="visually-hidden">Toggle site navigation sidebar</div>
  41. <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
  42. <defs></defs>
  43. <line x1="0.5" y1="4" x2="23.5" y2="4"></line>
  44. <line x1="0.232" y1="12" x2="23.5" y2="12"></line>
  45. <line x1="0.232" y1="20" x2="23.5" y2="20"></line>
  46. </svg>
  47. </label>
  48. </div>
  49. <div class="farama-header__left farama-header__center--mobile">
  50. <a href="../">
  51. <img class="farama-header__logo only-light" src="../_static/img/minigrid.svg" alt="Light Logo"/>
  52. <img class="farama-header__logo only-dark" src="../_static/img/minigrid-white.svg" alt="Dark Logo"/>
  53. <span class="farama-header__title">MiniGrid Documentation</span>
  54. </a>
  55. </div>
  56. <div class="farama-header__right">
  57. <div class="farama-header-menu">
  58. <button class="farama-header-menu__btn" aria-label="Open Farama Menu" aria-expanded="false" aria-haspopup="true" aria-controls="farama-menu">
  59. <img class="farama-black-logo-invert" src="../_static/img/farama-logo-header.svg">
  60. <svg viewBox="0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
  61. <polyline style="stroke-linecap: round; stroke-linejoin: round; fill: none; stroke-width: 2px;" points="1 7 12 18 23 7"></polyline>
  62. </svg>
  63. </button>
  64. <div class="farama-header-menu-container farama-hidden" aria-hidden="true" id="farama-menu">
  65. <div class="farama-header-menu__header">
  66. <a href="https://farama.org">
  67. <img class="farama-header-menu__logo farama-white-logo-invert" src="../_static/img/farama_solid_white.svg" alt="Farama Foundation logo">
  68. <span>Farama Foundation</span>
  69. </a>
  70. <div class="farama-header-menu-header__right">
  71. <button id="farama-close-menu">
  72. <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor"
  73. stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon-close">
  74. <line x1="3" y1="21" x2="21" y2="3"></line>
  75. <line x1="3" y1="3" x2="21" y2="21"></line>
  76. </svg>
  77. </button>
  78. </div>
  79. </div>
  80. <div class="farama-header-menu__body">
  81. <!-- Response from farama.org/api/projects.json -->
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. </header>
  88. <script>
  89. document.body.dataset.theme = localStorage.getItem("theme") || "auto";
  90. </script>
  91. <svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
  92. <symbol id="svg-toc" viewBox="0 0 24 24">
  93. <title>Contents</title>
  94. <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
  95. <path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
  96. </svg>
  97. </symbol>
  98. <symbol id="svg-menu" viewBox="0 0 24 24">
  99. <title>Menu</title>
  100. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
  101. stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
  102. <line x1="3" y1="12" x2="21" y2="12"></line>
  103. <line x1="3" y1="6" x2="21" y2="6"></line>
  104. <line x1="3" y1="18" x2="21" y2="18"></line>
  105. </svg>
  106. </symbol>
  107. <symbol id="svg-arrow-right" viewBox="0 0 24 24">
  108. <title>Expand</title>
  109. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
  110. stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
  111. <polyline points="9 18 15 12 9 6"></polyline>
  112. </svg>
  113. </symbol>
  114. <symbol id="svg-sun" viewBox="0 0 24 24">
  115. <title>Light mode</title>
  116. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
  117. stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
  118. <circle cx="12" cy="12" r="5"></circle>
  119. <line x1="12" y1="1" x2="12" y2="3"></line>
  120. <line x1="12" y1="21" x2="12" y2="23"></line>
  121. <line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
  122. <line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
  123. <line x1="1" y1="12" x2="3" y2="12"></line>
  124. <line x1="21" y1="12" x2="23" y2="12"></line>
  125. <line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
  126. <line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
  127. </svg>
  128. </symbol>
  129. <symbol id="svg-moon" viewBox="0 0 24 24">
  130. <title>Dark mode</title>
  131. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
  132. stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
  133. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  134. <path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
  135. </svg>
  136. </symbol>
  137. <symbol id="svg-sun-half" viewBox="0 0 24 24">
  138. <title>Auto light/dark mode</title>
  139. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
  140. stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-shadow">
  141. <path stroke="none" d="M0 0h24v24H0z" fill="none"/>
  142. <circle cx="12" cy="12" r="9" />
  143. <path d="M13 12h5" />
  144. <path d="M13 15h4" />
  145. <path d="M13 18h1" />
  146. <path d="M13 9h4" />
  147. <path d="M13 6h1" />
  148. </svg>
  149. </symbol>
  150. </svg>
  151. <input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation">
  152. <input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc">
  153. <label class="overlay sidebar-overlay" for="__navigation">
  154. <div class="visually-hidden">Hide navigation sidebar</div>
  155. </label>
  156. <label class="overlay toc-overlay" for="__toc">
  157. <div class="visually-hidden">Hide table of contents sidebar</div>
  158. </label>
  159. <div class="page">
  160. <!--<header class="mobile-header">
  161. <div class="header-left">
  162. <label class="nav-overlay-icon" for="__navigation">
  163. <div class="visually-hidden">Toggle site navigation sidebar</div>
  164. <i class="icon"><svg><use href="#svg-menu"></use></svg></i>
  165. </label>
  166. </div>
  167. <div class="header-center">
  168. <a href="../"><div class="brand">MiniGrid Documentation</div></a>
  169. </div>
  170. <div class="header-right">
  171. <div class="theme-toggle-container theme-toggle-header">
  172. <button class="theme-toggle">
  173. <div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
  174. <svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
  175. <svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
  176. <svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
  177. </button>
  178. </div>
  179. <label class="toc-overlay-icon toc-header-icon no-toc" for="__toc">
  180. <div class="visually-hidden">Toggle table of contents sidebar</div>
  181. <i class="icon"><svg><use href="#svg-toc"></use></svg></i>
  182. </label>
  183. </div>
  184. </header>-->
  185. <aside class="sidebar-drawer">
  186. <div class="sidebar-container">
  187. <div class="sidebar-sticky"><a class="farama-sidebar__title" href="../">
  188. <img class="farama-header__logo only-light" src="../_static/img/minigrid.svg" alt="Light Logo"/>
  189. <img class="farama-header__logo only-dark" src="../_static/img/minigrid-white.svg" alt="Dark Logo"/>
  190. <span class="farama-header__title">MiniGrid Documentation</span>
  191. </a><form class="sidebar-search-container" method="get" action="../search/" role="search">
  192. <input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
  193. <input type="hidden" name="check_keywords" value="yes">
  194. <input type="hidden" name="area" value="default">
  195. </form>
  196. <div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
  197. <p class="caption" role="heading"><span class="caption-text">Introduction</span></p>
  198. <ul>
  199. <li class="toctree-l1"><a class="reference internal" href="../content/basic_usage/">Basic Usage</a></li>
  200. <li class="toctree-l1"><a class="reference internal" href="../content/basic_usage/#installation">Installation</a></li>
  201. <li class="toctree-l1"><a class="reference internal" href="../content/publications/">List of Publications</a></li>
  202. <li class="toctree-l1"><a class="reference internal" href="../content/create_env_tutorial/">Tutorial on Creating Environments</a></li>
  203. <li class="toctree-l1"><a class="reference internal" href="../content/training/">Training Minigrid Environments</a></li>
  204. </ul>
  205. <p class="caption" role="heading"><span class="caption-text">Wrappers</span></p>
  206. <ul>
  207. <li class="toctree-l1 has-children"><a class="reference internal" href="../api/wrapper/">Wrapper</a><input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><div class="visually-hidden">Toggle navigation of Wrapper</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
  208. <li class="toctree-l2"><a class="reference internal" href="../api/wrappers/">Action Bonus</a></li>
  209. <li class="toctree-l2"><a class="reference internal" href="../api/wrappers/#dict-observation-space">Dict Observation Space</a></li>
  210. <li class="toctree-l2"><a class="reference internal" href="../api/wrappers/#direction-obs">Direction Obs</a></li>
  211. <li class="toctree-l2"><a class="reference internal" href="../api/wrappers/#flatobs">FlatObs</a></li>
  212. <li class="toctree-l2"><a class="reference internal" href="../api/wrappers/#fully-obs">Fully Obs</a></li>
  213. <li class="toctree-l2"><a class="reference internal" href="../api/wrappers/#image-observation">Image Observation</a></li>
  214. <li class="toctree-l2"><a class="reference internal" href="../api/wrappers/#no-death">No Death</a></li>
  215. <li class="toctree-l2"><a class="reference internal" href="../api/wrappers/#observation">Observation</a></li>
  216. <li class="toctree-l2"><a class="reference internal" href="../api/wrappers/#one-hot-partial-obs">One Hot Partial Obs</a></li>
  217. <li class="toctree-l2"><a class="reference internal" href="../api/wrappers/#reseed">Reseed</a></li>
  218. <li class="toctree-l2"><a class="reference internal" href="../api/wrappers/#rgb-img-obs">RGB Img Obs</a></li>
  219. <li class="toctree-l2"><a class="reference internal" href="../api/wrappers/#rgb-partial-img-obs">RGB Partial Img Obs</a></li>
  220. <li class="toctree-l2"><a class="reference internal" href="../api/wrappers/#position-bonus">Position Bonus</a></li>
  221. <li class="toctree-l2"><a class="reference internal" href="../api/wrappers/#stochastic-action">Stochastic Action</a></li>
  222. <li class="toctree-l2"><a class="reference internal" href="../api/wrappers/#symbolic-obs">Symbolic Obs</a></li>
  223. <li class="toctree-l2"><a class="reference internal" href="../api/wrappers/#view-size">View Size</a></li>
  224. </ul>
  225. </li>
  226. </ul>
  227. <p class="caption" role="heading"><span class="caption-text">Environments</span></p>
  228. <ul>
  229. <li class="toctree-l1 has-children"><a class="reference internal" href="../environments/minigrid/">Minigrid Environments</a><input class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><div class="visually-hidden">Toggle navigation of Minigrid Environments</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
  230. <li class="toctree-l2"><a class="reference internal" href="../environments/minigrid/BlockedUnlockPickupEnv/">Blocked Unlock Pickup</a></li>
  231. <li class="toctree-l2"><a class="reference internal" href="../environments/minigrid/CrossingEnv/">Crossing</a></li>
  232. <li class="toctree-l2"><a class="reference internal" href="../environments/minigrid/DistShiftEnv/">Dist Shift</a></li>
  233. <li class="toctree-l2"><a class="reference internal" href="../environments/minigrid/DoorKeyEnv/">Door Key</a></li>
  234. <li class="toctree-l2"><a class="reference internal" href="../environments/minigrid/DynamicObstaclesEnv/">Dynamic Obstacles</a></li>
  235. <li class="toctree-l2"><a class="reference internal" href="../environments/minigrid/EmptyEnv/">Empty</a></li>
  236. <li class="toctree-l2"><a class="reference internal" href="../environments/minigrid/FetchEnv/">Fetch</a></li>
  237. <li class="toctree-l2"><a class="reference internal" href="../environments/minigrid/FourRoomsEnv/">Four Rooms</a></li>
  238. <li class="toctree-l2"><a class="reference internal" href="../environments/minigrid/GoToDoorEnv/">Go To Door</a></li>
  239. <li class="toctree-l2"><a class="reference internal" href="../environments/minigrid/GoToObjectEnv/">Go To Object</a></li>
  240. <li class="toctree-l2"><a class="reference internal" href="../environments/minigrid/KeyCorridorEnv/">Key Corridor</a></li>
  241. <li class="toctree-l2"><a class="reference internal" href="../environments/minigrid/LavaGapEnv/">Lava Gap</a></li>
  242. <li class="toctree-l2"><a class="reference internal" href="../environments/minigrid/LockedRoomEnv/">Locked Room</a></li>
  243. <li class="toctree-l2"><a class="reference internal" href="../environments/minigrid/MemoryEnv/">Memory</a></li>
  244. <li class="toctree-l2"><a class="reference internal" href="../environments/minigrid/MultiRoomEnv/">Multi Room</a></li>
  245. <li class="toctree-l2"><a class="reference internal" href="../environments/minigrid/ObstructedMaze_1Dlhb/">Obstructed Maze Dlhb</a></li>
  246. <li class="toctree-l2"><a class="reference internal" href="../environments/minigrid/ObstructedMaze_Full/">Obstructed Maze Full</a></li>
  247. <li class="toctree-l2"><a class="reference internal" href="../environments/minigrid/PlaygroundEnv/">Playground</a></li>
  248. <li class="toctree-l2"><a class="reference internal" href="../environments/minigrid/PutNearEnv/">Put Near</a></li>
  249. <li class="toctree-l2"><a class="reference internal" href="../environments/minigrid/RedBlueDoorEnv/">Red Blue Door</a></li>
  250. <li class="toctree-l2"><a class="reference internal" href="../environments/minigrid/UnlockEnv/">Unlock</a></li>
  251. <li class="toctree-l2"><a class="reference internal" href="../environments/minigrid/UnlockPickupEnv/">Unlock Pickup</a></li>
  252. </ul>
  253. </li>
  254. <li class="toctree-l1 has-children"><a class="reference internal" href="../environments/babyai/">BabyAI Environments</a><input class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><div class="visually-hidden">Toggle navigation of BabyAI Environments</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
  255. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/GoToRedBallGrey/">Go To Red Ball Grey</a></li>
  256. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/GoToRedBall/">Go To Red Ball</a></li>
  257. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/GoToRedBallNoDists/">Go To Red Ball No Dists</a></li>
  258. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/GoToObj/">Go To Obj</a></li>
  259. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/GoToLocal/">Go To Local</a></li>
  260. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/GoTo/">Go To</a></li>
  261. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/GoToImpUnlock/">Go To Imp Unlock</a></li>
  262. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/GoToSeq/">Go To Seq</a></li>
  263. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/GoToRedBlueBall/">Go To Red Blue Ball</a></li>
  264. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/GoToDoor/">Go To Door</a></li>
  265. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/GoToObjDoor/">Go To Obj Door</a></li>
  266. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/Open/">Open</a></li>
  267. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/OpenRedDoor/">Open Red Door</a></li>
  268. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/OpenDoor/">Open Door</a></li>
  269. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/OpenTwoDoors/">Open Two Doors</a></li>
  270. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/OpenDoorsOrder/">Open Doors Order</a></li>
  271. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/Pickup/">Pickup</a></li>
  272. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/UnblockPickup/">Unblock Pickup</a></li>
  273. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/PickupLoc/">Pickup Loc</a></li>
  274. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/PickupDist/">Pickup Dist</a></li>
  275. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/PickupAbove/">Pickup Above</a></li>
  276. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/PutNextLocal/">Put Next Local</a></li>
  277. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/PutNext/">Put Next</a></li>
  278. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/Unlock/">Unlock</a></li>
  279. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/UnlockLocal/">Unlock Local</a></li>
  280. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/KeyInBox/">Key In Box</a></li>
  281. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/UnlockPickup/">Unlock Pickup</a></li>
  282. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/BlockedUnlockPickup/">Blocked Unlock Pickup</a></li>
  283. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/UnlockToUnlock/">Unlock To Unlock</a></li>
  284. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/ActionObjDoor/">Action Obj Door</a></li>
  285. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/FindObjS5/">Find Obj</a></li>
  286. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/KeyCorridor/">Key Corridor</a></li>
  287. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/OneRoomS8/">One Room</a></li>
  288. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/MoveTwoAcross/">Move Two Across</a></li>
  289. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/Synth/">Synth</a></li>
  290. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/SynthLoc/">Synth Loc</a></li>
  291. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/SynthSeq/">Synth Seq</a></li>
  292. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/MiniBossLevel/">Mini Boss Level</a></li>
  293. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/BossLevel/">Boss Level</a></li>
  294. <li class="toctree-l2"><a class="reference internal" href="../environments/babyai/BossLevelNoUnlock/">Boss Level No Unlock</a></li>
  295. </ul>
  296. </li>
  297. </ul>
  298. <p class="caption" role="heading"><span class="caption-text">Development</span></p>
  299. <ul>
  300. <li class="toctree-l1"><a class="reference internal" href="../release_notes/">Release Notes</a></li>
  301. <li class="toctree-l1"><a class="reference external" href="https://github.com/Farama-Foundation/MiniGrid">Github</a></li>
  302. </ul>
  303. </div>
  304. </div>
  305. </div>
  306. </div>
  307. </aside>
  308. <div class="main-container">
  309. <div class="main">
  310. <div class="content">
  311. <div class="article-container">
  312. <a href="#" class="back-to-top muted-link">
  313. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
  314. <path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
  315. </svg>
  316. <span>Back to top</span>
  317. </a>
  318. <div class="content-icon-container"><div class="theme-toggle-container theme-toggle-content">
  319. <button class="theme-toggle" title="Toggle color theme">
  320. <div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
  321. <svg class="theme-icon-when-auto">
  322. <use href="#svg-sun-half"></use>
  323. </svg>
  324. <svg class="theme-icon-when-dark">
  325. <use href="#svg-moon"></use>
  326. </svg>
  327. <svg class="theme-icon-when-light">
  328. <use href="#svg-sun"></use>
  329. </svg>
  330. </button>
  331. </div>
  332. <label class="toc-overlay-icon toc-content-icon no-toc" for="__toc">
  333. <div class="visually-hidden">Toggle table of contents sidebar</div>
  334. <i class="icon"><svg>
  335. <use href="#svg-toc"></use>
  336. </svg></i>
  337. </label>
  338. </div>
  339. <article role="main">
  340. <h1>All modules for which code is available</h1>
  341. <ul><li><a href="gymnasium/core/">gymnasium.core</a></li>
  342. <li><a href="minigrid/wrappers/">minigrid.wrappers</a></li>
  343. </ul>
  344. </article>
  345. </div>
  346. <footer>
  347. <div class="related-pages">
  348. </div>
  349. <div class="bottom-of-page">
  350. <div class="left-details">
  351. <div class="copyright">
  352. Copyright &#169; 2023 Farama Foundation
  353. </div>
  354. <!--
  355. Made with <a href="https://www.sphinx-doc.org/">Sphinx</a> and <a class="muted-link" href="https://pradyunsg.me">@pradyunsg</a>'s
  356. <a href="https://github.com/pradyunsg/furo">Furo</a>
  357. -->
  358. </div>
  359. <div class="right-details">
  360. <div class="icons">
  361. <a class="muted-link" href="https://github.com/Farama-Foundation/Minigrid/"
  362. aria-label="On GitHub">
  363. <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16">
  364. <path fill-rule="evenodd"
  365. d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z">
  366. </path>
  367. </svg>
  368. </a>
  369. </div>
  370. </div>
  371. </div>
  372. </footer>
  373. </div>
  374. <aside class="toc-drawer no-toc">
  375. </aside>
  376. </div>
  377. </div>
  378. </div>
  379. <script>
  380. const toggleMenu = () => {
  381. const menuBtn = document.querySelector(".farama-header-menu__btn");
  382. const menuContainer = document.querySelector(".farama-header-menu-container");
  383. if (document.querySelector(".farama-header-menu").classList.contains("active")) {
  384. menuBtn.setAttribute("aria-expanded", "false");
  385. menuContainer.setAttribute("aria-hidden", "true");
  386. } else {
  387. menuBtn.setAttribute("aria-expanded", "true");
  388. menuContainer.setAttribute("aria-hidden", "false");
  389. }
  390. document.querySelector(".farama-header-menu").classList.toggle("active");
  391. }
  392. document.querySelector(".farama-header-menu__btn").addEventListener("click", toggleMenu);
  393. document.getElementById("farama-close-menu").addEventListener("click", toggleMenu);
  394. </script>
  395. <script async src="https://www.googletagmanager.com/gtag/js?id=G-FBXJQQLXKD"></script>
  396. <script>
  397. const enableGtag = () => {
  398. window.dataLayer = window.dataLayer || [];
  399. function gtag(){dataLayer.push(arguments);}
  400. gtag('js', new Date());
  401. gtag('config', 'G-FBXJQQLXKD');
  402. }
  403. (() => {
  404. if (!localStorage.getItem("acceptedCookieAlert")) {
  405. const boxElem = document.createElement("div");
  406. boxElem.classList.add("cookie-alert");
  407. const containerElem = document.createElement("div");
  408. containerElem.classList.add("cookie-alert__container");
  409. const textElem = document.createElement("p");
  410. textElem.innerHTML = `This page uses <a href="https://analytics.google.com/">
  411. Google Analytics</a> to collect statistics.`;
  412. containerElem.appendChild(textElem);
  413. const declineBtn = Object.assign(document.createElement("button"),
  414. {
  415. innerText: "Deny",
  416. className: "farama-btn cookie-alert__button",
  417. id: "cookie-alert__decline",
  418. }
  419. );
  420. declineBtn.addEventListener("click", () => {
  421. localStorage.setItem("acceptedCookieAlert", false);
  422. boxElem.remove();
  423. });
  424. const acceptBtn = Object.assign(document.createElement("button"),
  425. {
  426. innerText: "Allow",
  427. className: "farama-btn cookie-alert__button",
  428. id: "cookie-alert__accept",
  429. }
  430. );
  431. acceptBtn.addEventListener("click", () => {
  432. localStorage.setItem("acceptedCookieAlert", true);
  433. boxElem.remove();
  434. enableGtag();
  435. });
  436. containerElem.appendChild(declineBtn);
  437. containerElem.appendChild(acceptBtn);
  438. boxElem.appendChild(containerElem);
  439. document.body.appendChild(boxElem);
  440. } else if (localStorage.getItem("acceptedCookieAlert") === "true") {
  441. enableGtag();
  442. }
  443. })()
  444. </script>
  445. <script src="../_static/documentation_options.js?v=7fa42598"></script>
  446. <script src="../_static/doctools.js?v=888ff710"></script>
  447. <script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
  448. <script src="../_static/scripts/furo.js?v=7660844c"></script>
  449. <script>
  450. const createProjectsList = (projects, displayImages) => {
  451. const ulElem = Object.assign(document.createElement('ul'),
  452. {
  453. className:'farama-header-menu-list',
  454. }
  455. )
  456. for (let project of projects) {
  457. const liElem = document.createElement("li");
  458. const aElem = Object.assign(document.createElement("a"),
  459. {
  460. href: project.link
  461. }
  462. );
  463. liElem.appendChild(aElem);
  464. if (displayImages) {
  465. const imgElem = Object.assign(document.createElement("img"),
  466. {
  467. src: project.image ? imagesBasepath + project.image : imagesBasepath + "/farama_black.svg",
  468. alt: `${project.name} logo`,
  469. className: "farama-black-logo-invert"
  470. }
  471. );
  472. aElem.appendChild(imgElem);
  473. }
  474. aElem.appendChild(document.createTextNode(project.name));
  475. ulElem.appendChild(liElem);
  476. }
  477. return ulElem;
  478. }
  479. // Create menu with Farama projects by using the API at farama.org/api/projects.json
  480. const createCORSRequest = (method, url) => {
  481. let xhr = new XMLHttpRequest();
  482. xhr.responseType = 'json';
  483. if ("withCredentials" in xhr) {
  484. xhr.open(method, url, true);
  485. } else if (typeof XDomainRequest != "undefined") {
  486. // IE8 & IE9
  487. xhr = new XDomainRequest();
  488. xhr.open(method, url);
  489. } else {
  490. // CORS not supported.
  491. xhr = null;
  492. }
  493. return xhr;
  494. };
  495. const url = 'https://farama.org/api/projects.json';
  496. const imagesBasepath = "https://farama.org/assets/images"
  497. const method = 'GET';
  498. let xhr = createCORSRequest(method, url);
  499. xhr.onload = () => {
  500. const jsonResponse = xhr.response;
  501. const sections = {
  502. "Core Projects": [],
  503. "Mature Projects": {
  504. "Documentation": [],
  505. "Repositories": [],
  506. },
  507. "Incubating Projects": {
  508. "Documentation": [],
  509. "Repositories": [],
  510. },
  511. "Foundation": [
  512. {
  513. name: "About",
  514. link: "https://farama.org/about"
  515. },
  516. {
  517. name: "Standards",
  518. link: "https://farama.org/project_standards",
  519. },
  520. {
  521. name: "Donate",
  522. link: "https://farama.org/donations"
  523. }
  524. ]
  525. }
  526. // Categorize projects
  527. Object.keys(jsonResponse).forEach(key => {
  528. projectJson = jsonResponse[key];
  529. if (projectJson.website !== null) {
  530. projectJson.link = projectJson.website;
  531. } else {
  532. projectJson.link = projectJson.github;
  533. }
  534. if (projectJson.type === "core") {
  535. sections["Core Projects"].push(projectJson)
  536. } else if (projectJson.type == "mature") {
  537. if (projectJson.website !== null) {
  538. sections["Mature Projects"]["Documentation"].push(projectJson)
  539. } else {
  540. sections["Mature Projects"]["Repositories"].push(projectJson)
  541. }
  542. } else {
  543. if (projectJson.website !== null) {
  544. sections["Incubating Projects"]["Documentation"].push(projectJson)
  545. } else {
  546. sections["Incubating Projects"]["Repositories"].push(projectJson)
  547. }
  548. }
  549. })
  550. const menuContainer = document.querySelector(".farama-header-menu__body");
  551. Object.keys(sections).forEach((key, i) => {
  552. const sectionElem = Object.assign(
  553. document.createElement('div'), {
  554. className:'farama-header-menu__section',
  555. }
  556. )
  557. sectionElem.appendChild(Object.assign(document.createElement('span'),
  558. {
  559. className:'farama-header-menu__section-title' ,
  560. innerText: key
  561. }
  562. ))
  563. // is not a list
  564. if (sections[key].constructor !== Array) {
  565. const subSections = sections[key];
  566. const subSectionContainerElem = Object.assign(
  567. document.createElement('div'), {
  568. className:'farama-header-menu__subsections-container',
  569. style: 'display: flex'
  570. }
  571. )
  572. Object.keys(subSections).forEach((subKey, i) => {
  573. const subSectionElem = Object.assign(
  574. document.createElement('div'), {
  575. className:'farama-header-menu__subsection',
  576. }
  577. )
  578. subSectionElem.appendChild(Object.assign(document.createElement('span'),
  579. {
  580. className:'farama-header-menu__subsection-title' ,
  581. innerText: subKey
  582. }
  583. ))
  584. const ulElem = createProjectsList(subSections[subKey], key !== 'Foundation');
  585. subSectionElem.appendChild(ulElem);
  586. subSectionContainerElem.appendChild(subSectionElem);
  587. })
  588. sectionElem.appendChild(subSectionContainerElem);
  589. } else {
  590. const projects = sections[key];
  591. const ulElem = createProjectsList(projects, true);
  592. sectionElem.appendChild(ulElem);
  593. }
  594. menuContainer.appendChild(sectionElem)
  595. });
  596. }
  597. xhr.onerror = function() {
  598. console.error("Unable to load projects");
  599. };
  600. xhr.send();
  601. </script>
  602. <script>
  603. const versioningConfig = {
  604. githubUser: 'Farama-Foundation',
  605. githubRepo: 'Minigrid',
  606. };
  607. fetch('/main/_static/versioning/versioning_menu.html').then(response => {
  608. if (response.status === 200) {
  609. response.text().then(text => {
  610. const container = document.createElement("div");
  611. container.innerHTML = text;
  612. document.querySelector("body").appendChild(container);
  613. // innerHtml doenst evaluate scripts, we need to add them dynamically
  614. Array.from(container.querySelectorAll("script")).forEach(oldScript => {
  615. const newScript = document.createElement("script");
  616. Array.from(oldScript.attributes).forEach(attr => newScript.setAttribute(attr.name, attr.value));
  617. newScript.appendChild(document.createTextNode(oldScript.innerHTML));
  618. oldScript.parentNode.replaceChild(newScript, oldScript);
  619. });
  620. });
  621. } else {
  622. console.warn("Unable to load versioning menu", response);
  623. }
  624. });
  625. </script>
  626. </body>
  627. </html>