Skip to main content

Render Gymnasium environments in Google Colaboratory

Project description

\n# Gymnasium Rendering for Colaboratory

PyPI download month PyPI - Status PyPI GitHub Open In Colab

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

renderlab-0.1.20230421184209.tar.gz (3.6 kB view details)

Uploaded Source

File details

Details for the file renderlab-0.1.20230421184209.tar.gz.

File metadata

File hashes

Hashes for renderlab-0.1.20230421184209.tar.gz
Algorithm Hash digest
SHA256 3eed6ac47a7fd7e588fbeaa1cfd2c2fa4c26b33f139bcb4d3c7f7674d3c8b9c8
MD5 f4f792bfdafdbf8b72bfb95620d64a6e
BLAKE2b-256 35cb0c3695e4e0eaade228266155e72e00038b77db2f12e2c5ba977830fb2a7a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page