Open tanishqackerman opened 12 months ago
For the latest gym version, please see the example here - https://gymnasium.farama.org/
Okay, so should I use gymnasium instead of gym or are they both the same thing?
And also one more help, can you tell how to install packages like stable-baselines[extra], gymnasium[box2d] because installing them using pip shows no package found, I mean packages with square brackets [ ].
please help, just a beginner
Gymnasium is a maintained version of Gym
pip install "stable-baselines[extra]"
should be all you require
I realized I had to just change it.
before
import gymnasium as gym
env = gym.make("LunarLander-v2")
after
import gymnasium as gym
env = gym.make("LunarLander-v2", render_mode="human")
I am a beginner in RL and running env.render() doesn't open any environment window, please help.
environment_name = "CartPole-v1" env = gym.make(environment_name) episodes = 5 for episode in range(1, episodes + 1): state = env.reset() done = False score = 0
env.close()