You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to run the CartPole enviornment, I run into this error:
Traceback (most recent call last):
File "train.py", line 349, in
main(**vars(args))
File "train.py", line 289, in main
env, obs_dim, act_dim = init_gym(env_name)
File "train.py", line 72, in init_gym
act_dim = env.action_space.shape[0]
IndexError: tuple index out of range
After a little bit of digging I had to add self.action_space = np.array([1]) to line 53 in cartpole_bullet.py which does solve the error so that the environment can run, but I'm not sure if it is causing some training issues because it won't train after 1000 episodes. Is there an official fix to this problem?
The text was updated successfully, but these errors were encountered:
You likely want to use CartPoleContinuousBulletEnv-v0 instead, can you try it?
I just ran python3 train CartPoleContinuousBulletEnv-v0
and it trains fine:
thank you, I had to define act_dim =1 and obs_dim = 4 if env_name=='CartPoleBulletEnv-v1' in init_gym(env_name) function in train.py and that got it to work
When I try to run the CartPole enviornment, I run into this error:
Traceback (most recent call last):
File "train.py", line 349, in
main(**vars(args))
File "train.py", line 289, in main
env, obs_dim, act_dim = init_gym(env_name)
File "train.py", line 72, in init_gym
act_dim = env.action_space.shape[0]
IndexError: tuple index out of range
After a little bit of digging I had to add self.action_space = np.array([1]) to line 53 in cartpole_bullet.py which does solve the error so that the environment can run, but I'm not sure if it is causing some training issues because it won't train after 1000 episodes. Is there an official fix to this problem?
The text was updated successfully, but these errors were encountered: