Render Gymnasium environments in Google Colaboratory
Project description
\n# Gymnasium Rendering for Colaboratory
For the archived repository for use alongside OpenAI Gym, see colabgymrender
Installation
pip install renderlab
Example
import gymnasium as gym
import renderlab as rl
env = gym.make("CartPole-v1", render_mode = "rgb_array")
env = rl.RenderFrame(env, "./output")
observation, info = env.reset()
while True:
action = env.action_space.sample()
observation, reward, terminated, truncated, info = env.step(action)
if terminated or truncated:
break
env.play()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file renderlab-0.1.20230421184216-py3-none-any.whl
.
File metadata
- Download URL: renderlab-0.1.20230421184216-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a5880b75dd026a534eee47c17b18cd82f0cab6c04355f705f93f7e124bd2028 |
|
MD5 | 9928aab0a1d2af92dc140014864aa6a8 |
|
BLAKE2b-256 | 7643c4f00b499d795417a26171629dabf995bfec61364a1080963678ac1a891c |