diff --git a/main.py b/main.py index a724c66f..e7c3feec 100644 --- a/main.py +++ b/main.py @@ -1,11 +1,16 @@ -import gymnasium as gym -env = gym.make("LunarLander-v2", render_mode="human") -observation, info = env.reset(seed=42) -for _ in range(1000): - action = env.action_space.sample() # this is where you would insert your policy - observation, reward, terminated, truncated, info = env.step(action) +import metadrive - if terminated or truncated: - observation, info = env.reset() +# Initialize the MetaDrive environment +env = metadrive.MetaDriveEnv() -env.close() \ No newline at end of file +# Reset the environment to start a new episode +env.reset() + +# Run the environment for a few steps +for _ in range(10): + env.step(env.action_space.sample()) # Take random actions + +print("Hello, MetaDrive World!") # Print a greeting + +# Close the environment after use +env.close() diff --git a/requirements.txt b/requirements.txt index c60d1b47..4ffb0465 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,5 @@ +metadrive +ray +rlib +ray[rllib] metadrive-simulator \ No newline at end of file