Initialize evaluation protocols and examples; Implement one kind of eval; Update requirements

This commit is contained in:
Timothyxxx
2023-12-12 18:10:55 +08:00
parent 4b3af14b8f
commit 2ca36109b5
8 changed files with 139 additions and 50 deletions

47
main.py
View File

@@ -15,8 +15,10 @@ def human_agent():
path_to_vm=r"""C:\Users\tianbaox\Documents\Virtual Machines\Win10\Win10.vmx""",
# path_to_vm="/home/yuri/vmware/Ubuntu 64-bit/Ubuntu 64-bit.vmx",
action_space="computer_13",
snapshot_path="base_setup2",
# config=example["config"],
snapshot_path="base_setup3",
instruction=example["instruction"],
config=example["config"],
evaluator=example["evaluator"]
)
# reset the environment to certain snapshot
@@ -31,43 +33,7 @@ def human_agent():
"y": 1057
}
},
{"action_type": "CLICK", "parameters": {"button": "right", "num_clicks": 1}},
{
"action_type": "MOVE_TO",
"parameters": {
"x": 754,
"y": 1057
}
},
{
"action_type": "MOVE_TO",
"parameters": {
"x": 754,
"y": 1057
}
},
{
"action_type": "MOVE_TO",
"parameters": {
"x": 754,
"y": 1057
}
},
{
"action_type": "MOVE_TO",
"parameters": {
"x": 754,
"y": 1057
}
},
{
"action_type": "MOVE_TO",
"parameters": {
"x": 754,
"y": 1057
}
}
{"action_type": "CLICK", "parameters": {"button": "right", "num_clicks": 1}}
]
for i in range(len(trajectory)):
@@ -90,6 +56,9 @@ def human_agent():
print("The episode is done.")
break
result = env.evaluate()
print("Result:", result)
env.close()
print("Environment closed.")