mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-22 07:02:19 +00:00
Better error when called on non-discrete action spaces
This commit is contained in:
@@ -9,6 +9,8 @@ import sys, gym
|
||||
|
||||
env = gym.make('LunarLander-v2' if len(sys.argv)<2 else sys.argv[1])
|
||||
|
||||
if not hasattr(env.action_space, 'n'):
|
||||
raise Exception('Keyboard agent only supports discrete action spaces')
|
||||
ACTIONS = env.action_space.n
|
||||
ROLLOUT_TIME = 1000
|
||||
SKIP_CONTROL = 0 # Use previous control decision SKIP_CONTROL times, that's how you
|
||||
|
Reference in New Issue
Block a user