Improve: fix bugs; add back the cursor in screenshot; add pause in env.step
This commit is contained in:
8
main.py
8
main.py
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user