I've been working on similar stuff here for ZShot's[1] Navigator implementation. Once you turn over the stone of "the agent can see a snapshot of current computer state", you keep on finding interesting wrinkles to this problem. In this particular case, the way that they start from a screenshot rather than A11y tree is interesting to me, because if you are proceeding from the standpoint that a button should be clicked, you could start with a cheaper first pass of the tree's view of all buttons.
I've found that, depending on the underlying model, you can do things like start with coarser, low resolution views of the state ( like a tree that may miss certain characteristics ) that lets a model observe at a higher framerate, and give it the opportunity to escalate its view to a higher resolution perception of the screen state. They can ask for more, and depending on your ability to detect stalls, you can opportunistically provide higher resolution views of the screen state if you're not making headway on a task. And when you're doing so, you can label your screenshots with references to the A11y tree, to help connect the dots for underlying models.
The Doom mini example they provide is a great example of all of this sorta falling by the wayside in the face of model latencies however. I've been working on enabling ZShot's navigator implementation being able to "play games" ( truly, just to act at lower latencies ), and the long response times ( ~1-2s ) of models means that even if you can get a click or correct action, in the intervening frame time a number of things have happened that can cause your model to lose causality. I've had to institute "short-term visual memory" ( degraded frame snapshots ) to help keep track of what happened since the last view, and even that can be fraught. ( I should note this is all in the "zero-shot" approach to palying Doom wehre the model is not given a special harness to play the game - I know other people have had a lot more success when wiring in special awareness )
Something that happened while I was testing this with Doom that will always make me laugh is my isntruction to "find a barrel and shoot it". The model entered the world space, gradually navigated towards a barrel, and shot. After shooting, the frame time between the shot and the barrel being absent contained the entire explosion effect, so the next time the model saw the level, the barrel was absolutely gone. The model's rationale? "I shot the gun. When next I saw the level, the barrel was missing. The barrel must be somewhere else in the level", as if the barrel had run off. I got a good laugh out of that one.
I've found that, depending on the underlying model, you can do things like start with coarser, low resolution views of the state ( like a tree that may miss certain characteristics ) that lets a model observe at a higher framerate, and give it the opportunity to escalate its view to a higher resolution perception of the screen state. They can ask for more, and depending on your ability to detect stalls, you can opportunistically provide higher resolution views of the screen state if you're not making headway on a task. And when you're doing so, you can label your screenshots with references to the A11y tree, to help connect the dots for underlying models.
The Doom mini example they provide is a great example of all of this sorta falling by the wayside in the face of model latencies however. I've been working on enabling ZShot's navigator implementation being able to "play games" ( truly, just to act at lower latencies ), and the long response times ( ~1-2s ) of models means that even if you can get a click or correct action, in the intervening frame time a number of things have happened that can cause your model to lose causality. I've had to institute "short-term visual memory" ( degraded frame snapshots ) to help keep track of what happened since the last view, and even that can be fraught. ( I should note this is all in the "zero-shot" approach to palying Doom wehre the model is not given a special harness to play the game - I know other people have had a lot more success when wiring in special awareness )
Something that happened while I was testing this with Doom that will always make me laugh is my isntruction to "find a barrel and shoot it". The model entered the world space, gradually navigated towards a barrel, and shot. After shooting, the frame time between the shot and the barrel being absent contained the entire explosion effect, so the next time the model saw the level, the barrel was absolutely gone. The model's rationale? "I shot the gun. When next I saw the level, the barrel was missing. The barrel must be somewhere else in the level", as if the barrel had run off. I got a good laugh out of that one.
[1]: https://zshot-app.com , https://zshot-cli.com