2022-09-13 19:29:14 +00:00
<!doctype html>
< html class = "no-js" lang = "en" >
< head > < meta charset = "utf-8" / >
< meta name = "viewport" content = "width=device-width,initial-scale=1" / >
2022-10-15 15:13:56 +00:00
< meta name = "color-scheme" content = "light dark" >
2022-10-16 13:56:17 +00:00
< meta name = "description" content = "A standard API for reinforcement learning and a diverse set of reference environments (formerly Gym)" >
2022-10-15 15:13:56 +00:00
< meta property = "og:title" content = "Gymnasium Documentation" / >
< meta property = "og:type" content = "website" / >
2022-10-16 13:56:17 +00:00
< meta property = "og:description" content = "A standard API for reinforcement learning and a diverse set of reference environments (formerly Gym)" / >
< meta property = "og:url" content = "https://gymnasium.farama.org/genindex.html" / > < meta property = "og:image" content = "https://gymnasium.farama.org/_static/img/gymnasium-github.png" / > < meta name = "twitter:card" content = "summary_large_image" > < link rel = "index" title = "Index" href = "#" / > < link rel = "search" title = "Search" href = "../search/" / >
2022-09-13 19:29:14 +00:00
< link rel = "canonical" href = "https://gymnasium.farama.org/genindex.html" / >
2022-10-16 13:56:17 +00:00
< link rel = "shortcut icon" href = "../_static/favicon.png" / > < meta name = "generator" content = "sphinx-5.3.0, furo 2022.09.15.dev1" / > < title > Index - Gymnasium Documentation< / title >
2022-09-13 19:29:14 +00:00
< link rel = "stylesheet" type = "text/css" href = "../_static/pygments.css" / >
2022-09-16 13:02:04 +00:00
< link rel = "stylesheet" type = "text/css" href = "../_static/styles/furo.css?digest=9ec31e2665bf879c1d47d93a8ec4893870ee1e45" / >
2022-10-19 14:22:38 +00:00
< link rel = "stylesheet" type = "text/css" href = "../_static/styles/furo-extensions.css?digest=a614025deca43086db03c234d5a3a2047a0241ae" / >
2022-09-13 19:29:14 +00:00
< style >
body {
--color-code-background: #f8f8f8;
--color-code-foreground: black;
}
@media not print {
body[data-theme="dark"] {
--color-code-background: #202020;
--color-code-foreground: #d0d0d0;
}
@media (prefers-color-scheme: dark) {
body:not([data-theme="light"]) {
--color-code-background: #202020;
--color-code-foreground: #d0d0d0;
}
}
}
< / style > < / head >
< body >
2022-10-03 15:02:45 +00:00
< header class = "farama-header" >
< div class = "farama-header__container" >
< div class = "farama-header__left" >
2022-10-08 23:42:10 +00:00
< a href = "../" >
2022-10-03 15:02:45 +00:00
< img class = "farama-header__logo only-light" src = "../_static/img/gymnasium_black.svg" alt = "Light Logo" / >
< img class = "farama-header__logo only-dark" src = "../_static/img/gymnasium_white.svg" alt = "Dark Logo" / >
< h1 class = "farama-header__title" > Gymnasium Documentation< / h1 >
< / a >
< / div >
< div class = "farama-header__right" >
< div class = "farama-header-menu" >
< div class = "farama-header-menu__btn" >
< span class = "farama-header-menu__btn-name" >
2022-10-18 09:10:33 +00:00
Farama Foundation
2022-10-03 15:02:45 +00:00
< / span >
< svg viewBox = "0 0 32 32" xmlns = "http://www.w3.org/2000/svg" xmlns:bx = "https://boxy-svg.com" >
< defs > < / defs >
< path d = "M 3 4.677 C 3 3.751 3.659 3 4.474 3 L 27.526 3 C 28.341 3 29 3.751 29 4.677 C 29 5.603 28.341 6.354 27.526 6.354 L 4.474 6.354 C 3.659 6.354 3 5.603 3 4.677 Z" bx:origin = "0.622825 3.875593" > < / path >
< path d = "M 3 16 C 3 15.074 3.659 14.323 4.474 14.323 L 27.526 14.323 C 28.341 14.323 29 15.074 29 16 C 29 16.926 28.341 17.677 27.526 17.677 L 4.474 17.677 C 3.659 17.677 3 16.926 3 16 Z" bx:origin = "0.622825 0.5" > < / path >
< path d = "M 3 27.323 C 3 26.397 3.659 25.646 4.474 25.646 L 27.526 25.646 C 28.341 25.646 29 26.397 29 27.323 C 29 28.249 28.341 29 27.526 29 L 4.474 29 C 3.659 29 3 28.249 3 27.323 Z" bx:origin = "0.622825 -2.875591" > < / path >
< / svg >
< / div >
2022-10-15 15:13:56 +00:00
< div class = "farama-header-menu-container" >
< div class = "farama-header-menu__header" >
2022-10-05 17:10:20 +00:00
< a href = "https://farama.org" >
2022-10-18 09:10:33 +00:00
< img class = "farama-header-menu__logo" src = "../_static/img/farama_solid_white.svg" alt = "Farama Foundation" >
< span > Farama Foundation< / span >
2022-10-05 17:10:20 +00:00
< / a >
2022-10-03 15:02:45 +00:00
< button id = "farama-close-menu" >
< svg viewBox = "0 0 24 24" xmlns = "http://www.w3.org/2000/svg" fill = "none" stroke = "currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon-close">
< line x1 = "3" y1 = "21" x2 = "21" y2 = "3" > < / line >
< line x1 = "3" y1 = "3" x2 = "21" y2 = "21" > < / line >
< / svg >
< / button >
< / div >
2022-10-15 15:13:56 +00:00
< div class = "farama-header-menu__body" >
< div class = "farama-header-menu__section" style = "padding-left: 24px;" >
< span class = "farama-header-menu__section-title" > Documentation< / span >
< ul class = "farama-header-menu-list" >
< li >
< a href = "https://gymnasium.farama.org" >
2022-10-16 13:56:17 +00:00
< img src = "../_static/img/gymnasium-white.svg" >
2022-10-15 15:13:56 +00:00
Gymnasium
< / a >
< / li >
< li >
< a href = "https://pettingzoo.farama.org" >
2022-10-16 13:56:17 +00:00
< img src = "../_static/img/pettingzoo-white.svg" >
2022-10-15 15:13:56 +00:00
PettingZoo
< / a >
< / li >
< li >
< a href = "https://minigrid.farama.org" >
2022-10-16 13:56:17 +00:00
< img src = "../_static/img/minigrid-white.svg" >
2022-10-15 15:13:56 +00:00
MiniGrid
< / a >
< / li >
2022-10-21 15:39:00 +00:00
< li >
< a href = "https://robotics.farama.org" >
< img src = "../_static/img/gymrobotics-white.svg" >
Gymnasium-Robotics
< / a >
< / li >
2022-10-15 15:13:56 +00:00
< / ul >
< / div >
< div class = "farama-header-menu__section" style = "padding-left: 24px;" >
< span class = "farama-header-menu__section-title" > Mature Projects< / span >
< ul class = "farama-header-menu-list" >
< li >
< a href = "https://github.com/Farama-Foundation/SuperSuit" >
2022-10-16 13:56:17 +00:00
< img src = "../_static/img/supersuit-white.svg" >
2022-10-15 15:13:56 +00:00
SuperSuit
< / a >
< / li >
< li >
< a href = "https://github.com/Farama-Foundation/tinyscaler" >
2022-10-16 13:56:17 +00:00
< img src = "../_static/img/tinyscaler-white.svg" >
2022-10-15 15:13:56 +00:00
Tinyscaler
< / a >
< / li >
< li >
< a href = "https://github.com/Farama-Foundation/AutoROM" >
2022-10-16 13:56:17 +00:00
< img src = "../_static/img/autorom-white.svg" >
2022-10-15 15:13:56 +00:00
AutoROM
< / a >
< / li >
< li >
< a href = "https://github.com/Farama-Foundation/Jumpy" >
2022-10-16 13:56:17 +00:00
< img src = "../_static/img/jumpy-white.svg" >
2022-10-15 15:13:56 +00:00
JumPy
< / a >
< / li >
< / ul >
< / div >
< div class = "farama-header-menu__section" style = "padding-left: 24px;" >
< span class = "farama-header-menu__section-title" > Incubating Projects< / span >
< ul class = "farama-header-menu-list" >
< li >
< a href = "https://github.com/Farama-Foundation/MAgent2" >
2022-10-16 13:56:17 +00:00
< img src = "../_static/img/MAgent2-white.svg" >
2022-10-15 15:13:56 +00:00
MAgent2
< / a >
< / li >
< li >
< a href = "https://github.com/Farama-Foundation/procgen2" >
2022-10-16 13:56:17 +00:00
< img src = "../_static/img/procgen2-white.svg" >
2022-10-15 15:13:56 +00:00
Procgen2
< / a >
< / li >
< li >
< a href = "https://github.com/Farama-Foundation/MiniWorld" >
2022-10-16 13:56:17 +00:00
< img src = "../_static/img/miniworld-white.svg" >
2022-10-15 15:13:56 +00:00
Miniworld
< / a >
< / li >
< li >
< a href = "https://github.com/Farama-Foundation/D4RL" >
2022-10-16 13:56:17 +00:00
< img src = "../_static/img/d4rl-white.svg" >
2022-10-15 15:13:56 +00:00
D4RL
< / a >
< / li >
< li >
< a href = "https://github.com/Farama-Foundation/Kabuki" >
2022-10-16 13:56:17 +00:00
< img src = "../_static/img/kabuki-white.svg" >
2022-10-15 15:13:56 +00:00
Kabuki
< / a >
< / li >
< / ul >
< / div >
< div class = "farama-header-menu__section" style = "padding-left: 24px;" >
< span class = "farama-header-menu__section-title" > Foundation< / span >
< ul class = "farama-header-menu-list" >
< li >
< a href = "https://farama.org/about" >
About
< / a >
< / li >
< li >
< a href = "https://farama.org/project_standards" >
Standards
< / a >
< / li >
< li >
< a href = "https://farama.org/donations" >
2022-10-16 13:56:17 +00:00
Donate
2022-10-15 15:13:56 +00:00
< / a >
< / li >
< / ul >
< / div >
2022-10-03 15:02:45 +00:00
< / div >
< / div >
< / div >
< / div >
< / div >
< / header >
< div class = "farama-header-menu__overlay" > < / div >
2022-09-13 19:29:14 +00:00
< script >
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
< / script >
< svg xmlns = "http://www.w3.org/2000/svg" style = "display: none;" >
< symbol id = "svg-toc" viewBox = "0 0 24 24" >
< title > Contents< / title >
< svg stroke = "currentColor" fill = "currentColor" stroke-width = "0" viewBox = "0 0 1024 1024" >
< 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" / >
< / svg >
< / symbol >
< symbol id = "svg-menu" viewBox = "0 0 24 24" >
< title > Menu< / title >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
< line x1 = "3" y1 = "12" x2 = "21" y2 = "12" > < / line >
< line x1 = "3" y1 = "6" x2 = "21" y2 = "6" > < / line >
< line x1 = "3" y1 = "18" x2 = "21" y2 = "18" > < / line >
< / svg >
< / symbol >
< symbol id = "svg-arrow-right" viewBox = "0 0 24 24" >
< title > Expand< / title >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
< polyline points = "9 18 15 12 9 6" > < / polyline >
< / svg >
< / symbol >
< symbol id = "svg-sun" viewBox = "0 0 24 24" >
< title > Light mode< / title >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor"
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
< circle cx = "12" cy = "12" r = "5" > < / circle >
< line x1 = "12" y1 = "1" x2 = "12" y2 = "3" > < / line >
< line x1 = "12" y1 = "21" x2 = "12" y2 = "23" > < / line >
< line x1 = "4.22" y1 = "4.22" x2 = "5.64" y2 = "5.64" > < / line >
< line x1 = "18.36" y1 = "18.36" x2 = "19.78" y2 = "19.78" > < / line >
< line x1 = "1" y1 = "12" x2 = "3" y2 = "12" > < / line >
< line x1 = "21" y1 = "12" x2 = "23" y2 = "12" > < / line >
< line x1 = "4.22" y1 = "19.78" x2 = "5.64" y2 = "18.36" > < / line >
< line x1 = "18.36" y1 = "5.64" x2 = "19.78" y2 = "4.22" > < / line >
< / svg >
< / symbol >
< symbol id = "svg-moon" viewBox = "0 0 24 24" >
< title > Dark mode< / title >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor"
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
< path stroke = "none" d = "M0 0h24v24H0z" fill = "none" / >
< 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" / >
< / svg >
< / symbol >
< symbol id = "svg-sun-half" viewBox = "0 0 24 24" >
< title > Auto light/dark mode< / title >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor"
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-shadow">
< path stroke = "none" d = "M0 0h24v24H0z" fill = "none" / >
< circle cx = "12" cy = "12" r = "9" / >
< path d = "M13 12h5" / >
< path d = "M13 15h4" / >
< path d = "M13 18h1" / >
< path d = "M13 9h4" / >
< path d = "M13 6h1" / >
< / svg >
< / symbol >
< / svg >
< input type = "checkbox" class = "sidebar-toggle" name = "__navigation" id = "__navigation" >
< input type = "checkbox" class = "sidebar-toggle" name = "__toc" id = "__toc" >
< label class = "overlay sidebar-overlay" for = "__navigation" >
< div class = "visually-hidden" > Hide navigation sidebar< / div >
< / label >
< label class = "overlay toc-overlay" for = "__toc" >
< div class = "visually-hidden" > Hide table of contents sidebar< / div >
< / label >
< div class = "page" >
< header class = "mobile-header" >
< div class = "header-left" >
< label class = "nav-overlay-icon" for = "__navigation" >
< div class = "visually-hidden" > Toggle site navigation sidebar< / div >
< i class = "icon" > < svg > < use href = "#svg-menu" > < / use > < / svg > < / i >
< / label >
< / div >
< div class = "header-center" >
< a href = "../" > < div class = "brand" > Gymnasium Documentation< / div > < / a >
< / div >
< div class = "header-right" >
< div class = "theme-toggle-container theme-toggle-header" >
< button class = "theme-toggle" >
< div class = "visually-hidden" > Toggle Light / Dark / Auto color theme< / div >
< svg class = "theme-icon-when-auto" > < use href = "#svg-sun-half" > < / use > < / svg >
< svg class = "theme-icon-when-dark" > < use href = "#svg-moon" > < / use > < / svg >
< svg class = "theme-icon-when-light" > < use href = "#svg-sun" > < / use > < / svg >
< / button >
< / div >
< label class = "toc-overlay-icon toc-header-icon no-toc" for = "__toc" >
< div class = "visually-hidden" > Toggle table of contents sidebar< / div >
< i class = "icon" > < svg > < use href = "#svg-toc" > < / use > < / svg > < / i >
< / label >
< / div >
< / header >
< aside class = "sidebar-drawer" >
< div class = "sidebar-container" >
2022-10-03 15:02:45 +00:00
< div class = "sidebar-sticky" > < form class = "sidebar-search-container" method = "get" action = "../search/" role = "search" >
2022-09-13 19:29:14 +00:00
< input class = "sidebar-search" placeholder = Search name = "q" aria-label = "Search" >
< input type = "hidden" name = "check_keywords" value = "yes" >
< input type = "hidden" name = "area" value = "default" >
< / form >
< div id = "searchbox" > < / div > < div class = "sidebar-scroll" > < div class = "sidebar-tree" >
< p class = "caption" role = "heading" > < span class = "caption-text" > Introduction< / span > < / p >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../content/basic_usage/" > Basic Usage< / a > < / li >
2022-10-12 15:02:33 +00:00
< li class = "toctree-l1" > < a class = "reference internal" href = "../content/gym_compatibility/" > Compatibility with Gym< / a > < / li >
2022-10-24 21:46:22 +00:00
< li class = "toctree-l1" > < a class = "reference internal" href = "../content/migration-guide/" > v21 to v26 Migration Guide< / a > < / li >
2022-09-13 19:29:14 +00:00
< / ul >
< p class = "caption" role = "heading" > < span class = "caption-text" > API< / span > < / p >
< ul >
2022-10-12 15:02:09 +00:00
< li class = "toctree-l1" > < a class = "reference internal" href = "../api/env/" > Env< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "../api/registry/" > Registry< / a > < / li >
2022-09-16 13:02:04 +00:00
< li class = "toctree-l1 has-children" > < a class = "reference internal" href = "../api/spaces/" > Spaces< / 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 child pages in navigation< / div > < i class = "icon" > < svg > < use href = "#svg-arrow-right" > < / use > < / svg > < / i > < / label > < ul >
< li class = "toctree-l2" > < a class = "reference internal" href = "../api/spaces/fundamental/" > Fundamental Spaces< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../api/spaces/composite/" > Composite Spaces< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../api/spaces/utils/" > Spaces Utils< / a > < / li >
2022-10-12 15:02:09 +00:00
< li class = "toctree-l2" > < a class = "reference internal" href = "../api/spaces/vector_utils/" > Spaces Vector Utils< / a > < / li >
< / ul >
< / li >
< li class = "toctree-l1 has-children" > < a class = "reference internal" href = "../api/wrappers/" > Wrappers< / 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 child pages in navigation< / div > < i class = "icon" > < svg > < use href = "#svg-arrow-right" > < / use > < / svg > < / i > < / label > < ul >
< li class = "toctree-l2" > < a class = "reference internal" href = "../api/wrappers/misc_wrappers/" > Misc Wrappers< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../api/wrappers/action_wrappers/" > Action Wrappers< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../api/wrappers/observation_wrappers/" > Observation Wrappers< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../api/wrappers/reward_wrappers/" > Reward Wrappers< / a > < / li >
2022-09-16 13:02:04 +00:00
< / ul >
< / li >
2022-09-13 19:29:14 +00:00
< li class = "toctree-l1" > < a class = "reference internal" href = "../api/vector/" > Vector< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "../api/utils/" > Utils< / a > < / li >
< / ul >
< p class = "caption" role = "heading" > < span class = "caption-text" > Environments< / span > < / p >
< ul >
2022-10-25 11:10:26 +00:00
< li class = "toctree-l1 has-children" > < a class = "reference internal" href = "../environments/classic_control/" > Classic Control< / 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 child pages in navigation< / div > < i class = "icon" > < svg > < use href = "#svg-arrow-right" > < / use > < / svg > < / i > < / label > < ul class = "simple" >
2022-10-12 15:02:09 +00:00
< / ul >
< / li >
2022-10-25 11:10:26 +00:00
< li class = "toctree-l1 has-children" > < a class = "reference internal" href = "../environments/box2d/" > Box2D< / a > < input class = "toctree-checkbox" id = "toctree-checkbox-4" name = "toctree-checkbox-4" role = "switch" type = "checkbox" / > < label for = "toctree-checkbox-4" > < div class = "visually-hidden" > Toggle child pages in navigation< / div > < i class = "icon" > < svg > < use href = "#svg-arrow-right" > < / use > < / svg > < / i > < / label > < ul class = "simple" >
2022-10-12 15:02:09 +00:00
< / ul >
< / li >
2022-10-25 11:10:26 +00:00
< li class = "toctree-l1 has-children" > < a class = "reference internal" href = "../environments/toy_text/" > Toy Text< / a > < input class = "toctree-checkbox" id = "toctree-checkbox-5" name = "toctree-checkbox-5" role = "switch" type = "checkbox" / > < label for = "toctree-checkbox-5" > < div class = "visually-hidden" > Toggle child pages in navigation< / div > < i class = "icon" > < svg > < use href = "#svg-arrow-right" > < / use > < / svg > < / i > < / label > < ul class = "simple" >
2022-10-12 15:02:09 +00:00
< / ul >
< / li >
2022-10-25 11:10:26 +00:00
< li class = "toctree-l1 has-children" > < a class = "reference internal" href = "../environments/mujoco/" > MuJoCo< / a > < input class = "toctree-checkbox" id = "toctree-checkbox-6" name = "toctree-checkbox-6" role = "switch" type = "checkbox" / > < label for = "toctree-checkbox-6" > < div class = "visually-hidden" > Toggle child pages in navigation< / div > < i class = "icon" > < svg > < use href = "#svg-arrow-right" > < / use > < / svg > < / i > < / label > < ul class = "simple" >
2022-10-12 15:02:09 +00:00
< / ul >
< / li >
< li class = "toctree-l1 has-children" > < a class = "reference internal" href = "../environments/atari/" > Atari< / a > < input class = "toctree-checkbox" id = "toctree-checkbox-7" name = "toctree-checkbox-7" role = "switch" type = "checkbox" / > < label for = "toctree-checkbox-7" > < div class = "visually-hidden" > Toggle child pages in navigation< / div > < i class = "icon" > < svg > < use href = "#svg-arrow-right" > < / use > < / svg > < / i > < / label > < ul >
2022-09-13 19:29:14 +00:00
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/adventure/" > Adventure< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/air_raid/" > Air Raid< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/alien/" > Alien< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/amidar/" > Amidar< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/assault/" > Assault< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/asterix/" > Asterix< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/asteroids/" > Asteroids< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/atlantis/" > Atlantis< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/bank_heist/" > Bank Heist< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/battle_zone/" > Battle Zone< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/beam_rider/" > Beam Rider< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/berzerk/" > Berzerk< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/bowling/" > Bowling< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/boxing/" > Boxing< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/breakout/" > Breakout< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/carnival/" > Carnival< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/centipede/" > Centipede< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/chopper_command/" > Chopper Command< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/crazy_climber/" > Crazy Climber< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/defender/" > Defender< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/demon_attack/" > Demon Attack< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/double_dunk/" > Double Dunk< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/elevator_action/" > Elevator Action< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/enduro/" > Enduro< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/fishing_derby/" > FishingDerby< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/freeway/" > Freeway< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/frostbite/" > Frostbite< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/gopher/" > Gopher< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/gravitar/" > Gravitar< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/hero/" > Hero< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/ice_hockey/" > IceHockey< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/jamesbond/" > Jamesbond< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/journey_escape/" > JourneyEscape< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/kangaroo/" > Kangaroo< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/krull/" > Krull< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/kung_fu_master/" > Kung Fu Master< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/montezuma_revenge/" > Montezuma Revenge< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/ms_pacman/" > Ms Pacman< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/name_this_game/" > Name This Game< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/phoenix/" > Phoenix< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/pitfall/" > Pitfall< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/pong/" > Pong< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/pooyan/" > Pooyan< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/private_eye/" > PrivateEye< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/qbert/" > Qbert< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/riverraid/" > Riverraid< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/road_runner/" > Road Runner< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/robotank/" > Robot Tank< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/seaquest/" > Seaquest< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/skiing/" > Skiings< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/solaris/" > Solaris< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/space_invaders/" > SpaceInvaders< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/star_gunner/" > StarGunner< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/tennis/" > Tennis< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/time_pilot/" > TimePilot< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/tutankham/" > Tutankham< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/up_n_down/" > Up n’ Down< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/venture/" > Venture< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/video_pinball/" > Video Pinball< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/wizard_of_wor/" > Wizard of Wor< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../environments/atari/zaxxon/" > Zaxxon< / a > < / li >
< / ul >
< / li >
2022-10-10 15:25:54 +00:00
< li class = "toctree-l1" > < a class = "reference internal" href = "../environments/third_party_environments/" > Third-Party Environments< / a > < / li >
2022-09-13 19:29:14 +00:00
< / ul >
< p class = "caption" role = "heading" > < span class = "caption-text" > Tutorials< / span > < / p >
< ul >
2022-10-23 10:45:24 +00:00
< li class = "toctree-l1" > < a class = "reference internal" href = "../tutorials/blackjack_tutorial/" > Solving Blackjack with Q-Learning< / a > < / li >
2022-10-21 15:39:00 +00:00
< li class = "toctree-l1" > < a class = "reference internal" href = "../tutorials/environment_creation/" > Make your own custom environment< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "../tutorials/handling_time_limits/" > Handling Time Limits< / a > < / li >
2022-09-13 19:29:14 +00:00
< / ul >
< p class = "caption" role = "heading" > < span class = "caption-text" > Development< / span > < / p >
< ul >
2022-09-16 13:02:04 +00:00
< li class = "toctree-l1" > < a class = "reference external" href = "https://github.com/Farama-Foundation/Gymnasium" > Github< / a > < / li >
2022-10-25 11:10:26 +00:00
< li class = "toctree-l1" > < a class = "reference external" href = "https://github.com/Farama-Foundation/Gymnasium/blob/main/docs/README.md" > Contribute to the Docs< / a > < / li >
2022-09-13 19:29:14 +00:00
< / ul >
< / div >
< / div >
< / div >
< / div >
< / aside >
< div class = "main" >
< div class = "content" >
< div class = "article-container" >
< a href = "#" class = "back-to-top muted-link" >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" >
< path d = "M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z" > < / path >
< / svg >
< span > Back to top< / span >
< / a >
< div class = "content-icon-container" >
< div class = "theme-toggle-container theme-toggle-content" >
< button class = "theme-toggle" >
< div class = "visually-hidden" > Toggle Light / Dark / Auto color theme< / div >
< svg class = "theme-icon-when-auto" > < use href = "#svg-sun-half" > < / use > < / svg >
< svg class = "theme-icon-when-dark" > < use href = "#svg-moon" > < / use > < / svg >
< svg class = "theme-icon-when-light" > < use href = "#svg-sun" > < / use > < / svg >
< / button >
< / div >
< label class = "toc-overlay-icon toc-content-icon no-toc" for = "__toc" >
< div class = "visually-hidden" > Toggle table of contents sidebar< / div >
< i class = "icon" > < svg > < use href = "#svg-toc" > < / use > < / svg > < / i >
< / label >
< / div >
< article role = "main" >
2022-10-03 15:02:45 +00:00
2022-09-13 19:29:14 +00:00
< section class = "genindex-section" >
< h1 id = "index" > Index< / h1 >
2022-10-12 15:02:09 +00:00
< div class = "genindex-jumpbox" > < a href = "#A" > < strong > A< / strong > < / a > | < a href = "#B" > < strong > B< / strong > < / a > | < a href = "#C" > < strong > C< / strong > < / a > | < a href = "#D" > < strong > D< / strong > < / a > | < a href = "#E" > < strong > E< / strong > < / a > | < a href = "#F" > < strong > F< / strong > < / a > | < a href = "#G" > < strong > G< / strong > < / a > | < a href = "#H" > < strong > H< / strong > < / a > | < a href = "#I" > < strong > I< / strong > < / a > | < a href = "#M" > < strong > M< / strong > < / a > | < a href = "#N" > < strong > N< / strong > < / a > | < a href = "#O" > < strong > O< / strong > < / a > | < a href = "#P" > < strong > P< / strong > < / a > | < a href = "#R" > < strong > R< / strong > < / a > | < a href = "#S" > < strong > S< / strong > < / a > | < a href = "#T" > < strong > T< / strong > < / a > | < a href = "#U" > < strong > U< / strong > < / a > | < a href = "#V" > < strong > V< / strong > < / a > | < a href = "#W" > < strong > W< / strong > < / a > < / div >
2022-09-13 19:29:14 +00:00
< / section >
< section id = "A" class = "genindex-section" >
< h2 > A< / h2 >
< table style = "width: 100%" class = "indextable genindextable" > < tr >
< td style = "width: 33%; vertical-align: top;" > < ul >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/vector/#action_space" > action_space< / a >
2022-09-13 19:29:14 +00:00
< ul >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/env/#gymnasium.Env.action_space" > (gymnasium.Env attribute)< / a >
< / li >
< li > < a href = "../api/wrappers/#gymnasium.Wrapper.action_space" > (gymnasium.Wrapper property)< / a >
2022-09-13 19:29:14 +00:00
< / li >
< / ul > < / li >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/wrappers/action_wrappers/#gymnasium.ActionWrapper" > ActionWrapper (class in gymnasium)< / a >
< / li >
2022-09-13 19:29:14 +00:00
< / ul > < / td >
< td style = "width: 33%; vertical-align: top;" > < ul >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/wrappers/action_wrappers/#gymnasium.ActionWrapper.ActionWrapper.action" > ActionWrapper.action() (in module gymnasium.ActionWrapper)< / a >
< / li >
< li > < a href = "../api/vector/#gymnasium.vector.AsyncVectorEnv" > AsyncVectorEnv (class in gymnasium.vector)< / a >
< / li >
< li > < a href = "../api/wrappers/misc_wrappers/#gymnasium.wrappers.AtariPreprocessing" > AtariPreprocessing (class in gymnasium.wrappers)< / a >
< / li >
< li > < a href = "../api/wrappers/misc_wrappers/#gymnasium.wrappers.AutoResetWrapper" > AutoResetWrapper (class in gymnasium.wrappers)< / a >
2022-09-13 19:29:14 +00:00
< / li >
< / ul > < / td >
< / tr > < / table >
< / section >
< section id = "B" class = "genindex-section" >
< h2 > B< / h2 >
< table style = "width: 100%" class = "indextable genindextable" > < tr >
2022-10-12 15:02:09 +00:00
< td style = "width: 33%; vertical-align: top;" > < ul >
< li > < a href = "../api/spaces/vector_utils/#gymnasium.vector.utils.batch_space" > batch_space() (in module gymnasium.vector.utils)< / a >
< / li >
< / ul > < / td >
2022-09-13 19:29:14 +00:00
< td style = "width: 33%; vertical-align: top;" > < ul >
2022-09-16 13:02:04 +00:00
< li > < a href = "../api/spaces/fundamental/#gymnasium.spaces.Box" > Box (class in gymnasium.spaces)< / a >
2022-09-13 19:29:14 +00:00
< / li >
< / ul > < / td >
< / tr > < / table >
< / section >
< section id = "C" class = "genindex-section" >
< h2 > C< / h2 >
< table style = "width: 100%" class = "indextable genindextable" > < tr >
< td style = "width: 33%; vertical-align: top;" > < ul >
< li > < a href = "../api/utils/#gymnasium.utils.play.PlayPlot.callback" > callback() (gymnasium.utils.play.PlayPlot method)< / a >
< / li >
< li > < a href = "../api/utils/#gymnasium.utils.save_video.capped_cubic_video_schedule" > capped_cubic_video_schedule() (in module gymnasium.utils.save_video)< / a >
< / li >
< li > < a href = "../api/utils/#gymnasium.utils.env_checker.check_env" > check_env() (in module gymnasium.utils.env_checker)< / a >
< / li >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/wrappers/action_wrappers/#gymnasium.wrappers.ClipAction" > ClipAction (class in gymnasium.wrappers)< / a >
2022-09-13 19:29:14 +00:00
< / li >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/vector/#gymnasium.vector.VectorEnv.close" > close() (gymnasium.vector.VectorEnv method)< / a >
< ul >
< li > < a href = "../api/env/#gymnasium.Env.close" > (in module gymnasium.Env)< / a >
2022-09-13 19:29:14 +00:00
< / li >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/wrappers/#gymnasium.Wrapper.close" > (in module gymnasium.Wrapper)< / a >
2022-09-13 19:29:14 +00:00
< / li >
2022-10-12 15:02:09 +00:00
< / ul > < / li >
2022-09-13 19:29:14 +00:00
< / ul > < / td >
< td style = "width: 33%; vertical-align: top;" > < ul >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/spaces/vector_utils/#gymnasium.vector.utils.concatenate" > concatenate() (in module gymnasium.vector.utils)< / a >
2022-09-13 19:29:14 +00:00
< / li >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/spaces/#gymnasium.spaces.space.Space.contains" > contains() (in module gymnasium.spaces.space.Space)< / a >
2022-09-13 19:29:14 +00:00
< / li >
< li > < a href = "../api/utils/#gymnasium.utils.step_api_compatibility.convert_to_done_step_api" > convert_to_done_step_api() (in module gymnasium.utils.step_api_compatibility)< / a >
< / li >
< li > < a href = "../api/utils/#gymnasium.utils.step_api_compatibility.convert_to_terminated_truncated_step_api" > convert_to_terminated_truncated_step_api() (in module gymnasium.utils.step_api_compatibility)< / a >
2022-10-12 15:02:09 +00:00
< / li >
< li > < a href = "../api/spaces/vector_utils/#gymnasium.vector.utils.create_empty_array" > create_empty_array() (in module gymnasium.vector.utils)< / a >
< / li >
< li > < a href = "../api/spaces/vector_utils/#gymnasium.vector.utils.create_shared_memory" > create_shared_memory() (in module gymnasium.vector.utils)< / a >
2022-09-13 19:29:14 +00:00
< / li >
< / ul > < / td >
< / tr > < / table >
< / section >
< section id = "D" class = "genindex-section" >
< h2 > D< / h2 >
< table style = "width: 100%" class = "indextable genindextable" > < tr >
< td style = "width: 33%; vertical-align: top;" > < ul >
2022-09-16 13:02:04 +00:00
< li > < a href = "../api/spaces/composite/#gymnasium.spaces.Dict" > Dict (class in gymnasium.spaces)< / a >
2022-09-13 19:29:14 +00:00
< / li >
< / ul > < / td >
< td style = "width: 33%; vertical-align: top;" > < ul >
2022-09-16 13:02:04 +00:00
< li > < a href = "../api/spaces/fundamental/#gymnasium.spaces.Discrete" > Discrete (class in gymnasium.spaces)< / a >
2022-09-13 19:29:14 +00:00
< / li >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/spaces/#Space.dtype" > dtype (Space property)< / a >
2022-09-13 19:29:14 +00:00
< / li >
2022-10-12 15:02:09 +00:00
< / ul > < / td >
< / tr > < / table >
< / section >
< section id = "E" class = "genindex-section" >
< h2 > E< / h2 >
< table style = "width: 100%" class = "indextable genindextable" > < tr >
< td style = "width: 33%; vertical-align: top;" > < ul >
< li > < a href = "../api/env/#gymnasium.Env" > Env (class in gymnasium)< / a >
< / li >
< / ul > < / td >
< td style = "width: 33%; vertical-align: top;" > < ul >
< li > < a href = "../api/wrappers/misc_wrappers/#gymnasium.wrappers.EnvCompatibility" > EnvCompatibility (class in gymnasium.wrappers)< / a >
2022-09-13 19:29:14 +00:00
< / li >
< / ul > < / td >
< / tr > < / table >
< / section >
< section id = "F" class = "genindex-section" >
< h2 > F< / h2 >
< table style = "width: 100%" class = "indextable genindextable" > < tr >
< td style = "width: 33%; vertical-align: top;" > < ul >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/wrappers/observation_wrappers/#gymnasium.wrappers.FilterObservation" > FilterObservation (class in gymnasium.wrappers)< / a >
< / li >
2022-09-16 13:02:04 +00:00
< li > < a href = "../api/spaces/utils/#gymnasium.spaces.utils.flatdim" > flatdim() (in module gymnasium.spaces.utils)< / a >
2022-09-13 19:29:14 +00:00
< / li >
2022-09-16 13:02:04 +00:00
< li > < a href = "../api/spaces/utils/#gymnasium.spaces.utils.flatten" > flatten() (in module gymnasium.spaces.utils)< / a >
2022-09-13 19:29:14 +00:00
< / li >
< / ul > < / td >
< td style = "width: 33%; vertical-align: top;" > < ul >
2022-09-16 13:02:04 +00:00
< li > < a href = "../api/spaces/utils/#gymnasium.spaces.utils.flatten_space" > flatten_space() (in module gymnasium.spaces.utils)< / a >
2022-09-13 19:29:14 +00:00
< / li >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/wrappers/observation_wrappers/#gymnasium.wrappers.FlattenObservation" > FlattenObservation (class in gymnasium.wrappers)< / a >
< / li >
< li > < a href = "../api/wrappers/observation_wrappers/#gymnasium.wrappers.FrameStack" > FrameStack (class in gymnasium.wrappers)< / a >
< / li >
< li > < a href = "../api/spaces/#gymnasium.spaces.space.Space.from_jsonable" > from_jsonable() (in module gymnasium.spaces.space.Space)< / a >
2022-09-13 19:29:14 +00:00
< / li >
< / ul > < / td >
< / tr > < / table >
< / section >
< section id = "G" class = "genindex-section" >
< h2 > G< / h2 >
< table style = "width: 100%" class = "indextable genindextable" > < tr >
< td style = "width: 33%; vertical-align: top;" > < ul >
2022-09-16 13:02:04 +00:00
< li > < a href = "../api/spaces/composite/#gymnasium.spaces.Graph" > Graph (class in gymnasium.spaces)< / a >
2022-10-12 15:02:09 +00:00
< / li >
< / ul > < / td >
< td style = "width: 33%; vertical-align: top;" > < ul >
< li > < a href = "../api/wrappers/observation_wrappers/#gymnasium.wrappers.GrayScaleObservation" > GrayScaleObservation (class in gymnasium.wrappers)< / a >
< / li >
< / ul > < / td >
< / tr > < / table >
< / section >
< section id = "H" class = "genindex-section" >
< h2 > H< / h2 >
< table style = "width: 100%" class = "indextable genindextable" > < tr >
< td style = "width: 33%; vertical-align: top;" > < ul >
< li > < a href = "../api/wrappers/misc_wrappers/#gymnasium.wrappers.HumanRendering" > HumanRendering (class in gymnasium.wrappers)< / a >
2022-09-13 19:29:14 +00:00
< / li >
< / ul > < / td >
< / tr > < / table >
< / section >
< section id = "I" class = "genindex-section" >
< h2 > I< / h2 >
< table style = "width: 100%" class = "indextable genindextable" > < tr >
< td style = "width: 33%; vertical-align: top;" > < ul >
2022-09-16 13:02:04 +00:00
< li > < a href = "../api/spaces/fundamental/#gymnasium.spaces.Box.is_bounded" > is_bounded() (gymnasium.spaces.Box method)< / a >
2022-10-12 15:02:09 +00:00
< / li >
< / ul > < / td >
< td style = "width: 33%; vertical-align: top;" > < ul >
< li > < a href = "../api/spaces/vector_utils/#gymnasium.vector.utils.iterate" > iterate() (in module gymnasium.vector.utils)< / a >
2022-09-13 19:29:14 +00:00
< / li >
< / ul > < / td >
< / tr > < / table >
< / section >
< section id = "M" class = "genindex-section" >
< h2 > M< / h2 >
< table style = "width: 100%" class = "indextable genindextable" > < tr >
< td style = "width: 33%; vertical-align: top;" > < ul >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/registry/#gymnasium.make" > make() (in module gymnasium)< / a >
< ul >
< li > < a href = "../api/vector/#gymnasium.vector.make" > (in module gymnasium.vector)< / a >
2022-09-13 19:29:14 +00:00
< / li >
2022-10-12 15:02:09 +00:00
< / ul > < / li >
< li > < a href = "../api/env/#gymnasium.Env.metadata" > metadata (gymnasium.Env attribute)< / a >
< ul >
< li > < a href = "../api/wrappers/#gymnasium.Wrapper.metadata" > (gymnasium.Wrapper property)< / a >
< / li >
< / ul > < / li >
2022-09-13 19:29:14 +00:00
< / ul > < / td >
< td style = "width: 33%; vertical-align: top;" > < ul >
2022-09-16 13:02:04 +00:00
< li > < a href = "../api/spaces/fundamental/#gymnasium.spaces.MultiBinary" > MultiBinary (class in gymnasium.spaces)< / a >
2022-09-13 19:29:14 +00:00
< / li >
2022-09-16 13:02:04 +00:00
< li > < a href = "../api/spaces/fundamental/#gymnasium.spaces.MultiDiscrete" > MultiDiscrete (class in gymnasium.spaces)< / a >
2022-09-13 19:29:14 +00:00
< / li >
< / ul > < / td >
< / tr > < / table >
< / section >
< section id = "N" class = "genindex-section" >
< h2 > N< / h2 >
< table style = "width: 100%" class = "indextable genindextable" > < tr >
< td style = "width: 33%; vertical-align: top;" > < ul >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/wrappers/observation_wrappers/#gymnasium.wrappers.NormalizeObservation" > NormalizeObservation (class in gymnasium.wrappers)< / a >
< / li >
< li > < a href = "../api/wrappers/reward_wrappers/#gymnasium.wrappers.NormalizeReward" > NormalizeReward (class in gymnasium.wrappers)< / a >
< / li >
< / ul > < / td >
< td style = "width: 33%; vertical-align: top;" > < ul >
< li > < a href = "../api/env/#gymnasium.Env.np_random" > np_random (gymnasium.Env property)< / a >
< ul >
< li > < a href = "../api/wrappers/#gymnasium.Wrapper.np_random" > (gymnasium.Wrapper property)< / a >
< / li >
< / ul > < / li >
2022-09-13 19:29:14 +00:00
< li > < a href = "../api/utils/#gymnasium.utils.seeding.np_random" > np_random() (in module gymnasium.utils.seeding)< / a >
< / li >
< / ul > < / td >
< / tr > < / table >
< / section >
< section id = "O" class = "genindex-section" >
< h2 > O< / h2 >
< table style = "width: 100%" class = "indextable genindextable" > < tr >
< td style = "width: 33%; vertical-align: top;" > < ul >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/wrappers/observation_wrappers/#gymnasium.ObservationWrapper.observation" > observation() (in module gymnasium.ObservationWrapper)< / a >
< / li >
< li > < a href = "../api/vector/#observation_space" > observation_space< / a >
2022-09-13 19:29:14 +00:00
< ul >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/env/#gymnasium.Env.observation_space" > (gymnasium.Env attribute)< / a >
< / li >
< li > < a href = "../api/wrappers/#gymnasium.Wrapper.observation_space" > (gymnasium.Wrapper property)< / a >
2022-09-13 19:29:14 +00:00
< / li >
< / ul > < / li >
< / ul > < / td >
< td style = "width: 33%; vertical-align: top;" > < ul >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/wrappers/observation_wrappers/#gymnasium.ObservationWrapper" > ObservationWrapper (class in gymnasium)< / a >
< / li >
< li > < a href = "../api/wrappers/misc_wrappers/#gymnasium.wrappers.OrderEnforcing" > OrderEnforcing (class in gymnasium.wrappers)< / a >
2022-09-13 19:29:14 +00:00
< / li >
< / ul > < / td >
< / tr > < / table >
< / section >
< section id = "P" class = "genindex-section" >
< h2 > P< / h2 >
< table style = "width: 100%" class = "indextable genindextable" > < tr >
< td style = "width: 33%; vertical-align: top;" > < ul >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/wrappers/misc_wrappers/#gymnasium.wrappers.PassiveEnvChecker" > PassiveEnvChecker (class in gymnasium.wrappers)< / a >
2022-09-13 19:29:14 +00:00
< / li >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/wrappers/observation_wrappers/#gymnasium.wrappers.PixelObservationWrapper" > PixelObservationWrapper (class in gymnasium.wrappers)< / a >
< / li >
< li > < a href = "../api/utils/#gymnasium.utils.play.play" > play() (in module gymnasium.utils.play)< / a >
2022-09-13 19:29:14 +00:00
< / li >
< / ul > < / td >
< td style = "width: 33%; vertical-align: top;" > < ul >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/utils/#gymnasium.utils.play.PlayableGame" > PlayableGame (class in gymnasium.utils.play)< / a >
< / li >
2022-09-13 19:29:14 +00:00
< li > < a href = "../api/utils/#gymnasium.utils.play.PlayPlot" > PlayPlot (class in gymnasium.utils.play)< / a >
< / li >
< li > < a href = "../api/utils/#gymnasium.utils.play.PlayableGame.process_event" > process_event() (gymnasium.utils.play.PlayableGame method)< / a >
< / li >
< / ul > < / td >
< / tr > < / table >
< / section >
< section id = "R" class = "genindex-section" >
< h2 > R< / h2 >
< table style = "width: 100%" class = "indextable genindextable" > < tr >
< td style = "width: 33%; vertical-align: top;" > < ul >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/spaces/vector_utils/#gymnasium.vector.utils.read_from_shared_memory" > read_from_shared_memory() (in module gymnasium.vector.utils)< / a >
2022-09-13 19:29:14 +00:00
< / li >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/wrappers/misc_wrappers/#gymnasium.wrappers.RecordEpisodeStatistics" > RecordEpisodeStatistics (class in gymnasium.wrappers)< / a >
< / li >
< li > < a href = "../api/wrappers/misc_wrappers/#gymnasium.wrappers.RecordVideo" > RecordVideo (class in gymnasium.wrappers)< / a >
< / li >
< li > < a href = "../api/registry/#gymnasium.register" > register() (in module gymnasium)< / a >
< / li >
< li > < a href = "../api/env/#gymnasium.Env.render" > render() (in module gymnasium.Env)< / a >
< / li >
< li > < a href = "../api/env/#gymnasium.Env.render_mode" > render_mode (gymnasium.Env attribute)< / a >
< / li >
< li > < a href = "../api/wrappers/misc_wrappers/#gymnasium.wrappers.RenderCollection" > RenderCollection (class in gymnasium.wrappers)< / a >
< / li >
< li > < a href = "../api/wrappers/action_wrappers/#gymnasium.wrappers.RescaleAction" > RescaleAction (class in gymnasium.wrappers)< / a >
< / li >
< / ul > < / td >
< td style = "width: 33%; vertical-align: top;" > < ul >
2022-09-13 19:29:14 +00:00
< li > < a href = "../api/vector/#gymnasium.vector.VectorEnv.reset" > reset() (gymnasium.vector.VectorEnv method)< / a >
< ul >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/env/#gymnasium.Env.reset" > (in module gymnasium.Env)< / a >
< / li >
< li > < a href = "../api/wrappers/#gymnasium.Wrapper.reset" > (in module gymnasium.Wrapper)< / a >
2022-09-13 19:29:14 +00:00
< / li >
< / ul > < / li >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/wrappers/observation_wrappers/#gymnasium.wrappers.ResizeObservation" > ResizeObservation (class in gymnasium.wrappers)< / a >
< / li >
< li > < a href = "../api/env/#gymnasium.Env.reward_range" > reward_range (gymnasium.Env attribute)< / a >
< ul >
< li > < a href = "../api/wrappers/#gymnasium.Wrapper.reward_range" > (gymnasium.Wrapper property)< / a >
< / li >
< / ul > < / li >
< li > < a href = "../api/wrappers/reward_wrappers/#gymnasium.RewardWrapper" > RewardWrapper (class in gymnasium)< / a >
2022-09-13 19:29:14 +00:00
< / li >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/wrappers/reward_wrappers/#gymnasium.RewardWrapper.RewardWrapper.reward" > RewardWrapper.reward() (in module gymnasium.RewardWrapper)< / a >
2022-09-13 19:29:14 +00:00
< / li >
< / ul > < / td >
< / tr > < / table >
< / section >
< section id = "S" class = "genindex-section" >
< h2 > S< / h2 >
< table style = "width: 100%" class = "indextable genindextable" > < tr >
< td style = "width: 33%; vertical-align: top;" > < ul >
2022-09-16 13:02:04 +00:00
< li > < a href = "../api/spaces/fundamental/#gymnasium.spaces.Box.sample" > sample() (gymnasium.spaces.Box method)< / a >
2022-09-13 19:29:14 +00:00
< ul >
2022-09-16 13:02:04 +00:00
< li > < a href = "../api/spaces/composite/#gymnasium.spaces.Dict.sample" > (gymnasium.spaces.Dict method)< / a >
2022-09-13 19:29:14 +00:00
< / li >
2022-09-16 13:02:04 +00:00
< li > < a href = "../api/spaces/fundamental/#gymnasium.spaces.Discrete.sample" > (gymnasium.spaces.Discrete method)< / a >
2022-09-13 19:29:14 +00:00
< / li >
2022-09-16 13:02:04 +00:00
< li > < a href = "../api/spaces/composite/#gymnasium.spaces.Graph.sample" > (gymnasium.spaces.Graph method)< / a >
2022-09-13 19:29:14 +00:00
< / li >
2022-09-16 13:02:04 +00:00
< li > < a href = "../api/spaces/fundamental/#gymnasium.spaces.MultiBinary.sample" > (gymnasium.spaces.MultiBinary method)< / a >
2022-09-13 19:29:14 +00:00
< / li >
2022-09-16 13:02:04 +00:00
< li > < a href = "../api/spaces/fundamental/#gymnasium.spaces.MultiDiscrete.sample" > (gymnasium.spaces.MultiDiscrete method)< / a >
2022-09-13 19:29:14 +00:00
< / li >
2022-09-16 13:02:04 +00:00
< li > < a href = "../api/spaces/composite/#gymnasium.spaces.Sequence.sample" > (gymnasium.spaces.Sequence method)< / a >
2022-09-13 19:29:14 +00:00
< / li >
2022-09-16 13:02:04 +00:00
< li > < a href = "../api/spaces/fundamental/#gymnasium.spaces.Text.sample" > (gymnasium.spaces.Text method)< / a >
2022-09-13 19:29:14 +00:00
< / li >
2022-09-16 13:02:04 +00:00
< li > < a href = "../api/spaces/composite/#gymnasium.spaces.Tuple.sample" > (gymnasium.spaces.Tuple method)< / a >
2022-09-13 19:29:14 +00:00
< / li >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/spaces/#gymnasium.spaces.space.Space.sample" > (in module gymnasium.spaces.space.Space)< / a >
2022-09-13 19:29:14 +00:00
< / li >
< / ul > < / li >
< li > < a href = "../api/utils/#gymnasium.utils.save_video.save_video" > save_video() (in module gymnasium.utils.save_video)< / a >
< / li >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/spaces/fundamental/#gymnasium.spaces.Box.seed" > seed() (gymnasium.spaces.Box method)< / a >
< ul >
< li > < a href = "../api/spaces/composite/#gymnasium.spaces.Dict.seed" > (gymnasium.spaces.Dict method)< / a >
2022-09-13 19:29:14 +00:00
< / li >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/spaces/fundamental/#gymnasium.spaces.Discrete.seed" > (gymnasium.spaces.Discrete method)< / a >
< / li >
< li > < a href = "../api/spaces/composite/#gymnasium.spaces.Graph.seed" > (gymnasium.spaces.Graph method)< / a >
< / li >
< li > < a href = "../api/spaces/fundamental/#gymnasium.spaces.MultiBinary.seed" > (gymnasium.spaces.MultiBinary method)< / a >
< / li >
< li > < a href = "../api/spaces/fundamental/#gymnasium.spaces.MultiDiscrete.seed" > (gymnasium.spaces.MultiDiscrete method)< / a >
< / li >
< li > < a href = "../api/spaces/composite/#gymnasium.spaces.Sequence.seed" > (gymnasium.spaces.Sequence method)< / a >
< / li >
< li > < a href = "../api/spaces/fundamental/#gymnasium.spaces.Text.seed" > (gymnasium.spaces.Text method)< / a >
< / li >
< li > < a href = "../api/spaces/composite/#gymnasium.spaces.Tuple.seed" > (gymnasium.spaces.Tuple method)< / a >
< / li >
< li > < a href = "../api/spaces/#gymnasium.spaces.space.Space.seed" > (in module gymnasium.spaces.space.Space)< / a >
< / li >
< / ul > < / li >
< / ul > < / td >
< td style = "width: 33%; vertical-align: top;" > < ul >
2022-09-16 13:02:04 +00:00
< li > < a href = "../api/spaces/composite/#gymnasium.spaces.Sequence" > Sequence (class in gymnasium.spaces)< / a >
2022-09-13 19:29:14 +00:00
< / li >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/spaces/#gymnasium.spaces.space.Space.shape" > shape (gymnasium.spaces.space.Space property)< / a >
2022-09-13 19:29:14 +00:00
< / li >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/vector/#single_action_space" > single_action_space< / a >
2022-09-13 19:29:14 +00:00
< / li >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/vector/#single_observation_space" > single_observation_space< / a >
2022-09-13 19:29:14 +00:00
< / li >
< li > < a href = "../api/spaces/#gymnasium.spaces.Space" > Space (class in gymnasium.spaces)< / a >
2022-10-12 15:02:09 +00:00
< / li >
< li > < a href = "../api/env/#gymnasium.Env.spec" > spec (gymnasium.Env attribute)< / a >
< ul >
< li > < a href = "../api/wrappers/#gymnasium.Wrapper.spec" > (gymnasium.Wrapper property)< / a >
< / li >
< / ul > < / li >
< li > < a href = "../api/registry/#gymnasium.spec" > spec() (in module gymnasium)< / a >
2022-09-13 19:29:14 +00:00
< / li >
< li > < a href = "../api/vector/#gymnasium.vector.VectorEnv.step" > step() (gymnasium.vector.VectorEnv method)< / a >
< ul >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/env/#gymnasium.Env.step" > (in module gymnasium.Env)< / a >
< / li >
< li > < a href = "../api/wrappers/#gymnasium.Wrapper.step" > (in module gymnasium.Wrapper)< / a >
2022-09-13 19:29:14 +00:00
< / li >
< / ul > < / li >
< li > < a href = "../api/utils/#gymnasium.utils.step_api_compatibility.step_api_compatibility" > step_api_compatibility() (in module gymnasium.utils.step_api_compatibility)< / a >
2022-10-12 15:02:09 +00:00
< / li >
< li > < a href = "../api/wrappers/misc_wrappers/#gymnasium.wrappers.StepAPICompatibility" > StepAPICompatibility (class in gymnasium.wrappers)< / a >
< / li >
< li > < a href = "../api/vector/#gymnasium.vector.SyncVectorEnv" > SyncVectorEnv (class in gymnasium.vector)< / a >
2022-09-13 19:29:14 +00:00
< / li >
< / ul > < / td >
< / tr > < / table >
< / section >
< section id = "T" class = "genindex-section" >
< h2 > T< / h2 >
< table style = "width: 100%" class = "indextable genindextable" > < tr >
< td style = "width: 33%; vertical-align: top;" > < ul >
2022-09-16 13:02:04 +00:00
< li > < a href = "../api/spaces/fundamental/#gymnasium.spaces.Text" > Text (class in gymnasium.spaces)< / a >
2022-10-12 15:02:09 +00:00
< / li >
< li > < a href = "../api/wrappers/observation_wrappers/#gymnasium.wrappers.TimeAwareObservation" > TimeAwareObservation (class in gymnasium.wrappers)< / a >
< / li >
< li > < a href = "../api/wrappers/misc_wrappers/#gymnasium.wrappers.TimeLimit" > TimeLimit (class in gymnasium.wrappers)< / a >
2022-09-13 19:29:14 +00:00
< / li >
< / ul > < / td >
< td style = "width: 33%; vertical-align: top;" > < ul >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/spaces/#gymnasium.spaces.space.Space.to_jsonable" > to_jsonable() (in module gymnasium.spaces.space.Space)< / a >
< / li >
< li > < a href = "../api/wrappers/observation_wrappers/#gymnasium.wrappers.TransformObservation" > TransformObservation (class in gymnasium.wrappers)< / a >
< / li >
< li > < a href = "../api/wrappers/reward_wrappers/#gymnasium.wrappers.TransformReward" > TransformReward (class in gymnasium.wrappers)< / a >
2022-09-13 19:29:14 +00:00
< / li >
2022-09-16 13:02:04 +00:00
< li > < a href = "../api/spaces/composite/#gymnasium.spaces.Tuple" > Tuple (class in gymnasium.spaces)< / a >
2022-09-13 19:29:14 +00:00
< / li >
< / ul > < / td >
< / tr > < / table >
< / section >
< section id = "U" class = "genindex-section" >
< h2 > U< / h2 >
< table style = "width: 100%" class = "indextable genindextable" > < tr >
< td style = "width: 33%; vertical-align: top;" > < ul >
2022-09-16 13:02:04 +00:00
< li > < a href = "../api/spaces/utils/#gymnasium.spaces.utils.unflatten" > unflatten() (in module gymnasium.spaces.utils)< / a >
2022-10-12 15:02:09 +00:00
< / li >
< / ul > < / td >
< td style = "width: 33%; vertical-align: top;" > < ul >
< li > < a href = "../api/env/#gymnasium.Env.unwrapped" > unwrapped (gymnasium.Env property)< / a >
< ul >
< li > < a href = "../api/wrappers/#gymnasium.Wrapper.unwrapped" > (gymnasium.Wrapper property)< / a >
< / li >
< / ul > < / li >
< / ul > < / td >
< / tr > < / table >
< / section >
< section id = "V" class = "genindex-section" >
< h2 > V< / h2 >
< table style = "width: 100%" class = "indextable genindextable" > < tr >
< td style = "width: 33%; vertical-align: top;" > < ul >
< li > < a href = "../api/vector/#gymnasium.vector.VectorEnv" > VectorEnv (class in gymnasium.vector)< / a >
< / li >
< / ul > < / td >
< td style = "width: 33%; vertical-align: top;" > < ul >
< li > < a href = "../api/wrappers/misc_wrappers/#gymnasium.wrappers.VectorListInfo" > VectorListInfo (class in gymnasium.wrappers)< / a >
2022-09-13 19:29:14 +00:00
< / li >
< / ul > < / td >
< / tr > < / table >
< / section >
< section id = "W" class = "genindex-section" >
< h2 > W< / h2 >
< table style = "width: 100%" class = "indextable genindextable" > < tr >
< td style = "width: 33%; vertical-align: top;" > < ul >
2022-10-12 15:02:09 +00:00
< li > < a href = "../api/wrappers/#gymnasium.Wrapper" > Wrapper (class in gymnasium)< / a >
< / li >
< / ul > < / td >
< td style = "width: 33%; vertical-align: top;" > < ul >
< li > < a href = "../api/spaces/vector_utils/#gymnasium.vector.utils.write_to_shared_memory" > write_to_shared_memory() (in module gymnasium.vector.utils)< / a >
2022-09-13 19:29:14 +00:00
< / li >
< / ul > < / td >
< / tr > < / table >
< / section >
< / article >
< / div >
< footer >
< div class = "related-pages" >
2022-10-03 15:02:45 +00:00
2022-09-13 19:29:14 +00:00
< / div >
< div class = "bottom-of-page" >
< div class = "left-details" >
< div class = "copyright" >
2022-10-23 09:15:41 +00:00
Copyright © 2022 Farama Foundation
2022-09-13 19:29:14 +00:00
< / div >
2022-10-15 15:13:56 +00:00
<!--
2022-09-13 19:29:14 +00:00
Made with < a href = "https://www.sphinx-doc.org/" > Sphinx< / a > and < a class = "muted-link" href = "https://pradyunsg.me" > @pradyunsg< / a > 's
< a href = "https://github.com/pradyunsg/furo" > Furo< / a >
2022-10-15 15:13:56 +00:00
-->
2022-09-13 19:29:14 +00:00
< / div >
< div class = "right-details" >
< div class = "icons" >
2022-10-19 14:22:38 +00:00
2022-09-13 19:29:14 +00:00
< / div >
< / div >
< / div >
< / footer >
< / div >
< aside class = "toc-drawer no-toc" >
< / aside >
< / div >
2022-10-03 15:02:45 +00:00
< / div >
< script >
let toggleMenu = () => {
document.querySelector(".farama-header-menu").classList.toggle("active");
document.querySelector(".farama-header-menu__overlay").classList.toggle("active");
}
document.querySelector(".farama-header-menu__btn").addEventListener("click", toggleMenu);
document.getElementById("farama-close-menu").addEventListener("click", toggleMenu);
document.querySelector(".farama-header-menu__overlay").addEventListener("click", toggleMenu);
window.onclick = function(event) {
if (!event.target.matches('.farama-header-menu__btn')) {
2022-10-15 15:13:56 +00:00
const dropdown = document.querySelector(".farama-header-menu-container");
2022-10-03 15:02:45 +00:00
if (dropdown.classList.contains('active')) {
dropdown.classList.remove('active');
document.querySelector(".farama-header-menu__overlay").classList.remove("active");
}
}
}
< / script >
2022-10-13 10:54:57 +00:00
< script >
(() => {
if (!localStorage.getItem("shownCookieAlert")) {
const boxElem = document.createElement("div");
boxElem.classList.add("cookie-alert");
const containerElem = document.createElement("div");
containerElem.classList.add("cookie-alert__container");
const textElem = document.createElement("p");
textElem.innerHTML = `This page uses < a href = "https://analytics.google.com/" >
Google Analytics< / a > to collect statistics. You can disable it by blocking
the JavaScript coming from www.google-analytics.com.`;
containerElem.appendChild(textElem);
const closeBtn = document.createElement("button");
closeBtn.innerHTML = `<?xml version="1.0" ?> < svg viewBox = "0 0 32 32" xmlns = "http://www.w3.org/2000/svg" > < defs > < style > . cls-1 { fill : none ; stroke : #000 ; stroke-linecap : round ; stroke-linejoin : round ; stroke-width : 2 px ; } < / style > < / defs > < title / > < g id = "cross" > < line class = "cls-1" x1 = "7" x2 = "25" y1 = "7" y2 = "25" / > < line class = "cls-1" x1 = "7" x2 = "25" y1 = "25" y2 = "7" / > < / g > < / svg > `
closeBtn.onclick = () => {
localStorage.setItem("shownCookieAlert", "true");
boxElem.style.display = "none";
}
containerElem.appendChild(closeBtn);
boxElem.appendChild(containerElem);
document.body.appendChild(boxElem);
}
})()
< / script >
< script async src = "https://www.googletagmanager.com/gtag/js?id=G-6H9C8TWXZ8" > < / script >
< script >
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-6H9C8TWXZ8');
< / script >
2022-10-03 15:02:45 +00:00
< script data-url_root = "../" id = "documentation_options" src = "../_static/documentation_options.js" > < / script >
2022-09-13 19:29:14 +00:00
< script src = "../_static/jquery.js" > < / script >
< script src = "../_static/underscore.js" > < / script >
< script src = "../_static/_sphinx_javascript_frameworks_compat.js" > < / script >
< script src = "../_static/doctools.js" > < / script >
2022-09-25 14:44:48 +00:00
< script src = "../_static/sphinx_highlight.js" > < / script >
2022-09-13 19:29:14 +00:00
< script src = "../_static/scripts/furo.js" > < / script >
2022-10-21 15:39:00 +00:00
2022-10-25 11:10:26 +00:00
< script >
const versioningConfig = {
githubUser: 'Farama-Foundation',
githubRepo: 'Gymnasium',
};
fetch('/_static/versioning/versioning_menu.html').then(response => {
if (response.status === 200) {
response.text().then(text => {
const container = document.createElement("div");
container.innerHTML = text;
document.querySelector("body").appendChild(container);
// innerHtml doenst evaluate scripts, we need to add them dynamically
Array.from(container.querySelectorAll("script")).forEach(oldScript => {
const newScript = document.createElement("script");
Array.from(oldScript.attributes).forEach(attr => newScript.setAttribute(attr.name, attr.value));
newScript.appendChild(document.createTextNode(oldScript.innerHTML));
oldScript.parentNode.replaceChild(newScript, oldScript);
});
});
} else {
console.warn("Unable to load versioning menu", response);
}
});
< / script > < / body >
2022-09-13 19:29:14 +00:00
< / html >