mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-20 05:52:03 +00:00
LunarLanderContinuous (#307)
* New LunarLanderContinuous, LunarLander-v2 remains exactly the same, no version bump. * keyboard_agent.py works again.
This commit is contained in:
committed by
Greg Brockman
parent
c97551e8e5
commit
ee2c0243c0
@@ -22,13 +22,13 @@ def key_press(key, mod):
|
||||
global human_agent_action, human_wants_restart, human_sets_pause
|
||||
if key==0xff0d: human_wants_restart = True
|
||||
if key==32: human_sets_pause = not human_sets_pause
|
||||
a = key - ord('0')
|
||||
a = int( key - ord('0') )
|
||||
if a <= 0 or a >= ACTIONS: return
|
||||
human_agent_action = a
|
||||
|
||||
def key_release(key, mod):
|
||||
global human_agent_action
|
||||
a = key - ord('0')
|
||||
a = int( key - ord('0') )
|
||||
if a <= 0 or a >= ACTIONS: return
|
||||
if human_agent_action == a:
|
||||
human_agent_action = 0
|
||||
|
Reference in New Issue
Block a user