stable-envs 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (283) hide show
  1. stable_envs-0.1.0/LICENSE +21 -0
  2. stable_envs-0.1.0/PKG-INFO +241 -0
  3. stable_envs-0.1.0/README.md +88 -0
  4. stable_envs-0.1.0/THIRD_PARTY_NOTICES.md +235 -0
  5. stable_envs-0.1.0/licenses/APACHE-2.0.txt +201 -0
  6. stable_envs-0.1.0/licenses/Bullet-zlib.txt +14 -0
  7. stable_envs-0.1.0/licenses/Gymnasium-MIT.txt +22 -0
  8. stable_envs-0.1.0/licenses/Gymnasium-Robotics-MIT.txt +21 -0
  9. stable_envs-0.1.0/licenses/LGPL-2.1.txt +501 -0
  10. stable_envs-0.1.0/licenses/Munk2D-MIT.txt +20 -0
  11. stable_envs-0.1.0/licenses/NumPy-BSD-3-Clause.txt +30 -0
  12. stable_envs-0.1.0/licenses/NumPy-random-NCSA-BSD-3-Clause.txt +71 -0
  13. stable_envs-0.1.0/licenses/OGBench-MIT.txt +21 -0
  14. stable_envs-0.1.0/licenses/PyFlyt-MIT.txt +19 -0
  15. stable_envs-0.1.0/pyproject.toml +329 -0
  16. stable_envs-0.1.0/setup.cfg +4 -0
  17. stable_envs-0.1.0/stable_envs/__about__.py +9 -0
  18. stable_envs-0.1.0/stable_envs/__init__.py +91 -0
  19. stable_envs-0.1.0/stable_envs/__main__.py +3 -0
  20. stable_envs-0.1.0/stable_envs/_core/__init__.py +1 -0
  21. stable_envs-0.1.0/stable_envs/_core/cache.py +12 -0
  22. stable_envs-0.1.0/stable_envs/_core/config.py +84 -0
  23. stable_envs-0.1.0/stable_envs/_core/dynamics.py +17 -0
  24. stable_envs-0.1.0/stable_envs/_core/environ.py +166 -0
  25. stable_envs-0.1.0/stable_envs/_core/mujoco_gl.py +106 -0
  26. stable_envs-0.1.0/stable_envs/_core/physics.py +492 -0
  27. stable_envs-0.1.0/stable_envs/_core/plate_texels.py +89 -0
  28. stable_envs-0.1.0/stable_envs/_core/reset_tree.py +78 -0
  29. stable_envs-0.1.0/stable_envs/_core/space_nodes.py +10 -0
  30. stable_envs-0.1.0/stable_envs/_core/stepping.py +341 -0
  31. stable_envs-0.1.0/stable_envs/_core/style.py +169 -0
  32. stable_envs-0.1.0/stable_envs/_core/tensordicts.py +136 -0
  33. stable_envs-0.1.0/stable_envs/_core/warp_cuda.py +66 -0
  34. stable_envs-0.1.0/stable_envs/_execution/__init__.py +1 -0
  35. stable_envs-0.1.0/stable_envs/_execution/mjbatch.py +1000 -0
  36. stable_envs-0.1.0/stable_envs/_execution/mjwarp_fused.py +387 -0
  37. stable_envs-0.1.0/stable_envs/_execution/mjwarp_tree.py +522 -0
  38. stable_envs-0.1.0/stable_envs/_execution/policy.py +38 -0
  39. stable_envs-0.1.0/stable_envs/_execution/process.py +503 -0
  40. stable_envs-0.1.0/stable_envs/_execution/protocol.py +114 -0
  41. stable_envs-0.1.0/stable_envs/_execution/render_pool.py +355 -0
  42. stable_envs-0.1.0/stable_envs/_execution/requests.py +119 -0
  43. stable_envs-0.1.0/stable_envs/_execution/shared_memory.py +46 -0
  44. stable_envs-0.1.0/stable_envs/_execution/state_columns.py +52 -0
  45. stable_envs-0.1.0/stable_envs/_execution/workers.py +34 -0
  46. stable_envs-0.1.0/stable_envs/_tune.py +263 -0
  47. stable_envs-0.1.0/stable_envs/cli.py +34 -0
  48. stable_envs-0.1.0/stable_envs/doctor.py +651 -0
  49. stable_envs-0.1.0/stable_envs/env.py +1450 -0
  50. stable_envs-0.1.0/stable_envs/envs/__init__.py +5 -0
  51. stable_envs-0.1.0/stable_envs/envs/classic_control/__init__.py +9 -0
  52. stable_envs-0.1.0/stable_envs/envs/classic_control/envs.py +1101 -0
  53. stable_envs-0.1.0/stable_envs/envs/classic_control/semantics.py +215 -0
  54. stable_envs-0.1.0/stable_envs/envs/classic_control/simulation/__init__.py +0 -0
  55. stable_envs-0.1.0/stable_envs/envs/classic_control/simulation/batched.py +577 -0
  56. stable_envs-0.1.0/stable_envs/envs/classic_control/simulation/device.py +425 -0
  57. stable_envs-0.1.0/stable_envs/envs/classic_control/simulation/execution.py +31 -0
  58. stable_envs-0.1.0/stable_envs/envs/classic_control/simulation/local.py +424 -0
  59. stable_envs-0.1.0/stable_envs/envs/classic_control/simulation/process.py +50 -0
  60. stable_envs-0.1.0/stable_envs/envs/classic_control/simulation/triton_step.py +504 -0
  61. stable_envs-0.1.0/stable_envs/envs/craftax/__init__.py +5 -0
  62. stable_envs-0.1.0/stable_envs/envs/craftax/envs.py +198 -0
  63. stable_envs-0.1.0/stable_envs/envs/craftax/kernel.py +259 -0
  64. stable_envs-0.1.0/stable_envs/envs/dmcontrol/__init__.py +14 -0
  65. stable_envs-0.1.0/stable_envs/envs/dmcontrol/_aligned.py +20 -0
  66. stable_envs-0.1.0/stable_envs/envs/dmcontrol/_cells.py +95 -0
  67. stable_envs-0.1.0/stable_envs/envs/dmcontrol/_continuation.py +12 -0
  68. stable_envs-0.1.0/stable_envs/envs/dmcontrol/_delegated.py +199 -0
  69. stable_envs-0.1.0/stable_envs/envs/dmcontrol/_family.py +107 -0
  70. stable_envs-0.1.0/stable_envs/envs/dmcontrol/_first_family.py +7 -0
  71. stable_envs-0.1.0/stable_envs/envs/dmcontrol/_humanoid.py +7 -0
  72. stable_envs-0.1.0/stable_envs/envs/dmcontrol/_mass_rows.py +112 -0
  73. stable_envs-0.1.0/stable_envs/envs/dmcontrol/_model.py +235 -0
  74. stable_envs-0.1.0/stable_envs/envs/dmcontrol/_shading.py +154 -0
  75. stable_envs-0.1.0/stable_envs/envs/dmcontrol/_tendon.py +206 -0
  76. stable_envs-0.1.0/stable_envs/envs/dmcontrol/acrobot.py +15 -0
  77. stable_envs-0.1.0/stable_envs/envs/dmcontrol/ball_in_cup.py +14 -0
  78. stable_envs-0.1.0/stable_envs/envs/dmcontrol/base.py +454 -0
  79. stable_envs-0.1.0/stable_envs/envs/dmcontrol/cartpole.py +9 -0
  80. stable_envs-0.1.0/stable_envs/envs/dmcontrol/cheetah.py +29 -0
  81. stable_envs-0.1.0/stable_envs/envs/dmcontrol/finger.py +25 -0
  82. stable_envs-0.1.0/stable_envs/envs/dmcontrol/hopper.py +29 -0
  83. stable_envs-0.1.0/stable_envs/envs/dmcontrol/humanoid.py +42 -0
  84. stable_envs-0.1.0/stable_envs/envs/dmcontrol/manipulator.py +60 -0
  85. stable_envs-0.1.0/stable_envs/envs/dmcontrol/pendulum.py +6 -0
  86. stable_envs-0.1.0/stable_envs/envs/dmcontrol/point_mass.py +8 -0
  87. stable_envs-0.1.0/stable_envs/envs/dmcontrol/quadruped.py +97 -0
  88. stable_envs-0.1.0/stable_envs/envs/dmcontrol/reacher.py +62 -0
  89. stable_envs-0.1.0/stable_envs/envs/dmcontrol/simulation/__init__.py +0 -0
  90. stable_envs-0.1.0/stable_envs/envs/dmcontrol/simulation/aligned.py +460 -0
  91. stable_envs-0.1.0/stable_envs/envs/dmcontrol/simulation/batch.py +280 -0
  92. stable_envs-0.1.0/stable_envs/envs/dmcontrol/simulation/continuation.py +286 -0
  93. stable_envs-0.1.0/stable_envs/envs/dmcontrol/simulation/execution.py +100 -0
  94. stable_envs-0.1.0/stable_envs/envs/dmcontrol/simulation/factory.py +74 -0
  95. stable_envs-0.1.0/stable_envs/envs/dmcontrol/simulation/first_family.py +205 -0
  96. stable_envs-0.1.0/stable_envs/envs/dmcontrol/simulation/humanoid.py +105 -0
  97. stable_envs-0.1.0/stable_envs/envs/dmcontrol/simulation/lanes.py +170 -0
  98. stable_envs-0.1.0/stable_envs/envs/dmcontrol/simulation/mjwarp.py +623 -0
  99. stable_envs-0.1.0/stable_envs/envs/dmcontrol/simulation/mjwarp_reset.py +380 -0
  100. stable_envs-0.1.0/stable_envs/envs/dmcontrol/simulation/mjwarp_tasks.py +675 -0
  101. stable_envs-0.1.0/stable_envs/envs/dmcontrol/simulation/physics.py +292 -0
  102. stable_envs-0.1.0/stable_envs/envs/dmcontrol/simulation/reacher_mjx.py +229 -0
  103. stable_envs-0.1.0/stable_envs/envs/dmcontrol/simulation/registered.py +54 -0
  104. stable_envs-0.1.0/stable_envs/envs/dmcontrol/simulation/state.py +132 -0
  105. stable_envs-0.1.0/stable_envs/envs/dmcontrol/suite.py +945 -0
  106. stable_envs-0.1.0/stable_envs/envs/dmcontrol/swimmer.py +50 -0
  107. stable_envs-0.1.0/stable_envs/envs/dmcontrol/trackcom.py +570 -0
  108. stable_envs-0.1.0/stable_envs/envs/dmcontrol/trackcom_opengl.py +81 -0
  109. stable_envs-0.1.0/stable_envs/envs/dmcontrol/trackcom_reflection.py +724 -0
  110. stable_envs-0.1.0/stable_envs/envs/dmcontrol/trackcom_texture.py +46 -0
  111. stable_envs-0.1.0/stable_envs/envs/dmcontrol/walker.py +29 -0
  112. stable_envs-0.1.0/stable_envs/envs/dmcontrol/warp_render.py +1252 -0
  113. stable_envs-0.1.0/stable_envs/envs/fetch/__init__.py +8 -0
  114. stable_envs-0.1.0/stable_envs/envs/fetch/envs.py +986 -0
  115. stable_envs-0.1.0/stable_envs/envs/fetch/mujoco_raster.py +168 -0
  116. stable_envs-0.1.0/stable_envs/envs/fetch/opengl.py +259 -0
  117. stable_envs-0.1.0/stable_envs/envs/fetch/raster.py +1284 -0
  118. stable_envs-0.1.0/stable_envs/envs/fetch/semantics.py +367 -0
  119. stable_envs-0.1.0/stable_envs/envs/fetch/simulation/__init__.py +0 -0
  120. stable_envs-0.1.0/stable_envs/envs/fetch/simulation/adapter.py +403 -0
  121. stable_envs-0.1.0/stable_envs/envs/fetch/simulation/batch.py +541 -0
  122. stable_envs-0.1.0/stable_envs/envs/fetch/simulation/execution.py +61 -0
  123. stable_envs-0.1.0/stable_envs/envs/fetch/simulation/mjwarp.py +246 -0
  124. stable_envs-0.1.0/stable_envs/envs/fetch/simulation/observations.py +85 -0
  125. stable_envs-0.1.0/stable_envs/envs/fetch/simulation/process.py +88 -0
  126. stable_envs-0.1.0/stable_envs/envs/fetch/transparency.py +356 -0
  127. stable_envs-0.1.0/stable_envs/envs/miniworld/__init__.py +6 -0
  128. stable_envs-0.1.0/stable_envs/envs/miniworld/envs.py +204 -0
  129. stable_envs-0.1.0/stable_envs/envs/miniworld/simulation/__init__.py +0 -0
  130. stable_envs-0.1.0/stable_envs/envs/miniworld/simulation/adapter.py +532 -0
  131. stable_envs-0.1.0/stable_envs/envs/miniworld/simulation/batched.py +371 -0
  132. stable_envs-0.1.0/stable_envs/envs/miniworld/simulation/kernel_cpu.py +491 -0
  133. stable_envs-0.1.0/stable_envs/envs/miniworld/simulation/kernel_torch.py +499 -0
  134. stable_envs-0.1.0/stable_envs/envs/miniworld/simulation/kernel_triton.py +338 -0
  135. stable_envs-0.1.0/stable_envs/envs/miniworld/simulation/rng.py +78 -0
  136. stable_envs-0.1.0/stable_envs/envs/miniworld/simulation/world.py +116 -0
  137. stable_envs-0.1.0/stable_envs/envs/mshuman/__init__.py +5 -0
  138. stable_envs-0.1.0/stable_envs/envs/mshuman/assets.py +59 -0
  139. stable_envs-0.1.0/stable_envs/envs/mshuman/envs.py +127 -0
  140. stable_envs-0.1.0/stable_envs/envs/mshuman/simulation/__init__.py +0 -0
  141. stable_envs-0.1.0/stable_envs/envs/mshuman/simulation/adapter.py +115 -0
  142. stable_envs-0.1.0/stable_envs/envs/navigation/__init__.py +8 -0
  143. stable_envs-0.1.0/stable_envs/envs/navigation/envs.py +1825 -0
  144. stable_envs-0.1.0/stable_envs/envs/navigation/maze_goal.py +210 -0
  145. stable_envs-0.1.0/stable_envs/envs/navigation/navdot.py +213 -0
  146. stable_envs-0.1.0/stable_envs/envs/navigation/navdot_cpu.py +114 -0
  147. stable_envs-0.1.0/stable_envs/envs/navigation/navstep_cpu.py +200 -0
  148. stable_envs-0.1.0/stable_envs/envs/navigation/tworoom_jax.py +115 -0
  149. stable_envs-0.1.0/stable_envs/envs/ogbench/__init__.py +33 -0
  150. stable_envs-0.1.0/stable_envs/envs/ogbench/context_cache.py +199 -0
  151. stable_envs-0.1.0/stable_envs/envs/ogbench/litpass_cpu.py +422 -0
  152. stable_envs-0.1.0/stable_envs/envs/ogbench/manipulation.py +1125 -0
  153. stable_envs-0.1.0/stable_envs/envs/ogbench/manipulation_fidelity.py +118 -0
  154. stable_envs-0.1.0/stable_envs/envs/ogbench/manipulation_opengl.py +468 -0
  155. stable_envs-0.1.0/stable_envs/envs/ogbench/manipulation_opengl_pool.py +221 -0
  156. stable_envs-0.1.0/stable_envs/envs/ogbench/manipulation_raster.py +207 -0
  157. stable_envs-0.1.0/stable_envs/envs/ogbench/manipulation_renderer.py +328 -0
  158. stable_envs-0.1.0/stable_envs/envs/ogbench/manipulation_semantics.py +496 -0
  159. stable_envs-0.1.0/stable_envs/envs/ogbench/maze.py +1527 -0
  160. stable_envs-0.1.0/stable_envs/envs/ogbench/simulation/__init__.py +0 -0
  161. stable_envs-0.1.0/stable_envs/envs/ogbench/simulation/compatibility.py +677 -0
  162. stable_envs-0.1.0/stable_envs/envs/ogbench/simulation/execution.py +78 -0
  163. stable_envs-0.1.0/stable_envs/envs/ogbench/simulation/manipulation.py +545 -0
  164. stable_envs-0.1.0/stable_envs/envs/ogbench/simulation/manipulation_batch.py +481 -0
  165. stable_envs-0.1.0/stable_envs/envs/ogbench/simulation/manipulation_control.py +330 -0
  166. stable_envs-0.1.0/stable_envs/envs/ogbench/simulation/manipulation_process.py +71 -0
  167. stable_envs-0.1.0/stable_envs/envs/ogbench/simulation/manipulation_warp.py +712 -0
  168. stable_envs-0.1.0/stable_envs/envs/ogbench/simulation/maze.py +446 -0
  169. stable_envs-0.1.0/stable_envs/envs/ogbench/simulation/maze_batch.py +903 -0
  170. stable_envs-0.1.0/stable_envs/envs/ogbench/simulation/maze_process.py +32 -0
  171. stable_envs-0.1.0/stable_envs/envs/ogbench/simulation/pcg.py +46 -0
  172. stable_envs-0.1.0/stable_envs/envs/ogbench/simulation/render_state.py +295 -0
  173. stable_envs-0.1.0/stable_envs/envs/pusht/__init__.py +17 -0
  174. stable_envs-0.1.0/stable_envs/envs/pusht/draw.py +123 -0
  175. stable_envs-0.1.0/stable_envs/envs/pusht/legacy.py +522 -0
  176. stable_envs-0.1.0/stable_envs/envs/pusht/projection.py +124 -0
  177. stable_envs-0.1.0/stable_envs/envs/pusht/raster.py +1379 -0
  178. stable_envs-0.1.0/stable_envs/envs/pusht/raster_cpu.py +669 -0
  179. stable_envs-0.1.0/stable_envs/envs/pusht/raster_device.py +933 -0
  180. stable_envs-0.1.0/stable_envs/envs/pusht/render_pool.py +114 -0
  181. stable_envs-0.1.0/stable_envs/envs/pusht/semantics.py +505 -0
  182. stable_envs-0.1.0/stable_envs/envs/pusht/simulation/__init__.py +0 -0
  183. stable_envs-0.1.0/stable_envs/envs/pusht/simulation/batch.py +540 -0
  184. stable_envs-0.1.0/stable_envs/envs/pusht/simulation/contacts.py +32 -0
  185. stable_envs-0.1.0/stable_envs/envs/pusht/simulation/execution.py +70 -0
  186. stable_envs-0.1.0/stable_envs/envs/pusht/simulation/history.py +27 -0
  187. stable_envs-0.1.0/stable_envs/envs/pusht/simulation/jax_batch.py +56 -0
  188. stable_envs-0.1.0/stable_envs/envs/pusht/simulation/jax_physics.py +402 -0
  189. stable_envs-0.1.0/stable_envs/envs/pusht/simulation/numba_batch.py +199 -0
  190. stable_envs-0.1.0/stable_envs/envs/pusht/simulation/numba_broadphase.py +329 -0
  191. stable_envs-0.1.0/stable_envs/envs/pusht/simulation/numba_physics.py +662 -0
  192. stable_envs-0.1.0/stable_envs/envs/pusht/simulation/numeric.py +506 -0
  193. stable_envs-0.1.0/stable_envs/envs/pusht/simulation/process.py +149 -0
  194. stable_envs-0.1.0/stable_envs/envs/pusht/simulation/quantizer.py +64 -0
  195. stable_envs-0.1.0/stable_envs/envs/pusht/simulation/replay.py +412 -0
  196. stable_envs-0.1.0/stable_envs/envs/pusht/simulation/replay_batch.py +387 -0
  197. stable_envs-0.1.0/stable_envs/envs/pusht/simulation/reset_pool.py +183 -0
  198. stable_envs-0.1.0/stable_envs/envs/pusht/simulation/task.py +898 -0
  199. stable_envs-0.1.0/stable_envs/envs/pusht/simulation/triton_batch.py +117 -0
  200. stable_envs-0.1.0/stable_envs/envs/pusht/simulation/triton_broadphase.py +370 -0
  201. stable_envs-0.1.0/stable_envs/envs/pusht/simulation/triton_physics.py +1007 -0
  202. stable_envs-0.1.0/stable_envs/envs/roadster/__init__.py +8 -0
  203. stable_envs-0.1.0/stable_envs/envs/roadster/envs.py +273 -0
  204. stable_envs-0.1.0/stable_envs/envs/roadster/render.py +219 -0
  205. stable_envs-0.1.0/stable_envs/envs/roadster/simulation/__init__.py +0 -0
  206. stable_envs-0.1.0/stable_envs/envs/roadster/simulation/adapter.py +191 -0
  207. stable_envs-0.1.0/stable_envs/envs/roadster/simulation/base.py +408 -0
  208. stable_envs-0.1.0/stable_envs/envs/roadster/simulation/batch.py +544 -0
  209. stable_envs-0.1.0/stable_envs/envs/roadster/simulation/execution.py +36 -0
  210. stable_envs-0.1.0/stable_envs/envs/roadster/simulation/warp.py +651 -0
  211. stable_envs-0.1.0/stable_envs/envs/roadster/simulation/world.py +295 -0
  212. stable_envs-0.1.0/stable_envs/envs/roadster/source/__init__.py +18 -0
  213. stable_envs-0.1.0/stable_envs/envs/roadster/source/body_mesh.py +459 -0
  214. stable_envs-0.1.0/stable_envs/envs/roadster/source/cinematic.py +95 -0
  215. stable_envs-0.1.0/stable_envs/envs/roadster/source/control.py +137 -0
  216. stable_envs-0.1.0/stable_envs/envs/roadster/source/course.py +55 -0
  217. stable_envs-0.1.0/stable_envs/envs/roadster/source/decor.py +358 -0
  218. stable_envs-0.1.0/stable_envs/envs/roadster/source/expert.py +64 -0
  219. stable_envs-0.1.0/stable_envs/envs/roadster/source/fx.py +219 -0
  220. stable_envs-0.1.0/stable_envs/envs/roadster/source/model.py +449 -0
  221. stable_envs-0.1.0/stable_envs/envs/roadster/source/scenarios.py +245 -0
  222. stable_envs-0.1.0/stable_envs/envs/roadster/source/sim.py +362 -0
  223. stable_envs-0.1.0/stable_envs/envs/roadster/source/tasks.py +429 -0
  224. stable_envs-0.1.0/stable_envs/envs/roadster/source/textures.py +171 -0
  225. stable_envs-0.1.0/stable_envs/envs/roadster/source/util.py +45 -0
  226. stable_envs-0.1.0/stable_envs/envs/roadster/source/weather.py +170 -0
  227. stable_envs-0.1.0/stable_envs/envs/rocket/__init__.py +20 -0
  228. stable_envs-0.1.0/stable_envs/envs/rocket/legacy.py +785 -0
  229. stable_envs-0.1.0/stable_envs/envs/rocket/raster.py +184 -0
  230. stable_envs-0.1.0/stable_envs/envs/rocket/render.py +518 -0
  231. stable_envs-0.1.0/stable_envs/envs/rocket/semantics.py +551 -0
  232. stable_envs-0.1.0/stable_envs/envs/rocket/simulation/__init__.py +0 -0
  233. stable_envs-0.1.0/stable_envs/envs/rocket/simulation/actions.py +33 -0
  234. stable_envs-0.1.0/stable_envs/envs/rocket/simulation/adapter.py +298 -0
  235. stable_envs-0.1.0/stable_envs/envs/rocket/simulation/execution.py +91 -0
  236. stable_envs-0.1.0/stable_envs/envs/rocket/simulation/numba_batch.py +635 -0
  237. stable_envs-0.1.0/stable_envs/envs/rocket/simulation/numba_cuda_batch.py +375 -0
  238. stable_envs-0.1.0/stable_envs/envs/rocket/simulation/numba_cuda_physics.py +300 -0
  239. stable_envs-0.1.0/stable_envs/envs/rocket/simulation/numba_physics.py +1210 -0
  240. stable_envs-0.1.0/stable_envs/envs/rocket/simulation/numeric.py +97 -0
  241. stable_envs-0.1.0/stable_envs/envs/rocket/simulation/process.py +115 -0
  242. stable_envs-0.1.0/stable_envs/envs/rocket/simulation/replay.py +648 -0
  243. stable_envs-0.1.0/stable_envs/envs/rocket/simulation/task.py +518 -0
  244. stable_envs-0.1.0/stable_envs/envs/rocket/tiny_raster.py +1169 -0
  245. stable_envs-0.1.0/stable_envs/registry.py +282 -0
  246. stable_envs-0.1.0/stable_envs/render/__init__.py +0 -0
  247. stable_envs-0.1.0/stable_envs/render/_resources.py +272 -0
  248. stable_envs-0.1.0/stable_envs/render/cpu3d.py +1117 -0
  249. stable_envs-0.1.0/stable_envs/render/cpu_raster/__init__.py +43 -0
  250. stable_envs-0.1.0/stable_envs/render/cpu_raster/_common.py +215 -0
  251. stable_envs-0.1.0/stable_envs/render/cpu_raster/classic.py +153 -0
  252. stable_envs-0.1.0/stable_envs/render/cpu_raster/rays3d.py +470 -0
  253. stable_envs-0.1.0/stable_envs/render/cpu_raster/scene3d.py +866 -0
  254. stable_envs-0.1.0/stable_envs/render/cpu_raster/suite3d.py +388 -0
  255. stable_envs-0.1.0/stable_envs/render/gfxdraw/__init__.py +1410 -0
  256. stable_envs-0.1.0/stable_envs/render/gfxdraw/classic.py +415 -0
  257. stable_envs-0.1.0/stable_envs/render/gfxdraw/fused.py +452 -0
  258. stable_envs-0.1.0/stable_envs/render/mjwarp/__init__.py +483 -0
  259. stable_envs-0.1.0/stable_envs/render/mujoco_raster.py +1601 -0
  260. stable_envs-0.1.0/stable_envs/render/mujoco_scene.py +861 -0
  261. stable_envs-0.1.0/stable_envs/render/nvdiff.py +1120 -0
  262. stable_envs-0.1.0/stable_envs/render/primitives.py +158 -0
  263. stable_envs-0.1.0/stable_envs/render/raster2d.py +759 -0
  264. stable_envs-0.1.0/stable_envs/render/raycast3d.py +1324 -0
  265. stable_envs-0.1.0/stable_envs/render/scene.py +411 -0
  266. stable_envs-0.1.0/stable_envs/render/texture_mip.py +151 -0
  267. stable_envs-0.1.0/stable_envs/spaces.py +405 -0
  268. stable_envs-0.1.0/stable_envs/specs.py +336 -0
  269. stable_envs-0.1.0/stable_envs/testing/__init__.py +5 -0
  270. stable_envs-0.1.0/stable_envs/testing/_data.py +595 -0
  271. stable_envs-0.1.0/stable_envs/testing/_sampling.py +135 -0
  272. stable_envs-0.1.0/stable_envs/testing/conformance.py +1270 -0
  273. stable_envs-0.1.0/stable_envs/testing/corpus.py +127 -0
  274. stable_envs-0.1.0/stable_envs/testing/evidence.py +111 -0
  275. stable_envs-0.1.0/stable_envs/testing/metrics.py +93 -0
  276. stable_envs-0.1.0/stable_envs/testing/provenance.py +164 -0
  277. stable_envs-0.1.0/stable_envs/tuning.py +569 -0
  278. stable_envs-0.1.0/stable_envs.egg-info/PKG-INFO +241 -0
  279. stable_envs-0.1.0/stable_envs.egg-info/SOURCES.txt +281 -0
  280. stable_envs-0.1.0/stable_envs.egg-info/dependency_links.txt +1 -0
  281. stable_envs-0.1.0/stable_envs.egg-info/entry_points.txt +2 -0
  282. stable_envs-0.1.0/stable_envs.egg-info/requires.txt +151 -0
  283. stable_envs-0.1.0/stable_envs.egg-info/top_level.txt +1 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 GalilAI-group
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,241 @@
1
+ Metadata-Version: 2.4
2
+ Name: stable-envs
3
+ Version: 0.1.0
4
+ Summary: Fast and Reproducible Environments with Controllable Variations
5
+ Author: Randall Balestriero, Sami BuGhanem
6
+ License-Expression: MIT AND LGPL-2.1-or-later
7
+ Project-URL: Homepage, https://github.com/galilai-group/stable-envs
8
+ Project-URL: Documentation, https://galilai-group.github.io/stable-envs/
9
+ Project-URL: Issues, https://github.com/galilai-group/stable-envs/issues
10
+ Project-URL: Source, https://github.com/galilai-group/stable-envs
11
+ Keywords: reinforcement-learning,environments,rendering,pytorch,gpu
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: Operating System :: MacOS
15
+ Classifier: Operating System :: POSIX :: Linux
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
21
+ Requires-Python: <3.13,>=3.10
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ License-File: THIRD_PARTY_NOTICES.md
25
+ License-File: licenses/APACHE-2.0.txt
26
+ License-File: licenses/Bullet-zlib.txt
27
+ License-File: licenses/Gymnasium-MIT.txt
28
+ License-File: licenses/Gymnasium-Robotics-MIT.txt
29
+ License-File: licenses/LGPL-2.1.txt
30
+ License-File: licenses/Munk2D-MIT.txt
31
+ License-File: licenses/NumPy-BSD-3-Clause.txt
32
+ License-File: licenses/NumPy-random-NCSA-BSD-3-Clause.txt
33
+ License-File: licenses/OGBench-MIT.txt
34
+ License-File: licenses/PyFlyt-MIT.txt
35
+ Requires-Dist: gymnasium>=1.0
36
+ Requires-Dist: jax>=0.4.35
37
+ Requires-Dist: loguru>=0.7
38
+ Requires-Dist: numpy>=1.24
39
+ Requires-Dist: tensordict>=0.6
40
+ Requires-Dist: torch>=2.2
41
+ Provides-Extra: classic
42
+ Requires-Dist: pygame>=2.5; extra == "classic"
43
+ Requires-Dist: numba>=0.60; extra == "classic"
44
+ Provides-Extra: pusht
45
+ Requires-Dist: pygame>=2.5; extra == "pusht"
46
+ Requires-Dist: pymunk==7.2.0; extra == "pusht"
47
+ Requires-Dist: opencv-python-headless; extra == "pusht"
48
+ Requires-Dist: shapely; extra == "pusht"
49
+ Requires-Dist: numba>=0.60; extra == "pusht"
50
+ Provides-Extra: pusht-gpu
51
+ Requires-Dist: pygame>=2.5; extra == "pusht-gpu"
52
+ Requires-Dist: pymunk==7.2.0; extra == "pusht-gpu"
53
+ Requires-Dist: opencv-python-headless; extra == "pusht-gpu"
54
+ Requires-Dist: shapely; extra == "pusht-gpu"
55
+ Requires-Dist: numba>=0.60; extra == "pusht-gpu"
56
+ Requires-Dist: jax[cuda12]>=0.4.35; sys_platform == "linux" and extra == "pusht-gpu"
57
+ Provides-Extra: pusht-reference
58
+ Requires-Dist: gym-pusht; extra == "pusht-reference"
59
+ Provides-Extra: navigation
60
+ Requires-Dist: matplotlib>=3.10; extra == "navigation"
61
+ Requires-Dist: numba>=0.60; extra == "navigation"
62
+ Provides-Extra: navigation-gpu
63
+ Requires-Dist: jax[cuda12]>=0.4.35; sys_platform == "linux" and extra == "navigation-gpu"
64
+ Provides-Extra: ogbench
65
+ Requires-Dist: mujoco<3.18,>=3.11; extra == "ogbench"
66
+ Requires-Dist: ogbench<1.3,>=1.2.1; extra == "ogbench"
67
+ Requires-Dist: numba>=0.60; extra == "ogbench"
68
+ Provides-Extra: ogbench-manipulation
69
+ Requires-Dist: ogbench==1.2.1; extra == "ogbench-manipulation"
70
+ Requires-Dist: mujoco==3.17.0; extra == "ogbench-manipulation"
71
+ Requires-Dist: dm-control>=1.0.50; extra == "ogbench-manipulation"
72
+ Requires-Dist: numba>=0.60; extra == "ogbench-manipulation"
73
+ Provides-Extra: ogbench-manipulation-gpu
74
+ Requires-Dist: ogbench==1.2.1; extra == "ogbench-manipulation-gpu"
75
+ Requires-Dist: mujoco==3.17.0; extra == "ogbench-manipulation-gpu"
76
+ Requires-Dist: dm-control>=1.0.50; extra == "ogbench-manipulation-gpu"
77
+ Requires-Dist: numba>=0.60; extra == "ogbench-manipulation-gpu"
78
+ Requires-Dist: mujoco-warp==3.17.0; extra == "ogbench-manipulation-gpu"
79
+ Requires-Dist: warp-lang==1.17.0; extra == "ogbench-manipulation-gpu"
80
+ Provides-Extra: dmcontrol
81
+ Requires-Dist: dm-control>=1.0.50; extra == "dmcontrol"
82
+ Requires-Dist: mujoco<3.18,>=3.17; extra == "dmcontrol"
83
+ Requires-Dist: numba>=0.60; extra == "dmcontrol"
84
+ Provides-Extra: dmcontrol-gpu
85
+ Requires-Dist: dm-control>=1.0.50; extra == "dmcontrol-gpu"
86
+ Requires-Dist: mujoco<3.18,>=3.17; extra == "dmcontrol-gpu"
87
+ Requires-Dist: mujoco-warp<3.18,>=3.17; extra == "dmcontrol-gpu"
88
+ Requires-Dist: warp-lang>=1.16; extra == "dmcontrol-gpu"
89
+ Requires-Dist: mujoco-mjx<3.18,>=3.17; extra == "dmcontrol-gpu"
90
+ Requires-Dist: jax[cuda12]>=0.4.35; sys_platform == "linux" and extra == "dmcontrol-gpu"
91
+ Provides-Extra: robotics
92
+ Requires-Dist: gymnasium-robotics<1.5,>=1.4.2; extra == "robotics"
93
+ Requires-Dist: mujoco<3.12,>=3.11; extra == "robotics"
94
+ Requires-Dist: opencv-python-headless; extra == "robotics"
95
+ Requires-Dist: numba>=0.60; extra == "robotics"
96
+ Provides-Extra: mjwarp
97
+ Requires-Dist: mujoco<3.18,>=3.11; extra == "mjwarp"
98
+ Requires-Dist: mujoco-warp<3.18,>=3.11; extra == "mjwarp"
99
+ Requires-Dist: warp-lang>=1.16; extra == "mjwarp"
100
+ Provides-Extra: mshuman
101
+ Requires-Dist: filelock>=3.0; extra == "mshuman"
102
+ Requires-Dist: mujoco<3.18,>=3.17; extra == "mshuman"
103
+ Requires-Dist: mujoco-warp<3.18,>=3.17; extra == "mshuman"
104
+ Requires-Dist: warp-lang>=1.16; extra == "mshuman"
105
+ Provides-Extra: rocket
106
+ Requires-Dist: pillow; extra == "rocket"
107
+ Requires-Dist: scipy; extra == "rocket"
108
+ Requires-Dist: PyFlyt==0.29.0; extra == "rocket"
109
+ Requires-Dist: pybullet==3.2.7; extra == "rocket"
110
+ Requires-Dist: numba>=0.60; extra == "rocket"
111
+ Provides-Extra: craftax
112
+ Requires-Dist: craftax>=1.6.1; extra == "craftax"
113
+ Requires-Dist: jax>=0.4.30; extra == "craftax"
114
+ Provides-Extra: roadster
115
+ Requires-Dist: mujoco<3.18,>=3.17; extra == "roadster"
116
+ Requires-Dist: pillow; extra == "roadster"
117
+ Provides-Extra: roadster-gpu
118
+ Requires-Dist: mujoco<3.18,>=3.17; extra == "roadster-gpu"
119
+ Requires-Dist: mujoco-warp<3.18,>=3.17; extra == "roadster-gpu"
120
+ Requires-Dist: warp-lang>=1.16; extra == "roadster-gpu"
121
+ Requires-Dist: pillow; extra == "roadster-gpu"
122
+ Provides-Extra: craftax-gpu
123
+ Requires-Dist: craftax>=1.6.1; extra == "craftax-gpu"
124
+ Requires-Dist: jax[cuda12]>=0.4.30; sys_platform == "linux" and extra == "craftax-gpu"
125
+ Provides-Extra: miniworld
126
+ Requires-Dist: miniworld>=2.1; extra == "miniworld"
127
+ Requires-Dist: pyglet<2,>=1.5.27; extra == "miniworld"
128
+ Requires-Dist: numba>=0.60; extra == "miniworld"
129
+ Provides-Extra: hf
130
+ Requires-Dist: datasets>=2.14; extra == "hf"
131
+ Provides-Extra: examples
132
+ Requires-Dist: imageio; extra == "examples"
133
+ Requires-Dist: imageio-ffmpeg; extra == "examples"
134
+ Requires-Dist: opencv-python-headless; extra == "examples"
135
+ Provides-Extra: docs
136
+ Requires-Dist: mkdocs<2,>=1.6; extra == "docs"
137
+ Requires-Dist: mkdocs-material<10,>=9.7; extra == "docs"
138
+ Requires-Dist: mkdocstrings[python]>=0.27; extra == "docs"
139
+ Requires-Dist: pymdown-extensions>=10.0; extra == "docs"
140
+ Provides-Extra: dev
141
+ Requires-Dist: build>=1.2; extra == "dev"
142
+ Requires-Dist: pre-commit>=4.0; extra == "dev"
143
+ Requires-Dist: pygame; extra == "dev"
144
+ Requires-Dist: pytest>=8; extra == "dev"
145
+ Requires-Dist: pytest-timeout>=2.3; extra == "dev"
146
+ Requires-Dist: pytest-xdist>=3.6; extra == "dev"
147
+ Requires-Dist: pyyaml>=6; extra == "dev"
148
+ Requires-Dist: ruff>=0.12; extra == "dev"
149
+ Requires-Dist: mypy>=1.15; extra == "dev"
150
+ Requires-Dist: tomli>=2; python_version < "3.11" and extra == "dev"
151
+ Requires-Dist: twine>=6; extra == "dev"
152
+ Dynamic: license-file
153
+
154
+ <img src="https://raw.githubusercontent.com/galilai-group/stable-envs/main/docs/assets/brand/banner.jpg" alt="stable-envs: frames from ten environment families" width="100%">
155
+
156
+ <p align="center"><i>Fast and Reproducible Environments with Controllable Variations</i></p>
157
+
158
+ <p align="center">
159
+ <a href="https://galilai-group.github.io/stable-envs/"><img alt="Docs" src="https://img.shields.io/badge/docs-galilai--group.github.io-black.svg"/></a>
160
+ <a href="https://pypi.org/project/stable-envs/"><img alt="PyPI" src="https://img.shields.io/pypi/v/stable-envs.svg?color=black"/></a>
161
+ <a href="https://github.com/galilai-group/stable-envs/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/galilai-group/stable-envs/actions/workflows/ci.yml/badge.svg?branch=main"/></a>
162
+ <a href="https://github.com/galilai-group/stable-envs/blob/main/pyproject.toml"><img alt="Python 3.10 to 3.12" src="https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12-black.svg"/></a>
163
+ <a href="https://github.com/galilai-group/stable-envs/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/badge/license-MIT%20%2B%20LGPL--2.1-black.svg"/></a>
164
+ </p>
165
+
166
+ <p align="center">
167
+ <a href="#installation"><b>Installation</b></a> ·
168
+ <a href="#quick-start"><b>Quick Start</b></a> ·
169
+ <a href="#environments"><b>Environments</b></a> ·
170
+ <a href="https://galilai-group.github.io/stable-envs/"><b>Documentation</b></a>
171
+ </p>
172
+
173
+ ---
174
+
175
+ stable-envs is a library of batched simulation environments that keep the full simulator state, so you can restore any step exactly and render images from it later, on CPU or GPU.
176
+
177
+ Store states instead of pixels, replay or branch from any step, and render frames from a stored state as many times as you like. 80 environment classes in 11 families share the same API.
178
+
179
+ ## Installation
180
+
181
+ ```bash
182
+ pip install stable-envs # or: uv add stable-envs
183
+ pip install "stable-envs[pusht]" # PushT simulation and CPU rendering
184
+ pip install "stable-envs[dmcontrol,ogbench]" # add family extras as needed
185
+ stable-envs doctor # check what works on this machine
186
+ ```
187
+
188
+ Install the `robotics` extra (Fetch) in its own environment, because it needs MuJoCo below 3.12, while `dmcontrol`, `mshuman`, `roadster` and `ogbench-manipulation` need 3.17. [Install](https://galilai-group.github.io/stable-envs/install/) lists every extra and the OpenGL setup.
189
+
190
+ ## Quick Start
191
+
192
+ ```python
193
+ import torch
194
+ import stable_envs as snv
195
+
196
+ with snv.CartPole(num_envs=8, device="cpu") as env:
197
+ env.reset(seed=0)
198
+ actions = torch.randint(0, 2, (8, 10, 1)) # (B, T, A): ten steps for each environment
199
+ out = env.step(actions, frames=None) # step without rendering
200
+ print(out["states"].batch_size) # torch.Size([8, 10])
201
+ frames = env.render(out["states"][:, 4]) # render the state after five steps
202
+ print(frames.shape, frames.dtype) # torch.Size([8, 400, 600, 3]) torch.uint8
203
+ ```
204
+
205
+ `step` returns the state after every step, and `render` draws a batch of frames from any of them.
206
+
207
+ The [Quickstart](https://galilai-group.github.io/stable-envs/quickstart/) covers state, frames, steps, save and restore, and variation. For policies, datasets and training, see [stable-worldmodel](https://github.com/galilai-group/stable-worldmodel).
208
+
209
+ ## Environments
210
+
211
+ | Family | Classes | Extra |
212
+ |---|---:|---|
213
+ | [`classic_control`](https://galilai-group.github.io/stable-envs/environments/classic-control/) | 5 | none (`classic` for MountainCar, MountainCarContinuous and Pendulum) |
214
+ | [`craftax`](https://galilai-group.github.io/stable-envs/environments/craftax/) | 4 | `craftax` |
215
+ | [`dmcontrol`](https://galilai-group.github.io/stable-envs/environments/dmcontrol/) | 17 | `dmcontrol` |
216
+ | [`fetch`](https://galilai-group.github.io/stable-envs/environments/fetch/) | 12 | `robotics` |
217
+ | [`miniworld`](https://galilai-group.github.io/stable-envs/environments/miniworld/) | 1 | `miniworld` |
218
+ | [`mshuman`](https://galilai-group.github.io/stable-envs/environments/mshuman/) | 1 | `mshuman` |
219
+ | [`navigation`](https://galilai-group.github.io/stable-envs/environments/navigation/) | 5 | none (`navigation` for SimplePointMaze) |
220
+ | [`ogbench`](https://galilai-group.github.io/stable-envs/environments/ogbench/) | 27 | `ogbench`, or `ogbench-manipulation` for Cube and Scene |
221
+ | [`pusht`](https://galilai-group.github.io/stable-envs/environments/pusht/) | 2 | `pusht` |
222
+ | [`pyflyt`](https://galilai-group.github.io/stable-envs/environments/pyflyt/) | 1 | `rocket` |
223
+ | [`roadster`](https://galilai-group.github.io/stable-envs/environments/roadster/) | 5 | `roadster` |
224
+ | **Total** | **80** | |
225
+
226
+ ## Examples
227
+
228
+ - [`examples/`](https://github.com/galilai-group/stable-envs/blob/main/examples/README.md): short scripts for rendering, batching, action sequences and domain randomization.
229
+ - [`examples/lewm/`](https://github.com/galilai-group/stable-envs/blob/main/examples/lewm/README.md): train and evaluate stable-worldmodel's LeWM world model on PushT, with frames that `env.render` draws on the training device from stored states.
230
+
231
+ ## Documentation
232
+
233
+ The full documentation is at [galilai-group.github.io/stable-envs](https://galilai-group.github.io/stable-envs/).
234
+
235
+ ## Questions
236
+
237
+ Open an [issue](https://github.com/galilai-group/stable-envs/issues) on GitHub.
238
+
239
+ ## License
240
+
241
+ MIT, except the three PushT rasterizer files that port pygame's drawing routines, which are LGPL-2.1-or-later. See [LICENSE](https://github.com/galilai-group/stable-envs/blob/main/LICENSE) and [THIRD_PARTY_NOTICES.md](https://github.com/galilai-group/stable-envs/blob/main/THIRD_PARTY_NOTICES.md).
@@ -0,0 +1,88 @@
1
+ <img src="https://raw.githubusercontent.com/galilai-group/stable-envs/main/docs/assets/brand/banner.jpg" alt="stable-envs: frames from ten environment families" width="100%">
2
+
3
+ <p align="center"><i>Fast and Reproducible Environments with Controllable Variations</i></p>
4
+
5
+ <p align="center">
6
+ <a href="https://galilai-group.github.io/stable-envs/"><img alt="Docs" src="https://img.shields.io/badge/docs-galilai--group.github.io-black.svg"/></a>
7
+ <a href="https://pypi.org/project/stable-envs/"><img alt="PyPI" src="https://img.shields.io/pypi/v/stable-envs.svg?color=black"/></a>
8
+ <a href="https://github.com/galilai-group/stable-envs/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/galilai-group/stable-envs/actions/workflows/ci.yml/badge.svg?branch=main"/></a>
9
+ <a href="https://github.com/galilai-group/stable-envs/blob/main/pyproject.toml"><img alt="Python 3.10 to 3.12" src="https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12-black.svg"/></a>
10
+ <a href="https://github.com/galilai-group/stable-envs/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/badge/license-MIT%20%2B%20LGPL--2.1-black.svg"/></a>
11
+ </p>
12
+
13
+ <p align="center">
14
+ <a href="#installation"><b>Installation</b></a> ·
15
+ <a href="#quick-start"><b>Quick Start</b></a> ·
16
+ <a href="#environments"><b>Environments</b></a> ·
17
+ <a href="https://galilai-group.github.io/stable-envs/"><b>Documentation</b></a>
18
+ </p>
19
+
20
+ ---
21
+
22
+ stable-envs is a library of batched simulation environments that keep the full simulator state, so you can restore any step exactly and render images from it later, on CPU or GPU.
23
+
24
+ Store states instead of pixels, replay or branch from any step, and render frames from a stored state as many times as you like. 80 environment classes in 11 families share the same API.
25
+
26
+ ## Installation
27
+
28
+ ```bash
29
+ pip install stable-envs # or: uv add stable-envs
30
+ pip install "stable-envs[pusht]" # PushT simulation and CPU rendering
31
+ pip install "stable-envs[dmcontrol,ogbench]" # add family extras as needed
32
+ stable-envs doctor # check what works on this machine
33
+ ```
34
+
35
+ Install the `robotics` extra (Fetch) in its own environment, because it needs MuJoCo below 3.12, while `dmcontrol`, `mshuman`, `roadster` and `ogbench-manipulation` need 3.17. [Install](https://galilai-group.github.io/stable-envs/install/) lists every extra and the OpenGL setup.
36
+
37
+ ## Quick Start
38
+
39
+ ```python
40
+ import torch
41
+ import stable_envs as snv
42
+
43
+ with snv.CartPole(num_envs=8, device="cpu") as env:
44
+ env.reset(seed=0)
45
+ actions = torch.randint(0, 2, (8, 10, 1)) # (B, T, A): ten steps for each environment
46
+ out = env.step(actions, frames=None) # step without rendering
47
+ print(out["states"].batch_size) # torch.Size([8, 10])
48
+ frames = env.render(out["states"][:, 4]) # render the state after five steps
49
+ print(frames.shape, frames.dtype) # torch.Size([8, 400, 600, 3]) torch.uint8
50
+ ```
51
+
52
+ `step` returns the state after every step, and `render` draws a batch of frames from any of them.
53
+
54
+ The [Quickstart](https://galilai-group.github.io/stable-envs/quickstart/) covers state, frames, steps, save and restore, and variation. For policies, datasets and training, see [stable-worldmodel](https://github.com/galilai-group/stable-worldmodel).
55
+
56
+ ## Environments
57
+
58
+ | Family | Classes | Extra |
59
+ |---|---:|---|
60
+ | [`classic_control`](https://galilai-group.github.io/stable-envs/environments/classic-control/) | 5 | none (`classic` for MountainCar, MountainCarContinuous and Pendulum) |
61
+ | [`craftax`](https://galilai-group.github.io/stable-envs/environments/craftax/) | 4 | `craftax` |
62
+ | [`dmcontrol`](https://galilai-group.github.io/stable-envs/environments/dmcontrol/) | 17 | `dmcontrol` |
63
+ | [`fetch`](https://galilai-group.github.io/stable-envs/environments/fetch/) | 12 | `robotics` |
64
+ | [`miniworld`](https://galilai-group.github.io/stable-envs/environments/miniworld/) | 1 | `miniworld` |
65
+ | [`mshuman`](https://galilai-group.github.io/stable-envs/environments/mshuman/) | 1 | `mshuman` |
66
+ | [`navigation`](https://galilai-group.github.io/stable-envs/environments/navigation/) | 5 | none (`navigation` for SimplePointMaze) |
67
+ | [`ogbench`](https://galilai-group.github.io/stable-envs/environments/ogbench/) | 27 | `ogbench`, or `ogbench-manipulation` for Cube and Scene |
68
+ | [`pusht`](https://galilai-group.github.io/stable-envs/environments/pusht/) | 2 | `pusht` |
69
+ | [`pyflyt`](https://galilai-group.github.io/stable-envs/environments/pyflyt/) | 1 | `rocket` |
70
+ | [`roadster`](https://galilai-group.github.io/stable-envs/environments/roadster/) | 5 | `roadster` |
71
+ | **Total** | **80** | |
72
+
73
+ ## Examples
74
+
75
+ - [`examples/`](https://github.com/galilai-group/stable-envs/blob/main/examples/README.md): short scripts for rendering, batching, action sequences and domain randomization.
76
+ - [`examples/lewm/`](https://github.com/galilai-group/stable-envs/blob/main/examples/lewm/README.md): train and evaluate stable-worldmodel's LeWM world model on PushT, with frames that `env.render` draws on the training device from stored states.
77
+
78
+ ## Documentation
79
+
80
+ The full documentation is at [galilai-group.github.io/stable-envs](https://galilai-group.github.io/stable-envs/).
81
+
82
+ ## Questions
83
+
84
+ Open an [issue](https://github.com/galilai-group/stable-envs/issues) on GitHub.
85
+
86
+ ## License
87
+
88
+ MIT, except the three PushT rasterizer files that port pygame's drawing routines, which are LGPL-2.1-or-later. See [LICENSE](https://github.com/galilai-group/stable-envs/blob/main/LICENSE) and [THIRD_PARTY_NOTICES.md](https://github.com/galilai-group/stable-envs/blob/main/THIRD_PARTY_NOTICES.md).
@@ -0,0 +1,235 @@
1
+ # Third-party notices
2
+
3
+ ## envX TwoRoom
4
+
5
+ `stable_envs/envs/navigation/tworoom_jax.py` adapts the collision rules and integration
6
+ logic in `envx/tworooms/geometry.py` and `envx/tworooms/environment.py` from
7
+ [fracapuano/envX](https://github.com/fracapuano/envX) at commit
8
+ `d26c817c1124229c819be574f137cd68bda4380a` (Copyright 2026 Francesco Capuano, Apache-2.0).
9
+ Modifications support batched Variation, boundary rounding and DLPack exchange with Torch.
10
+ Shared navigation code handles masked steps, observations and reset/State/task contracts.
11
+ envX is not a runtime dependency.
12
+ The Apache license is included in `licenses/APACHE-2.0.txt` and distributed with the package.
13
+
14
+ ## envX Reacher
15
+
16
+ `stable_envs/envs/dmcontrol/simulation/reacher_mjx.py` adapts `src/envx/reacher/env.py`
17
+ from the envX commit above under Apache-2.0.
18
+
19
+ ## DeepMind Control Suite
20
+
21
+ `stable_envs/envs/dmcontrol/simulation/mjwarp_tasks.py`, `batch.py`, `first_family.py` and `humanoid.py`
22
+ adapt task observations and reward rules from the
23
+ [DeepMind Control Suite](https://github.com/google-deepmind/dm_control/tree/main/dm_control/suite) of
24
+ dm-control 1.0.50 (Copyright 2017 The dm_control Authors, Apache-2.0) to batched NumPy and Torch arrays.
25
+ dm_control is a runtime dependency of the `dmcontrol` extra; these adaptations do not import its task code.
26
+ The Apache-2.0 license text is distributed in `licenses/APACHE-2.0.txt`; the copyright notices
27
+ above apply to these adaptations.
28
+
29
+ ## envX PushT
30
+
31
+ `stable_envs/envs/pusht/simulation/jax_physics.py` adapts
32
+ `src/envx/pusht/physics.py`
33
+ from the envX commit above under Apache-2.0. `numba_physics.py` and `triton_physics.py` in the same
34
+ directory port that adaptation to Numba and Triton.
35
+
36
+ ## Munk2D
37
+
38
+ The PushT physics ports in `stable_envs/envs/pusht/simulation/` port parts of
39
+ [Munk2D](https://github.com/viblo/Munk2D) at commit `ade7ed72849e60289eefb7a41e79ae6322fefaf3`, the
40
+ Chipmunk2D fork that pymunk 7.2.0 builds: the wall contacts (`SegmentToPoly` and `ContactPoints` from
41
+ `src/cpCollision.c`), the arbiter contact cache (`src/cpArbiter.c`, `src/cpSpaceStep.c`) and the
42
+ bounding-box tree broadphase (`src/cpBBTree.c`, in `numba_broadphase.py` and `triton_broadphase.py`).
43
+ Munk2D is MIT-licensed ("Copyright (c) 2025 Victor Blomqvist, Copyright (c) 2007-2024 Scott Lembcke and
44
+ Howling Moon Software"). The license text is distributed in `licenses/Munk2D-MIT.txt`.
45
+
46
+ ## Craftax
47
+
48
+ The `craftax` family (`stable_envs/envs/craftax/`) runs
49
+ [Craftax](https://github.com/MichaelTMatthews/Craftax), which is MIT-licensed ("Copyright (c) 2024
50
+ Michael Matthews"), as an external dependency. Its simulator, renderer and textures are not copied
51
+ here; frames are the pixel observations Craftax computes. The per-lane key handling and the uint8
52
+ frame scaling follow stable-worldmodel's `stable_worldmodel/envs/craftax/craftax.py` at commit
53
+ `21446f1ede6d5284e981bd7b47f432b994e6d812` (MIT).
54
+
55
+ ## Miniworld
56
+
57
+ The `miniworld` family (`stable_envs/envs/miniworld/`) runs `MovingBlockWorld` from
58
+ [hlillemark/Miniworld](https://github.com/hlillemark/Miniworld), a fork of Farama's
59
+ [Miniworld](https://github.com/Farama-Foundation/Miniworld) (Apache-2.0), as an external dependency, at
60
+ the head of its `flowm_release` branch, the code frozen for the Flow Equivariant World Models paper. Its
61
+ renderer and textures are not copied here. `stable_envs/envs/miniworld/simulation/kernel_cpu.py`,
62
+ `kernel_torch.py` and `kernel_triton.py` port the step rules of `MiniWorldEnv.step` and
63
+ `MovingBlockWorld.step` to Numba, Torch and Triton. Modifications: batched over environments, and the reset
64
+ draws from a counter-based generator instead of the source's NumPy generator. The Apache-2.0 license text is
65
+ distributed in `licenses/APACHE-2.0.txt`. The `flowm` preset and the heading handling follow the
66
+ fork's `scripts/generate_videos.py` at commit `bc7972050155b67e242c07bfdccfe1eeddbf9882`.
67
+
68
+ ## pygame drawing routines (LGPL)
69
+
70
+ `stable_envs/envs/pusht/raster.py`, `raster_cpu.py` and `raster_device.py` port the
71
+ `draw_fillpoly`, `draw_circle_filled`, `draw_line_width` and `draw_aaline` routines of
72
+ `src_c/draw.c` from [pygame](https://github.com/pygame/pygame) 2.6.1
73
+ (Copyright (C) 2000-2001 Pete Shinners, GNU Library General Public License version 2 or later).
74
+ Modifications: the routines are batched over frames, evaluated only at the pixels that the resize reads,
75
+ and run in Numba and Torch. These three files are licensed under LGPL-2.1-or-later, not MIT; each file
76
+ starts with an SPDX line that says so. The license text is in `licenses/LGPL-2.1.txt`.
77
+ pygame is not a runtime dependency of these files.
78
+
79
+ ## SDL_gfx drawing rules
80
+
81
+ `stable_envs/render/gfxdraw/` reimplements in Torch the integer rasterization and
82
+ packed-channel alpha-blending rules of SDL_gfx by Andreas Schiffler, which pygame's
83
+ `gfxdraw` module uses. Upstream [SDL2_gfx](https://www.ferzkopp.net/wordpress/2016/01/02/sdl_gfx-sdl2_gfx/)
84
+ is licensed under the zlib license; the copy bundled in pygame (`src_c/SDL_gfx/`) is
85
+ marked LGPL. No SDL_gfx source is included.
86
+
87
+ ## stable-worldmodel
88
+
89
+ Some modules are adapted from
90
+ [stable-worldmodel](https://github.com/galilai-group/stable-worldmodel/tree/21446f1ede6d5284e981bd7b47f432b994e6d812)
91
+ at commit `21446f1ede6d5284e981bd7b47f432b994e6d812`. Its authors are Lucas Maes,
92
+ Quentin Le Lidec, Randall Balestriero and contributors. It is MIT-licensed
93
+ ("Copyright (c) 2026 GalilAI-group").
94
+
95
+ | Module in stable-envs | Source in stable-worldmodel |
96
+ |---|---|
97
+ | `stable_envs/spaces.py` | `stable_worldmodel/spaces.py` |
98
+ | `stable_envs/envs/pusht/simulation/task.py` | `stable_worldmodel/envs/pusht/env.py`, `env_discrete.py` |
99
+ | `stable_envs/envs/pusht/simulation/quantizer.py` | `stable_worldmodel/envs/quantizer.py` |
100
+ | `stable_envs/envs/pusht/draw.py` | `stable_worldmodel/envs/utils.py` (drawing subset) |
101
+ | `stable_envs/envs/rocket/simulation/task.py` | `stable_worldmodel/envs/rocket_landing/pyflyt_rocketlanding.py` |
102
+
103
+ The adapted code has no runtime import of stable-worldmodel. Physics stays in the
104
+ external dependencies under their own licenses: Pymunk/Munk2D (MIT) for PushT, and
105
+ PyFlyt (MIT) with PyBullet (zlib) for Rocket. No native physics code is copied here.
106
+
107
+ MIT permission notice for the adapted code follows:
108
+
109
+ Permission is hereby granted, free of charge, to any person obtaining a copy
110
+ of this software and associated documentation files (the "Software"), to deal
111
+ in the Software without restriction, including without limitation the rights
112
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
113
+ copies of the Software, and to permit persons to whom the Software is
114
+ furnished to do so, subject to the following conditions:
115
+
116
+ The above copyright notice and this permission notice shall be included in all
117
+ copies or substantial portions of the Software.
118
+
119
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
120
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
121
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
122
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
123
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
124
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
125
+ SOFTWARE.
126
+
127
+ ## MS-Human-700
128
+
129
+ The `mshuman` family (`stable_envs/envs/mshuman/`) loads the locomotion model of
130
+ [MS-Human-700](https://github.com/LNSGroup/MS-Human-700) at commit
131
+ `2d686957aefd5739cf4d2859a6acfd94c8f84400` (Apache-2.0). The MJCF and its assets are fetched at
132
+ runtime, not vendored here; `MSHumanLocomotion` steps and draws them through MuJoCo Warp and MuJoCo.
133
+ The Apache license is included in `licenses/APACHE-2.0.txt` and distributed with the package.
134
+
135
+ ## MuJoCo
136
+
137
+ `stable_envs/render/mujoco_scene.py` and `stable_envs/render/mujoco_raster.py` follow MuJoCo's classic
138
+ fixed-function OpenGL renderer (`src/render/render_gl3.c`, `src/render/render_context.c`) of
139
+ [MuJoCo](https://github.com/google-deepmind/mujoco) 3.17.0 (Copyright 2021 DeepMind Technologies Limited,
140
+ Apache-2.0). `stable_envs/envs/fetch/raster.py` and `stable_envs/envs/fetch/transparency.py` follow the same
141
+ renderer at MuJoCo 3.11.0. Modifications: the scene extraction, lighting, shadow map and translucent-geom
142
+ ordering are reimplemented in NumPy, Numba and Warp to draw batches of frames on CPU or CUDA. MuJoCo is a
143
+ runtime dependency of the MuJoCo families; no MuJoCo C source is included. The Apache-2.0 license text is
144
+ distributed in `licenses/APACHE-2.0.txt`.
145
+
146
+ ## MuJoCo Warp
147
+
148
+ [MuJoCo Warp](https://github.com/google-deepmind/mujoco_warp) 3.12.0 and 3.17.0 (Apache-2.0; "Copyright 2025 The
149
+ Newton Developers" in `smooth.py`, "Copyright 2026 The Newton Developers" in `render.py` and `render_util.py`) is
150
+ adapted in these files:
151
+
152
+ | Module in stable-envs | Source in MuJoCo Warp |
153
+ |---|---|
154
+ | `stable_envs/_execution/mjwarp_fused.py` | `mujoco_warp/_src/smooth.py` (`com_pos`, `crb`, `_rne_cfrc_backward`) |
155
+ | `stable_envs/_execution/mjwarp_tree.py` | `mujoco_warp/_src/smooth.py` (kinematics, `com_pos`, `com_vel`, `crb`, RNE) |
156
+ | `stable_envs/render/mjwarp/__init__.py` | `mujoco_warp/_src/render_util.py` (`create_warp_texture`), `mujoco_warp/_src/render.py` (`pack_rgba_to_uint32`) |
157
+ | `stable_envs/envs/dmcontrol/trackcom_reflection.py` | `mujoco_warp/_src/render.py` (ray cast, lighting and texture sampling of the reflected rays) |
158
+ | `stable_envs/render/cpu3d.py`, `stable_envs/render/cpu_raster/scene3d.py` | `mujoco_warp/_src/render.py` (shading rules) |
159
+
160
+ Modifications: the tree passes are fused into one launch per pass or one thread block per world, the texture
161
+ upload is shared between textures and can be downsampled, the RGB packing rounds instead of truncating, and the
162
+ shading rules are reimplemented in Torch and Numba for CPU. MuJoCo Warp is a runtime dependency of the CUDA
163
+ backends. The Apache-2.0 license text is distributed in `licenses/APACHE-2.0.txt`.
164
+
165
+ ## PyFlyt
166
+
167
+ `stable_envs/envs/rocket/simulation/numba_physics.py` and `numba_cuda_physics.py` port the Rocket landing
168
+ physics and task of [PyFlyt](https://github.com/jjshoots/PyFlyt) 0.29.0 (`PyFlyt/core/drones/rocket.py`,
169
+ `PyFlyt/gym_envs/rocket_envs/rocket_base_env.py`, `rocket_landing_env.py`, MIT). Modifications: the forces
170
+ and the task logic are rewritten as Numba CPU and CUDA kernels that step many environments in parallel.
171
+ PyFlyt is a runtime dependency of the `rocket` extra for `simulation_backend="pybullet"`. The PyFlyt 0.29.0
172
+ license file has no copyright line; its text is distributed in `licenses/PyFlyt-MIT.txt`.
173
+
174
+ ## Bullet, PyBullet and TinyRenderer
175
+
176
+ `stable_envs/envs/rocket/tiny_raster.py` is an altered Numba port of the TinyRenderer of
177
+ [Bullet](https://github.com/bulletphysics/bullet3) as built in pybullet 3.2.7
178
+ (`examples/TinyRenderer/our_gl.cpp`, `TinyRenderer.cpp`, `model.cpp`,
179
+ `TinyRendererVisualShapeConverter.cpp`) and of the convex
180
+ hull that Bullet builds for URDF cylinders (`btShapeHull`, `HullLibrary`). `stable_envs/envs/rocket/raster.py`,
181
+ `stable_envs/envs/rocket/render.py` and the TinyRenderer lighting in `stable_envs/render/nvdiff.py` follow the
182
+ same renderer. `stable_envs/envs/rocket/simulation/numba_physics.py` and `numba_cuda_physics.py` follow
183
+ Bullet's single-body Featherstone integration and multibody contact solver. These files are altered versions:
184
+ they are not the original Bullet software. Modifications: the arithmetic is rewritten in Numba and
185
+ CUDA to draw and step many environments in parallel. Bullet and pybullet are licensed under the zlib license
186
+ (pybullet authors: Erwin Coumans, Yunfei Bai, Jasmine Hsu). pybullet is a runtime dependency of the `rocket`
187
+ extra. The license text is distributed in `licenses/Bullet-zlib.txt`.
188
+
189
+ ## Gymnasium
190
+
191
+ `stable_envs/envs/classic_control/simulation/batched.py`, `triton_step.py` and `device.py` port the `step`
192
+ functions of the classic-control environments of [Gymnasium](https://github.com/Farama-Foundation/Gymnasium)
193
+ 1.3.0 (`gymnasium/envs/classic_control/`, MIT, "Copyright (c) 2016 OpenAI, Copyright (c) 2022 Farama
194
+ Foundation"). `stable_envs/render/gfxdraw/` draws the frames of their `render` functions. Modifications: the
195
+ steps run on batches in NumPy, Torch and Triton in the source's operation order. Gymnasium is a runtime
196
+ dependency, and CPU resets stay in Gymnasium. The license text is distributed in `licenses/Gymnasium-MIT.txt`.
197
+
198
+ ## Gymnasium-Robotics
199
+
200
+ `stable_envs/envs/fetch/simulation/batch.py`, `mjwarp.py` and `observations.py` port the step, reset and
201
+ observation code of the Fetch environments of
202
+ [Gymnasium-Robotics](https://github.com/Farama-Foundation/Gymnasium-Robotics) 1.4.2
203
+ (`gymnasium_robotics/envs/fetch/`, MIT, "Copyright (c) 2022 Farama Foundation"). Modifications: the step and
204
+ reset run on arrays of environments, with MuJoCo in one batched call or MuJoCo Warp on CUDA.
205
+ Gymnasium-Robotics is a runtime dependency of the `robotics` extra. The license text is distributed in
206
+ `licenses/Gymnasium-Robotics-MIT.txt`.
207
+
208
+ ## OGBench
209
+
210
+ `stable_envs/envs/ogbench/simulation/manipulation_control.py`, `manipulation_batch.py`,
211
+ `manipulation_warp.py` and `maze_batch.py` port the controller, step, observation and task code of
212
+ [OGBench](https://github.com/seohongpark/ogbench) 1.2.1 (`ManipSpaceEnv`, the locomotion maze
213
+ environments, MIT, "Copyright (c) 2024 OGBench Authors"). Modifications: the code runs on batches of
214
+ environments, with MuJoCo in one batched call or MuJoCo Warp and Warp kernels on CUDA. OGBench is a runtime
215
+ dependency of the `ogbench` extras. The license text is distributed in `licenses/OGBench-MIT.txt`.
216
+
217
+ ## NumPy random
218
+
219
+ `stable_envs/envs/rocket/simulation/numba_physics.py` ports NumPy's `PCG64.next_uint64` and the ziggurat
220
+ `Generator.standard_normal`, and `stable_envs/envs/ogbench/simulation/maze_batch.py` ports the MT19937
221
+ `RandomState` seeding, generation, `uniform` and `randint`, from [NumPy](https://github.com/numpy/numpy)
222
+ (`numpy/random/`). NumPy is BSD-3-Clause ("Copyright (c) 2005-2025, NumPy Developers"), and its
223
+ `numpy/random` module is dual-licensed NCSA and BSD-3-Clause ("Copyright (c) 2019 Kevin Sheppard");
224
+ MT19937 is by Makoto Matsumoto and Takuji Nishimura, PCG64 by Melissa O'Neill. Modifications: the generators
225
+ are rewritten in Numba and NumPy to draw the same numbers for many environments at once. NumPy is a runtime
226
+ dependency. The license texts are distributed in `licenses/NumPy-BSD-3-Clause.txt` and
227
+ `licenses/NumPy-random-NCSA-BSD-3-Clause.txt`.
228
+
229
+ ## OpenCV
230
+
231
+ `stable_envs/envs/pusht/raster.py` and `raster_cpu.py` reimplement the fixed-point
232
+ `cv2.resize` `INTER_LINEAR` arithmetic of [OpenCV](https://github.com/opencv/opencv) 5.0
233
+ (opencv-python-headless 5.0.0.93, Apache-2.0). Modifications: only the offsets and 11-bit weights are computed,
234
+ in integer Torch and Numba code. OpenCV is a runtime dependency of the `pusht` extra; no OpenCV
235
+ source is included. The Apache-2.0 license text is distributed in `licenses/APACHE-2.0.txt`.