index.html 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977
  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/environments/minigrid/index.html" /><meta property="og:image" content="https://minigrid.farama.org//_static/img/minigrid-github.png" /><meta name="twitter:card" content="summary_large_image"><meta name="viewport" content="width=device-width, initial-scale=1" />
  11. <link rel="index" title="Index" href="../../genindex/" /><link rel="search" title="Search" href="../../search/" /><link rel="next" title="Blocked Unlock Pickup" href="BlockedUnlockPickupEnv/" /><link rel="prev" title="Action Bonus" href="../../api/wrappers/" />
  12. <link rel="canonical" href="https://minigrid.farama.org/environments/minigrid/index.html" />
  13. <link rel="shortcut icon" href="../../_static/minigrid-favicon.png"/><!-- Generated with Sphinx 7.2.6 and Furo 2023.08.19.dev1 -->
  14. <title>Minigrid Environments - MiniGrid Documentation</title>
  15. <link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=a746c00c" />
  16. <link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=3e7f4c72" />
  17. <link rel="stylesheet" type="text/css" href="../../_static/styles/furo-extensions.css?v=49cbaffd" />
  18. <style>
  19. body {
  20. --color-code-background: #f8f8f8;
  21. --color-code-foreground: black;
  22. }
  23. @media not print {
  24. body[data-theme="dark"] {
  25. --color-code-background: #202020;
  26. --color-code-foreground: #d0d0d0;
  27. }
  28. @media (prefers-color-scheme: dark) {
  29. body:not([data-theme="light"]) {
  30. --color-code-background: #202020;
  31. --color-code-foreground: #d0d0d0;
  32. }
  33. }
  34. }
  35. </style></head>
  36. <body>
  37. <header class="farama-header" aria-label="Farama header">
  38. <div class="farama-header__container">
  39. <div class="farama-header__left--mobile">
  40. <label class="nav-overlay-icon" for="__navigation">
  41. <div class="visually-hidden">Toggle site navigation sidebar</div>
  42. <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
  43. <defs></defs>
  44. <line x1="0.5" y1="4" x2="23.5" y2="4"></line>
  45. <line x1="0.232" y1="12" x2="23.5" y2="12"></line>
  46. <line x1="0.232" y1="20" x2="23.5" y2="20"></line>
  47. </svg>
  48. </label>
  49. </div>
  50. <div class="farama-header__left farama-header__center--mobile">
  51. <a href="../../">
  52. <img class="farama-header__logo only-light" src="../../_static/img/minigrid.svg" alt="Light Logo"/>
  53. <img class="farama-header__logo only-dark" src="../../_static/img/minigrid-white.svg" alt="Dark Logo"/>
  54. <span class="farama-header__title">MiniGrid Documentation</span>
  55. </a>
  56. </div>
  57. <div class="farama-header__right">
  58. <div class="farama-header-menu">
  59. <button class="farama-header-menu__btn" aria-label="Open Farama Menu" aria-expanded="false" aria-haspopup="true" aria-controls="farama-menu">
  60. <img class="farama-black-logo-invert" src="../../_static/img/farama-logo-header.svg">
  61. <svg viewBox="0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
  62. <polyline style="stroke-linecap: round; stroke-linejoin: round; fill: none; stroke-width: 2px;" points="1 7 12 18 23 7"></polyline>
  63. </svg>
  64. </button>
  65. <div class="farama-header-menu-container farama-hidden" aria-hidden="true" id="farama-menu">
  66. <div class="farama-header-menu__header">
  67. <a href="https://farama.org">
  68. <img class="farama-header-menu__logo farama-white-logo-invert" src="../../_static/img/farama_solid_white.svg" alt="Farama Foundation logo">
  69. <span>Farama Foundation</span>
  70. </a>
  71. <div class="farama-header-menu-header__right">
  72. <button id="farama-close-menu">
  73. <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor"
  74. stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon-close">
  75. <line x1="3" y1="21" x2="21" y2="3"></line>
  76. <line x1="3" y1="3" x2="21" y2="21"></line>
  77. </svg>
  78. </button>
  79. </div>
  80. </div>
  81. <div class="farama-header-menu__body">
  82. <!-- Response from farama.org/api/projects.json -->
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. </header>
  89. <script>
  90. document.body.dataset.theme = localStorage.getItem("theme") || "auto";
  91. </script>
  92. <svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
  93. <symbol id="svg-toc" viewBox="0 0 24 24">
  94. <title>Contents</title>
  95. <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
  96. <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"/>
  97. </svg>
  98. </symbol>
  99. <symbol id="svg-menu" viewBox="0 0 24 24">
  100. <title>Menu</title>
  101. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
  102. stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
  103. <line x1="3" y1="12" x2="21" y2="12"></line>
  104. <line x1="3" y1="6" x2="21" y2="6"></line>
  105. <line x1="3" y1="18" x2="21" y2="18"></line>
  106. </svg>
  107. </symbol>
  108. <symbol id="svg-arrow-right" viewBox="0 0 24 24">
  109. <title>Expand</title>
  110. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
  111. stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
  112. <polyline points="9 18 15 12 9 6"></polyline>
  113. </svg>
  114. </symbol>
  115. <symbol id="svg-sun" viewBox="0 0 24 24">
  116. <title>Light mode</title>
  117. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
  118. stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
  119. <circle cx="12" cy="12" r="5"></circle>
  120. <line x1="12" y1="1" x2="12" y2="3"></line>
  121. <line x1="12" y1="21" x2="12" y2="23"></line>
  122. <line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
  123. <line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
  124. <line x1="1" y1="12" x2="3" y2="12"></line>
  125. <line x1="21" y1="12" x2="23" y2="12"></line>
  126. <line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
  127. <line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
  128. </svg>
  129. </symbol>
  130. <symbol id="svg-moon" viewBox="0 0 24 24">
  131. <title>Dark mode</title>
  132. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
  133. stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
  134. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  135. <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" />
  136. </svg>
  137. </symbol>
  138. <symbol id="svg-sun-half" viewBox="0 0 24 24">
  139. <title>Auto light/dark mode</title>
  140. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
  141. stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-shadow">
  142. <path stroke="none" d="M0 0h24v24H0z" fill="none"/>
  143. <circle cx="12" cy="12" r="9" />
  144. <path d="M13 12h5" />
  145. <path d="M13 15h4" />
  146. <path d="M13 18h1" />
  147. <path d="M13 9h4" />
  148. <path d="M13 6h1" />
  149. </svg>
  150. </symbol>
  151. </svg>
  152. <input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation">
  153. <input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc">
  154. <label class="overlay sidebar-overlay" for="__navigation">
  155. <div class="visually-hidden">Hide navigation sidebar</div>
  156. </label>
  157. <label class="overlay toc-overlay" for="__toc">
  158. <div class="visually-hidden">Hide table of contents sidebar</div>
  159. </label>
  160. <div class="page">
  161. <!--<header class="mobile-header">
  162. <div class="header-left">
  163. <label class="nav-overlay-icon" for="__navigation">
  164. <div class="visually-hidden">Toggle site navigation sidebar</div>
  165. <i class="icon"><svg><use href="#svg-menu"></use></svg></i>
  166. </label>
  167. </div>
  168. <div class="header-center">
  169. <a href="../../"><div class="brand">MiniGrid Documentation</div></a>
  170. </div>
  171. <div class="header-right">
  172. <div class="theme-toggle-container theme-toggle-header">
  173. <button class="theme-toggle">
  174. <div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
  175. <svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
  176. <svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
  177. <svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
  178. </button>
  179. </div>
  180. <label class="toc-overlay-icon toc-header-icon no-toc" for="__toc">
  181. <div class="visually-hidden">Toggle table of contents sidebar</div>
  182. <i class="icon"><svg><use href="#svg-toc"></use></svg></i>
  183. </label>
  184. </div>
  185. </header>-->
  186. <aside class="sidebar-drawer">
  187. <div class="sidebar-container">
  188. <div class="sidebar-sticky"><a class="farama-sidebar__title" href="../../">
  189. <img class="farama-header__logo only-light" src="../../_static/img/minigrid.svg" alt="Light Logo"/>
  190. <img class="farama-header__logo only-dark" src="../../_static/img/minigrid-white.svg" alt="Dark Logo"/>
  191. <span class="farama-header__title">MiniGrid Documentation</span>
  192. </a><form class="sidebar-search-container" method="get" action="../../search/" role="search">
  193. <input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
  194. <input type="hidden" name="check_keywords" value="yes">
  195. <input type="hidden" name="area" value="default">
  196. </form>
  197. <div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
  198. <p class="caption" role="heading"><span class="caption-text">Introduction</span></p>
  199. <ul>
  200. <li class="toctree-l1"><a class="reference internal" href="../../content/basic_usage/">Basic Usage</a></li>
  201. <li class="toctree-l1"><a class="reference internal" href="../../content/basic_usage/#installation">Installation</a></li>
  202. <li class="toctree-l1"><a class="reference internal" href="../../content/publications/">List of Publications</a></li>
  203. <li class="toctree-l1"><a class="reference internal" href="../../content/create_env_tutorial/">Tutorial on Creating Environments</a></li>
  204. <li class="toctree-l1"><a class="reference internal" href="../../content/training/">Training Minigrid Environments</a></li>
  205. </ul>
  206. <p class="caption" role="heading"><span class="caption-text">Wrappers</span></p>
  207. <ul>
  208. <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>
  209. <li class="toctree-l2"><a class="reference internal" href="../../api/wrappers/">Action Bonus</a></li>
  210. <li class="toctree-l2"><a class="reference internal" href="../../api/wrappers/#dict-observation-space">Dict Observation Space</a></li>
  211. <li class="toctree-l2"><a class="reference internal" href="../../api/wrappers/#direction-obs">Direction Obs</a></li>
  212. <li class="toctree-l2"><a class="reference internal" href="../../api/wrappers/#flatobs">FlatObs</a></li>
  213. <li class="toctree-l2"><a class="reference internal" href="../../api/wrappers/#fully-obs">Fully Obs</a></li>
  214. <li class="toctree-l2"><a class="reference internal" href="../../api/wrappers/#image-observation">Image Observation</a></li>
  215. <li class="toctree-l2"><a class="reference internal" href="../../api/wrappers/#no-death">No Death</a></li>
  216. <li class="toctree-l2"><a class="reference internal" href="../../api/wrappers/#observation">Observation</a></li>
  217. <li class="toctree-l2"><a class="reference internal" href="../../api/wrappers/#one-hot-partial-obs">One Hot Partial Obs</a></li>
  218. <li class="toctree-l2"><a class="reference internal" href="../../api/wrappers/#reseed">Reseed</a></li>
  219. <li class="toctree-l2"><a class="reference internal" href="../../api/wrappers/#rgb-img-obs">RGB Img Obs</a></li>
  220. <li class="toctree-l2"><a class="reference internal" href="../../api/wrappers/#rgb-partial-img-obs">RGB Partial Img Obs</a></li>
  221. <li class="toctree-l2"><a class="reference internal" href="../../api/wrappers/#position-bonus">Position Bonus</a></li>
  222. <li class="toctree-l2"><a class="reference internal" href="../../api/wrappers/#stochastic-action">Stochastic Action</a></li>
  223. <li class="toctree-l2"><a class="reference internal" href="../../api/wrappers/#symbolic-obs">Symbolic Obs</a></li>
  224. <li class="toctree-l2"><a class="reference internal" href="../../api/wrappers/#view-size">View Size</a></li>
  225. </ul>
  226. </li>
  227. </ul>
  228. <p class="caption" role="heading"><span class="caption-text">Environments</span></p>
  229. <ul class="current">
  230. <li class="toctree-l1 current has-children current-page"><a class="current reference internal" href="#">Minigrid Environments</a><input checked="" 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>
  231. <li class="toctree-l2"><a class="reference internal" href="BlockedUnlockPickupEnv/">Blocked Unlock Pickup</a></li>
  232. <li class="toctree-l2"><a class="reference internal" href="CrossingEnv/">Crossing</a></li>
  233. <li class="toctree-l2"><a class="reference internal" href="DistShiftEnv/">Dist Shift</a></li>
  234. <li class="toctree-l2"><a class="reference internal" href="DoorKeyEnv/">Door Key</a></li>
  235. <li class="toctree-l2"><a class="reference internal" href="DynamicObstaclesEnv/">Dynamic Obstacles</a></li>
  236. <li class="toctree-l2"><a class="reference internal" href="EmptyEnv/">Empty</a></li>
  237. <li class="toctree-l2"><a class="reference internal" href="FetchEnv/">Fetch</a></li>
  238. <li class="toctree-l2"><a class="reference internal" href="FourRoomsEnv/">Four Rooms</a></li>
  239. <li class="toctree-l2"><a class="reference internal" href="GoToDoorEnv/">Go To Door</a></li>
  240. <li class="toctree-l2"><a class="reference internal" href="GoToObjectEnv/">Go To Object</a></li>
  241. <li class="toctree-l2"><a class="reference internal" href="KeyCorridorEnv/">Key Corridor</a></li>
  242. <li class="toctree-l2"><a class="reference internal" href="LavaGapEnv/">Lava Gap</a></li>
  243. <li class="toctree-l2"><a class="reference internal" href="LockedRoomEnv/">Locked Room</a></li>
  244. <li class="toctree-l2"><a class="reference internal" href="MemoryEnv/">Memory</a></li>
  245. <li class="toctree-l2"><a class="reference internal" href="MultiRoomEnv/">Multi Room</a></li>
  246. <li class="toctree-l2"><a class="reference internal" href="ObstructedMaze_1Dlhb/">Obstructed Maze Dlhb</a></li>
  247. <li class="toctree-l2"><a class="reference internal" href="ObstructedMaze_Full/">Obstructed Maze Full</a></li>
  248. <li class="toctree-l2"><a class="reference internal" href="PlaygroundEnv/">Playground</a></li>
  249. <li class="toctree-l2"><a class="reference internal" href="PutNearEnv/">Put Near</a></li>
  250. <li class="toctree-l2"><a class="reference internal" href="RedBlueDoorEnv/">Red Blue Door</a></li>
  251. <li class="toctree-l2"><a class="reference internal" href="UnlockEnv/">Unlock</a></li>
  252. <li class="toctree-l2"><a class="reference internal" href="UnlockPickupEnv/">Unlock Pickup</a></li>
  253. </ul>
  254. </li>
  255. <li class="toctree-l1 has-children"><a class="reference internal" href="../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>
  256. <li class="toctree-l2"><a class="reference internal" href="../babyai/GoToRedBallGrey/">Go To Red Ball Grey</a></li>
  257. <li class="toctree-l2"><a class="reference internal" href="../babyai/GoToRedBall/">Go To Red Ball</a></li>
  258. <li class="toctree-l2"><a class="reference internal" href="../babyai/GoToRedBallNoDists/">Go To Red Ball No Dists</a></li>
  259. <li class="toctree-l2"><a class="reference internal" href="../babyai/GoToObj/">Go To Obj</a></li>
  260. <li class="toctree-l2"><a class="reference internal" href="../babyai/GoToLocal/">Go To Local</a></li>
  261. <li class="toctree-l2"><a class="reference internal" href="../babyai/GoTo/">Go To</a></li>
  262. <li class="toctree-l2"><a class="reference internal" href="../babyai/GoToImpUnlock/">Go To Imp Unlock</a></li>
  263. <li class="toctree-l2"><a class="reference internal" href="../babyai/GoToSeq/">Go To Seq</a></li>
  264. <li class="toctree-l2"><a class="reference internal" href="../babyai/GoToRedBlueBall/">Go To Red Blue Ball</a></li>
  265. <li class="toctree-l2"><a class="reference internal" href="../babyai/GoToDoor/">Go To Door</a></li>
  266. <li class="toctree-l2"><a class="reference internal" href="../babyai/GoToObjDoor/">Go To Obj Door</a></li>
  267. <li class="toctree-l2"><a class="reference internal" href="../babyai/Open/">Open</a></li>
  268. <li class="toctree-l2"><a class="reference internal" href="../babyai/OpenRedDoor/">Open Red Door</a></li>
  269. <li class="toctree-l2"><a class="reference internal" href="../babyai/OpenDoor/">Open Door</a></li>
  270. <li class="toctree-l2"><a class="reference internal" href="../babyai/OpenTwoDoors/">Open Two Doors</a></li>
  271. <li class="toctree-l2"><a class="reference internal" href="../babyai/OpenDoorsOrder/">Open Doors Order</a></li>
  272. <li class="toctree-l2"><a class="reference internal" href="../babyai/Pickup/">Pickup</a></li>
  273. <li class="toctree-l2"><a class="reference internal" href="../babyai/UnblockPickup/">Unblock Pickup</a></li>
  274. <li class="toctree-l2"><a class="reference internal" href="../babyai/PickupLoc/">Pickup Loc</a></li>
  275. <li class="toctree-l2"><a class="reference internal" href="../babyai/PickupDist/">Pickup Dist</a></li>
  276. <li class="toctree-l2"><a class="reference internal" href="../babyai/PickupAbove/">Pickup Above</a></li>
  277. <li class="toctree-l2"><a class="reference internal" href="../babyai/PutNextLocal/">Put Next Local</a></li>
  278. <li class="toctree-l2"><a class="reference internal" href="../babyai/PutNext/">Put Next</a></li>
  279. <li class="toctree-l2"><a class="reference internal" href="../babyai/Unlock/">Unlock</a></li>
  280. <li class="toctree-l2"><a class="reference internal" href="../babyai/UnlockLocal/">Unlock Local</a></li>
  281. <li class="toctree-l2"><a class="reference internal" href="../babyai/KeyInBox/">Key In Box</a></li>
  282. <li class="toctree-l2"><a class="reference internal" href="../babyai/UnlockPickup/">Unlock Pickup</a></li>
  283. <li class="toctree-l2"><a class="reference internal" href="../babyai/BlockedUnlockPickup/">Blocked Unlock Pickup</a></li>
  284. <li class="toctree-l2"><a class="reference internal" href="../babyai/UnlockToUnlock/">Unlock To Unlock</a></li>
  285. <li class="toctree-l2"><a class="reference internal" href="../babyai/ActionObjDoor/">Action Obj Door</a></li>
  286. <li class="toctree-l2"><a class="reference internal" href="../babyai/FindObjS5/">Find Obj</a></li>
  287. <li class="toctree-l2"><a class="reference internal" href="../babyai/KeyCorridor/">Key Corridor</a></li>
  288. <li class="toctree-l2"><a class="reference internal" href="../babyai/OneRoomS8/">One Room</a></li>
  289. <li class="toctree-l2"><a class="reference internal" href="../babyai/MoveTwoAcross/">Move Two Across</a></li>
  290. <li class="toctree-l2"><a class="reference internal" href="../babyai/Synth/">Synth</a></li>
  291. <li class="toctree-l2"><a class="reference internal" href="../babyai/SynthLoc/">Synth Loc</a></li>
  292. <li class="toctree-l2"><a class="reference internal" href="../babyai/SynthSeq/">Synth Seq</a></li>
  293. <li class="toctree-l2"><a class="reference internal" href="../babyai/MiniBossLevel/">Mini Boss Level</a></li>
  294. <li class="toctree-l2"><a class="reference internal" href="../babyai/BossLevel/">Boss Level</a></li>
  295. <li class="toctree-l2"><a class="reference internal" href="../babyai/BossLevelNoUnlock/">Boss Level No Unlock</a></li>
  296. </ul>
  297. </li>
  298. </ul>
  299. <p class="caption" role="heading"><span class="caption-text">Development</span></p>
  300. <ul>
  301. <li class="toctree-l1"><a class="reference internal" href="../../release_notes/">Release Notes</a></li>
  302. <li class="toctree-l1"><a class="reference external" href="https://github.com/Farama-Foundation/MiniGrid">Github</a></li>
  303. </ul>
  304. </div>
  305. </div>
  306. </div>
  307. </div>
  308. </aside>
  309. <div class="main-container">
  310. <div class="main">
  311. <div class="content">
  312. <div class="article-container">
  313. <a href="#" class="back-to-top muted-link">
  314. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
  315. <path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
  316. </svg>
  317. <span>Back to top</span>
  318. </a>
  319. <div class="content-icon-container"><div class="edit-this-page">
  320. <a class="muted-link" href="https://github.com/Farama-Foundation/Minigrid/edit/master/docs/environments/minigrid/index.md" title="Edit this page">
  321. <svg aria-hidden="true" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
  322. <path stroke="none" d="M0 0h24v24H0z" fill="none"/>
  323. <path d="M4 20h4l10.5 -10.5a1.5 1.5 0 0 0 -4 -4l-10.5 10.5v4" />
  324. <line x1="13.5" y1="6.5" x2="17.5" y2="10.5" />
  325. </svg>
  326. <span class="visually-hidden">Edit this page</span>
  327. </a>
  328. </div><div class="theme-toggle-container theme-toggle-content">
  329. <button class="theme-toggle" title="Toggle color theme">
  330. <div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
  331. <svg class="theme-icon-when-auto">
  332. <use href="#svg-sun-half"></use>
  333. </svg>
  334. <svg class="theme-icon-when-dark">
  335. <use href="#svg-moon"></use>
  336. </svg>
  337. <svg class="theme-icon-when-light">
  338. <use href="#svg-sun"></use>
  339. </svg>
  340. </button>
  341. </div>
  342. <label class="toc-overlay-icon toc-content-icon no-toc" for="__toc">
  343. <div class="visually-hidden">Toggle table of contents sidebar</div>
  344. <i class="icon"><svg>
  345. <use href="#svg-toc"></use>
  346. </svg></i>
  347. </label>
  348. </div>
  349. <article role="main">
  350. <section id="minigrid-environments">
  351. <h1>Minigrid Environments<a class="headerlink" href="#minigrid-environments" title="Link to this heading">#</a></h1>
  352. <p>The environments listed below are implemented in the <a class="reference internal" href="#/minigrid/envs"><span class="xref myst">minigrid/envs</span></a> directory.
  353. Each environment provides one or more configurations registered with OpenAI gym. Each environment
  354. is also programmatically tunable in terms of size/complexity, which is useful for curriculum learning
  355. or to fine-tune difficulty.</p>
  356. <div class="env-grid">
  357. <a href="BlockedUnlockPickupEnv">
  358. <div class="env-grid__cell">
  359. <div class="cell__image-container">
  360. <img src="/_static/videos/minigrid/BlockedUnlockPickupEnv.gif">
  361. </div>
  362. <div class="cell__title">
  363. <span>Blockedunlockpickupenv</span>
  364. </div>
  365. </div>
  366. </a>
  367. <a href="CrossingEnv">
  368. <div class="env-grid__cell">
  369. <div class="cell__image-container">
  370. <img src="/_static/videos/minigrid/CrossingEnv.gif">
  371. </div>
  372. <div class="cell__title">
  373. <span>Crossingenv</span>
  374. </div>
  375. </div>
  376. </a>
  377. <a href="DistShiftEnv">
  378. <div class="env-grid__cell">
  379. <div class="cell__image-container">
  380. <img src="/_static/videos/minigrid/DistShiftEnv.gif">
  381. </div>
  382. <div class="cell__title">
  383. <span>Distshiftenv</span>
  384. </div>
  385. </div>
  386. </a>
  387. <a href="DoorKeyEnv">
  388. <div class="env-grid__cell">
  389. <div class="cell__image-container">
  390. <img src="/_static/videos/minigrid/DoorKeyEnv.gif">
  391. </div>
  392. <div class="cell__title">
  393. <span>Doorkeyenv</span>
  394. </div>
  395. </div>
  396. </a>
  397. <a href="DynamicObstaclesEnv">
  398. <div class="env-grid__cell">
  399. <div class="cell__image-container">
  400. <img src="/_static/videos/minigrid/DynamicObstaclesEnv.gif">
  401. </div>
  402. <div class="cell__title">
  403. <span>Dynamicobstaclesenv</span>
  404. </div>
  405. </div>
  406. </a>
  407. <a href="EmptyEnv">
  408. <div class="env-grid__cell">
  409. <div class="cell__image-container">
  410. <img src="/_static/videos/minigrid/EmptyEnv.gif">
  411. </div>
  412. <div class="cell__title">
  413. <span>Emptyenv</span>
  414. </div>
  415. </div>
  416. </a>
  417. <a href="FetchEnv">
  418. <div class="env-grid__cell">
  419. <div class="cell__image-container">
  420. <img src="/_static/videos/minigrid/FetchEnv.gif">
  421. </div>
  422. <div class="cell__title">
  423. <span>Fetchenv</span>
  424. </div>
  425. </div>
  426. </a>
  427. <a href="FourRoomsEnv">
  428. <div class="env-grid__cell">
  429. <div class="cell__image-container">
  430. <img src="/_static/videos/minigrid/FourRoomsEnv.gif">
  431. </div>
  432. <div class="cell__title">
  433. <span>Fourroomsenv</span>
  434. </div>
  435. </div>
  436. </a>
  437. <a href="GoToDoorEnv">
  438. <div class="env-grid__cell">
  439. <div class="cell__image-container">
  440. <img src="/_static/videos/minigrid/GoToDoorEnv.gif">
  441. </div>
  442. <div class="cell__title">
  443. <span>Gotodoorenv</span>
  444. </div>
  445. </div>
  446. </a>
  447. <a href="GoToObjectEnv">
  448. <div class="env-grid__cell">
  449. <div class="cell__image-container">
  450. <img src="/_static/videos/minigrid/GoToObjectEnv.gif">
  451. </div>
  452. <div class="cell__title">
  453. <span>Gotoobjectenv</span>
  454. </div>
  455. </div>
  456. </a>
  457. <a href="KeyCorridorEnv">
  458. <div class="env-grid__cell">
  459. <div class="cell__image-container">
  460. <img src="/_static/videos/minigrid/KeyCorridorEnv.gif">
  461. </div>
  462. <div class="cell__title">
  463. <span>Keycorridorenv</span>
  464. </div>
  465. </div>
  466. </a>
  467. <a href="LavaGapEnv">
  468. <div class="env-grid__cell">
  469. <div class="cell__image-container">
  470. <img src="/_static/videos/minigrid/LavaGapEnv.gif">
  471. </div>
  472. <div class="cell__title">
  473. <span>Lavagapenv</span>
  474. </div>
  475. </div>
  476. </a>
  477. <a href="LockedRoomEnv">
  478. <div class="env-grid__cell">
  479. <div class="cell__image-container">
  480. <img src="/_static/videos/minigrid/LockedRoomEnv.gif">
  481. </div>
  482. <div class="cell__title">
  483. <span>Lockedroomenv</span>
  484. </div>
  485. </div>
  486. </a>
  487. <a href="MemoryEnv">
  488. <div class="env-grid__cell">
  489. <div class="cell__image-container">
  490. <img src="/_static/videos/minigrid/MemoryEnv.gif">
  491. </div>
  492. <div class="cell__title">
  493. <span>Memoryenv</span>
  494. </div>
  495. </div>
  496. </a>
  497. <a href="MultiRoomEnv">
  498. <div class="env-grid__cell">
  499. <div class="cell__image-container">
  500. <img src="/_static/videos/minigrid/MultiRoomEnv.gif">
  501. </div>
  502. <div class="cell__title">
  503. <span>Multiroomenv</span>
  504. </div>
  505. </div>
  506. </a>
  507. <a href="ObstructedMaze_1Dlhb">
  508. <div class="env-grid__cell">
  509. <div class="cell__image-container">
  510. <img src="/_static/videos/minigrid/ObstructedMaze_1Dlhb.gif">
  511. </div>
  512. <div class="cell__title">
  513. <span>Obstructedmaze 1Dlhb</span>
  514. </div>
  515. </div>
  516. </a>
  517. <a href="ObstructedMaze_Full">
  518. <div class="env-grid__cell">
  519. <div class="cell__image-container">
  520. <img src="/_static/videos/minigrid/ObstructedMaze_Full.gif">
  521. </div>
  522. <div class="cell__title">
  523. <span>Obstructedmaze Full</span>
  524. </div>
  525. </div>
  526. </a>
  527. <a href="ObstructedMaze_Full_V1">
  528. <div class="env-grid__cell">
  529. <div class="cell__image-container">
  530. <img src="/_static/videos/minigrid/ObstructedMaze_Full_V1.gif">
  531. </div>
  532. <div class="cell__title">
  533. <span>Obstructedmaze Full V1</span>
  534. </div>
  535. </div>
  536. </a>
  537. <a href="PlaygroundEnv">
  538. <div class="env-grid__cell">
  539. <div class="cell__image-container">
  540. <img src="/_static/videos/minigrid/PlaygroundEnv.gif">
  541. </div>
  542. <div class="cell__title">
  543. <span>Playgroundenv</span>
  544. </div>
  545. </div>
  546. </a>
  547. <a href="PutNearEnv">
  548. <div class="env-grid__cell">
  549. <div class="cell__image-container">
  550. <img src="/_static/videos/minigrid/PutNearEnv.gif">
  551. </div>
  552. <div class="cell__title">
  553. <span>Putnearenv</span>
  554. </div>
  555. </div>
  556. </a>
  557. <a href="RedBlueDoorEnv">
  558. <div class="env-grid__cell">
  559. <div class="cell__image-container">
  560. <img src="/_static/videos/minigrid/RedBlueDoorEnv.gif">
  561. </div>
  562. <div class="cell__title">
  563. <span>Redbluedoorenv</span>
  564. </div>
  565. </div>
  566. </a>
  567. <a href="UnlockEnv">
  568. <div class="env-grid__cell">
  569. <div class="cell__image-container">
  570. <img src="/_static/videos/minigrid/UnlockEnv.gif">
  571. </div>
  572. <div class="cell__title">
  573. <span>Unlockenv</span>
  574. </div>
  575. </div>
  576. </a>
  577. <a href="UnlockPickupEnv">
  578. <div class="env-grid__cell">
  579. <div class="cell__image-container">
  580. <img src="/_static/videos/minigrid/UnlockPickupEnv.gif">
  581. </div>
  582. <div class="cell__title">
  583. <span>Unlockpickupenv</span>
  584. </div>
  585. </div>
  586. </a>
  587. </div>
  588. <div class="toctree-wrapper compound">
  589. </div>
  590. </section>
  591. </article>
  592. </div>
  593. <footer>
  594. <div class="related-pages">
  595. </div>
  596. <div class="bottom-of-page">
  597. <div class="left-details">
  598. <div class="copyright">
  599. Copyright &#169; 2023 Farama Foundation
  600. </div>
  601. <!--
  602. Made with <a href="https://www.sphinx-doc.org/">Sphinx</a> and <a class="muted-link" href="https://pradyunsg.me">@pradyunsg</a>'s
  603. <a href="https://github.com/pradyunsg/furo">Furo</a>
  604. -->
  605. </div>
  606. <div class="right-details">
  607. <div class="icons">
  608. <a class="muted-link" href="https://github.com/Farama-Foundation/Minigrid/"
  609. aria-label="On GitHub">
  610. <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16">
  611. <path fill-rule="evenodd"
  612. 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">
  613. </path>
  614. </svg>
  615. </a>
  616. </div>
  617. </div>
  618. </div>
  619. </footer>
  620. </div>
  621. <aside class="toc-drawer no-toc">
  622. </aside>
  623. </div>
  624. </div>
  625. </div>
  626. <script>
  627. const toggleMenu = () => {
  628. const menuBtn = document.querySelector(".farama-header-menu__btn");
  629. const menuContainer = document.querySelector(".farama-header-menu-container");
  630. if (document.querySelector(".farama-header-menu").classList.contains("active")) {
  631. menuBtn.setAttribute("aria-expanded", "false");
  632. menuContainer.setAttribute("aria-hidden", "true");
  633. } else {
  634. menuBtn.setAttribute("aria-expanded", "true");
  635. menuContainer.setAttribute("aria-hidden", "false");
  636. }
  637. document.querySelector(".farama-header-menu").classList.toggle("active");
  638. }
  639. document.querySelector(".farama-header-menu__btn").addEventListener("click", toggleMenu);
  640. document.getElementById("farama-close-menu").addEventListener("click", toggleMenu);
  641. </script>
  642. <script async src="https://www.googletagmanager.com/gtag/js?id=G-FBXJQQLXKD"></script>
  643. <script>
  644. const enableGtag = () => {
  645. window.dataLayer = window.dataLayer || [];
  646. function gtag(){dataLayer.push(arguments);}
  647. gtag('js', new Date());
  648. gtag('config', 'G-FBXJQQLXKD');
  649. }
  650. (() => {
  651. if (!localStorage.getItem("acceptedCookieAlert")) {
  652. const boxElem = document.createElement("div");
  653. boxElem.classList.add("cookie-alert");
  654. const containerElem = document.createElement("div");
  655. containerElem.classList.add("cookie-alert__container");
  656. const textElem = document.createElement("p");
  657. textElem.innerHTML = `This page uses <a href="https://analytics.google.com/">
  658. Google Analytics</a> to collect statistics.`;
  659. containerElem.appendChild(textElem);
  660. const declineBtn = Object.assign(document.createElement("button"),
  661. {
  662. innerText: "Deny",
  663. className: "farama-btn cookie-alert__button",
  664. id: "cookie-alert__decline",
  665. }
  666. );
  667. declineBtn.addEventListener("click", () => {
  668. localStorage.setItem("acceptedCookieAlert", false);
  669. boxElem.remove();
  670. });
  671. const acceptBtn = Object.assign(document.createElement("button"),
  672. {
  673. innerText: "Allow",
  674. className: "farama-btn cookie-alert__button",
  675. id: "cookie-alert__accept",
  676. }
  677. );
  678. acceptBtn.addEventListener("click", () => {
  679. localStorage.setItem("acceptedCookieAlert", true);
  680. boxElem.remove();
  681. enableGtag();
  682. });
  683. containerElem.appendChild(declineBtn);
  684. containerElem.appendChild(acceptBtn);
  685. boxElem.appendChild(containerElem);
  686. document.body.appendChild(boxElem);
  687. } else if (localStorage.getItem("acceptedCookieAlert") === "true") {
  688. enableGtag();
  689. }
  690. })()
  691. </script>
  692. <script src="../../_static/documentation_options.js?v=7fa42598"></script>
  693. <script src="../../_static/doctools.js?v=888ff710"></script>
  694. <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
  695. <script src="../../_static/scripts/furo.js?v=7660844c"></script>
  696. <script>
  697. const createProjectsList = (projects, displayImages) => {
  698. const ulElem = Object.assign(document.createElement('ul'),
  699. {
  700. className:'farama-header-menu-list',
  701. }
  702. )
  703. for (let project of projects) {
  704. const liElem = document.createElement("li");
  705. const aElem = Object.assign(document.createElement("a"),
  706. {
  707. href: project.link
  708. }
  709. );
  710. liElem.appendChild(aElem);
  711. if (displayImages) {
  712. const imgElem = Object.assign(document.createElement("img"),
  713. {
  714. src: project.image ? imagesBasepath + project.image : imagesBasepath + "/farama_black.svg",
  715. alt: `${project.name} logo`,
  716. className: "farama-black-logo-invert"
  717. }
  718. );
  719. aElem.appendChild(imgElem);
  720. }
  721. aElem.appendChild(document.createTextNode(project.name));
  722. ulElem.appendChild(liElem);
  723. }
  724. return ulElem;
  725. }
  726. // Create menu with Farama projects by using the API at farama.org/api/projects.json
  727. const createCORSRequest = (method, url) => {
  728. let xhr = new XMLHttpRequest();
  729. xhr.responseType = 'json';
  730. if ("withCredentials" in xhr) {
  731. xhr.open(method, url, true);
  732. } else if (typeof XDomainRequest != "undefined") {
  733. // IE8 & IE9
  734. xhr = new XDomainRequest();
  735. xhr.open(method, url);
  736. } else {
  737. // CORS not supported.
  738. xhr = null;
  739. }
  740. return xhr;
  741. };
  742. const url = 'https://farama.org/api/projects.json';
  743. const imagesBasepath = "https://farama.org/assets/images"
  744. const method = 'GET';
  745. let xhr = createCORSRequest(method, url);
  746. xhr.onload = () => {
  747. const jsonResponse = xhr.response;
  748. const sections = {
  749. "Core Projects": [],
  750. "Mature Projects": {
  751. "Documentation": [],
  752. "Repositories": [],
  753. },
  754. "Incubating Projects": {
  755. "Documentation": [],
  756. "Repositories": [],
  757. },
  758. "Foundation": [
  759. {
  760. name: "About",
  761. link: "https://farama.org/about"
  762. },
  763. {
  764. name: "Standards",
  765. link: "https://farama.org/project_standards",
  766. },
  767. {
  768. name: "Donate",
  769. link: "https://farama.org/donations"
  770. }
  771. ]
  772. }
  773. // Categorize projects
  774. Object.keys(jsonResponse).forEach(key => {
  775. projectJson = jsonResponse[key];
  776. if (projectJson.website !== null) {
  777. projectJson.link = projectJson.website;
  778. } else {
  779. projectJson.link = projectJson.github;
  780. }
  781. if (projectJson.type === "core") {
  782. sections["Core Projects"].push(projectJson)
  783. } else if (projectJson.type == "mature") {
  784. if (projectJson.website !== null) {
  785. sections["Mature Projects"]["Documentation"].push(projectJson)
  786. } else {
  787. sections["Mature Projects"]["Repositories"].push(projectJson)
  788. }
  789. } else {
  790. if (projectJson.website !== null) {
  791. sections["Incubating Projects"]["Documentation"].push(projectJson)
  792. } else {
  793. sections["Incubating Projects"]["Repositories"].push(projectJson)
  794. }
  795. }
  796. })
  797. const menuContainer = document.querySelector(".farama-header-menu__body");
  798. Object.keys(sections).forEach((key, i) => {
  799. const sectionElem = Object.assign(
  800. document.createElement('div'), {
  801. className:'farama-header-menu__section',
  802. }
  803. )
  804. sectionElem.appendChild(Object.assign(document.createElement('span'),
  805. {
  806. className:'farama-header-menu__section-title' ,
  807. innerText: key
  808. }
  809. ))
  810. // is not a list
  811. if (sections[key].constructor !== Array) {
  812. const subSections = sections[key];
  813. const subSectionContainerElem = Object.assign(
  814. document.createElement('div'), {
  815. className:'farama-header-menu__subsections-container',
  816. style: 'display: flex'
  817. }
  818. )
  819. Object.keys(subSections).forEach((subKey, i) => {
  820. const subSectionElem = Object.assign(
  821. document.createElement('div'), {
  822. className:'farama-header-menu__subsection',
  823. }
  824. )
  825. subSectionElem.appendChild(Object.assign(document.createElement('span'),
  826. {
  827. className:'farama-header-menu__subsection-title' ,
  828. innerText: subKey
  829. }
  830. ))
  831. const ulElem = createProjectsList(subSections[subKey], key !== 'Foundation');
  832. subSectionElem.appendChild(ulElem);
  833. subSectionContainerElem.appendChild(subSectionElem);
  834. })
  835. sectionElem.appendChild(subSectionContainerElem);
  836. } else {
  837. const projects = sections[key];
  838. const ulElem = createProjectsList(projects, true);
  839. sectionElem.appendChild(ulElem);
  840. }
  841. menuContainer.appendChild(sectionElem)
  842. });
  843. }
  844. xhr.onerror = function() {
  845. console.error("Unable to load projects");
  846. };
  847. xhr.send();
  848. </script>
  849. <script>
  850. const versioningConfig = {
  851. githubUser: 'Farama-Foundation',
  852. githubRepo: 'Minigrid',
  853. };
  854. fetch('/main/_static/versioning/versioning_menu.html').then(response => {
  855. if (response.status === 200) {
  856. response.text().then(text => {
  857. const container = document.createElement("div");
  858. container.innerHTML = text;
  859. document.querySelector("body").appendChild(container);
  860. // innerHtml doenst evaluate scripts, we need to add them dynamically
  861. Array.from(container.querySelectorAll("script")).forEach(oldScript => {
  862. const newScript = document.createElement("script");
  863. Array.from(oldScript.attributes).forEach(attr => newScript.setAttribute(attr.name, attr.value));
  864. newScript.appendChild(document.createTextNode(oldScript.innerHTML));
  865. oldScript.parentNode.replaceChild(newScript, oldScript);
  866. });
  867. });
  868. } else {
  869. console.warn("Unable to load versioning menu", response);
  870. }
  871. });
  872. </script>
  873. </body>
  874. </html>