fix a small bug in computer_13 action space

This commit is contained in:
rhythmcao
2024-06-11 14:22:31 +08:00
parent 1c50770817
commit c121869219
2 changed files with 2 additions and 2 deletions

View File

@@ -144,7 +144,7 @@ class PythonController:
return return
action_type = action["action_type"] action_type = action["action_type"]
parameters = action["parameters"] if "parameters" in action else {} parameters = action["parameters"] if "parameters" in action else {param: action[param] for param in action if param != 'action_type'}
move_mode = random.choice( move_mode = random.choice(
["pyautogui.easeInQuad", "pyautogui.easeOutQuad", "pyautogui.easeInOutQuad", "pyautogui.easeInBounce", ["pyautogui.easeInQuad", "pyautogui.easeOutQuad", "pyautogui.easeInOutQuad", "pyautogui.easeInBounce",
"pyautogui.easeInElastic"]) "pyautogui.easeInElastic"])

View File

@@ -236,7 +236,7 @@ class DesktopEnv(gym.Env):
info = {} info = {}
# handle the special actions # handle the special actions
if action in ['WAIT', 'FAIL', 'DONE']: if action in ['WAIT', 'FAIL', 'DONE'] or (type(action) == dict and action['action_type'] in ['WAIT', 'FAIL', 'DONE']):
if action == 'WAIT': if action == 'WAIT':
time.sleep(pause) time.sleep(pause)
elif action == 'FAIL': elif action == 'FAIL':