Improve: fix bugs; add back the cursor in screenshot; add pause in env.step

This commit is contained in:
Timothyxxx
2023-12-02 22:14:50 +08:00
parent e51ef4b91d
commit 487fb8005b
5 changed files with 36 additions and 6 deletions

View File

@@ -10,13 +10,15 @@ def human_agent():
# path_to_vm="/home/yuri/vmware/Ubuntu 64-bit/Ubuntu 64-bit.vmx",
# host="192.168.7.128",
host="http://192.168.13.128:5000",
snapshot_path="base3",
)
# reset the environment to certain snapshot
# observation = env.reset()
observation = env.reset()
done = False
while not done:
for i in range(2):
# action = get_human_action()
# action = {
@@ -24,7 +26,7 @@ def human_agent():
# "click_type": 3,
# }
action = "pyautogui.dragTo(100, 200, button='left')"
action = "pyautogui.moveTo(10, 100)" if i == 0 else "pyautogui.click(button='right')"
observation, reward, done, info = env.step(action)
print("Observation:", observation)