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 Distribution
File details
Details for the file renderlab-0.1.20230421183652.tar.gz
.
File metadata
- Download URL: renderlab-0.1.20230421183652.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0a41eeb3ed744efcff07079ab24516a02c1831cd4f87b321e74395fbc631abb |
|
MD5 | 695b18e4804ea88a934c9a5258f0885e |
|
BLAKE2b-256 | a17d4eb71b476a996d3fc2d5fc6979c8c8e92caf3ca390e9a325f68cec006bb7 |