mirror of
https://github.com/kuhyx/WUT_Computer_Science.git
synced 2026-07-04 19:03:01 +02:00
10 lines
319 B
Python
10 lines
319 B
Python
from metadrive.envs.metadrive_env import MetaDriveEnv
|
|
import gymnasium as gym
|
|
|
|
env = MetaDriveEnv(config={"use_render": True})
|
|
obs, info = env.reset()
|
|
for i in range(1000):
|
|
obs, reward, terminated, truncated, info = env.step(env.action_space.sample())
|
|
if terminated or truncated:
|
|
env.reset()
|
|
env.close() |