def run_one_with_input(self): ki = KeyboardInput() ki.add_to_window(game.env.unwrapped.viewer.window) def get_action(): self.game.render() return ki.get_action() return self._run_one(get_action)
def run_with_input(self): ki = KeyboardInput() ki.add_to_window(game.env.unwrapped.viewer.window) def get_action(): self.game.render() return ki.get_action() for loss, cumulative in self._run(get_action): yield loss, cumulative