Add impress examples; remove the auto-saving pyautogui commands change to libreoffice pre-setting

This commit is contained in:
Timothyxxx
2024-01-29 21:34:58 +08:00
parent 17514907d9
commit 343813a29b
29 changed files with 163 additions and 44 deletions

24
main.py
View File

@@ -46,12 +46,12 @@ def human_agent():
Runs the Gym environment with human input.
"""
with open("evaluation_examples/examples/libreoffice_writer/72b810ef-4156-4d09-8f08-a0cf57e7cefe.json", "r") as f:
with open("evaluation_examples/examples/libreoffice_writer/6a33f9b9-0a56-4844-9c3f-96ec3ffb3ba2.json", "r") as f:
example = json.load(f)
example["snapshot"] = "base18"
example["snapshot"] = "exp_v1"
env = DesktopEnv(
path_to_vm=r"D:\Ubuntu\Ubuntu\Ubuntu.vmx",
path_to_vm=r"C:\Users\tianbaox\Documents\Virtual Machines\Ubuntu\Ubuntu.vmx",
action_space="computer_13",
task_config=example
)
@@ -60,14 +60,14 @@ def human_agent():
done = False
trajectory = [
{
"action_type": "MOVE_TO",
"parameters": {
"x": 754,
"y": 1057
}
},
{"action_type": "CLICK", "parameters": {"button": "right", "num_clicks": 1}}
# {
# "action_type": "MOVE_TO",
# "parameters": {
# "x": 754,
# "y": 1057
# }
# },
# {"action_type": "CLICK", "parameters": {"button": "right", "num_clicks": 1}}
]
for i in range(len(trajectory)):
@@ -91,7 +91,7 @@ def human_agent():
logger.info("The episode is done.")
break
#input("PAUSING")
input("PAUSING")
result = env.evaluate()
logger.info("Result: %.2f", result)