Skip to content

ryanrudes/renderlab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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()

About

Render Gymnasium environments in Google Colaboratory

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Languages