fix a small bug in computer_13 action space
This commit is contained in:
@@ -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"])
|
||||||
|
|||||||
@@ -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':
|
||||||
|
|||||||
Reference in New Issue
Block a user