mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-01 14:10:30 +00:00
remove unused render function (#2293)
This commit is contained in:
@@ -1,27 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
import argparse
|
|
||||||
import gym
|
|
||||||
|
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(
|
|
||||||
description="Renders a Gym environment for quick inspection."
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
|
||||||
"env_id",
|
|
||||||
type=str,
|
|
||||||
help="the ID of the environment to be rendered (e.g. HalfCheetah-v2",
|
|
||||||
)
|
|
||||||
parser.add_argument("--step", type=int, default=1)
|
|
||||||
args = parser.parse_args()
|
|
||||||
|
|
||||||
env = gym.make(args.env_id)
|
|
||||||
env.reset()
|
|
||||||
|
|
||||||
step = 0
|
|
||||||
while True:
|
|
||||||
if args.step:
|
|
||||||
env.step(env.action_space.sample())
|
|
||||||
env.render()
|
|
||||||
if step % 10 == 0:
|
|
||||||
env.reset()
|
|
||||||
step += 1
|
|
Reference in New Issue
Block a user