Improve: fix bugs; add back the cursor in screenshot; add pause in env.step
This commit is contained in:
@@ -85,10 +85,13 @@ class DesktopEnv(gym.Env):
|
||||
observation = self._get_obs()
|
||||
return observation
|
||||
|
||||
def step(self, action):
|
||||
def step(self, action, pause=0.5):
|
||||
# todo: support both the action space of our-designed space and the executable code space in pyautogui
|
||||
# Our action space is the set of all possible python commands insides `pyautogui`
|
||||
self.controller.execute_python_command(action)
|
||||
|
||||
# todo: maybe for the better here we need to add a logic to wait until the rendering is done
|
||||
time.sleep(pause)
|
||||
observation = self._get_obs()
|
||||
reward = 0 # todo: Define reward calculation for each example
|
||||
done = False # todo: Define episode termination condition for each example
|
||||
|
||||
Reference in New Issue
Block a user