A local vision agent that observes a game, presses keys, moves the camera, and clicks loot — then reviews what actually happened.
ScreenQuest explores responsive game control on a Mac using Hordes.io as a visual test environment. It combines screenshot perception, a small typed decision model, a slower vision-language planner, and explicit control rules. All model inference runs locally after the model downloads.
The long-term motivation is more complex games such as World of Warcraft. The current implementation is calibrated for Hordes.io, with a warrior using Slash in slot 1. It is an experimental harness, with demonstrated components and substantial navigation limitations.
Watch / download the 39-second gameplay demo · Architecture · Operator guide · Evidence & video provenance
The video replays genuine saved screenshots at their recorded timing, with cuts between combat, camera control, and a separate pickup test. It is sampled evidence rather than a continuous 30 fps capture. Chat is masked; captions explain the actions. See media provenance.
![]() Act and observe — verify the result of an ability. | ![]() Click and confirm — count a new pickup message. |
| Capability | Observed result | Boundary |
|---|---|---|
| Visual combat loop | Enemy selection, approach and Slash inputs; repeated target HP decreases | Reaching moving targets is inconsistent; HP changes do not prove exclusive damage attribution |
| Camera control | Bounded right-drag yaw and pitch gestures | Camera motion and attacks cannot overlap |
| Coin pickup | One left click followed by the game's “You have picked up 25” message | Verified in a separate pickup-only trial |
| Equipment recognition | Ground-item tooltips recognized in captured frames | Equipment collection has not been verified live |
| Post-run review | Independent OCR of saved numeric HP and pickup messages | Reports observations; does not infer kills from a missing target |
| Improvement loop | One policy parameter changed, re-tested, then confirmed or rejected | Parameter search, not model training; no claim of reliable improvement |
One completed 60-second run, with the game and models running together:
| Measurement | Result |
|---|---|
| Observed decision rate | 8.96 / second |
| Screenshot → posted key event, median | 77.21 ms |
| Screenshot → posted key event, p95 | 92.45 ms |
| Laya decision call, median | 8.17 ms |
| Independently observed HP-drop windows | 10 |
| Camera gestures | 12 |
These are measurements from one run, not a general benchmark or a guarantee. Latency stops at event posting, before the game responds. The slower Qwen planner runs asynchronously. Another 60-second run produced zero verified HP-drop windows. Selected measurements, including the unsuccessful run →
flowchart TD
Game[Visible Hordes.io window] --> Capture[ScreenCaptureKit: latest frame]
Capture --> Vision[Apple Vision OCR + HUD / icon checks]
Capture --> Planner[Qwen3.5 4B / MLX: slow visual proposals]
Vision --> Policy[Combat, camera and loot rules]
Planner --> Policy
Policy --> Laya[Laya / Core ML ANE: typed allowed action]
Laya --> Guard[Fresh-frame, focus and input-overlap checks]
Guard --> Input[Short key pulses / mouse gestures / clicks]
Input --> Game
Vision --> Evidence[Timestamped screenshots + events]
Input --> Evidence
Evidence --> Judge[Independent post-run screenshot review]
Judge --> Coach[One parameter candidate + confirmation trial]
Coach -. bounded policy settings .-> Policy
The key design choice is separating perception from decisions. Laya consumes compact text state and allowed choices; it does not see images. Apple Vision and visual checks produce the fast state, while Qwen supplies slower image-based proposals. Explicit rules often narrow a decision to a single action, so a low Laya latency alone is not evidence of learned gameplay skill.
The fast path never waits for a new Qwen response. Capture and workers keep the latest result, and the dispatcher revalidates the screen immediately before posting input. A separate judge reads the recorded evidence after all inputs have been released. Detailed architecture →
Requirements: Apple Silicon Mac, macOS 15+, Python 3.11–3.13, uv, regular Google Chrome, and a Hordes.io character. The tested machine has 48 GB unified memory; smaller machines have not been characterized.
git clone https://github.com/DanielTea/screenquest.git
cd screenquest
uv sync --extra desktop --extra fast --group dev
cp configs/fast_config.example.json configs/fast_config.json
# Download the pinned Laya bundle and warm Core ML.
uv run --extra desktop --extra fast python -m screenquest.fast prepare- Open Hordes.io in regular Chrome and sign in manually. Enter the world with a warrior and Slash in slot 1. Keep one game window visible; close chat, menus and inventory.
- Give the application launching Python Screen Recording and Accessibility access in macOS System Settings, then restart that application if requested. Use the existing signed-in Chrome session.
- Calibrate the visible game, then observe without input:
uv run --extra desktop --extra fast python -m screenquest.fast calibrate
./scripts/start-fast.command --seconds 15- Start a bounded interactive trial, then click inside the game when prompted:
./scripts/start-fast.command --execute --seconds 30Stop: press Ctrl-C in the launching terminal, switch away from the game, or create a STOP file in the repository. Remove that file before another run. Inputs are released on exit. Recalibrate after changing the window size or browser toolbars.
The calibration seed is a known warrior HUD, not a universal game detector. Other classes, abilities, UI layouts or games require new templates and policy work. The first Qwen use downloads its model; initial Core ML compilation can take tens of seconds.
./scripts/start-coach.command --execute --rounds 3 --seconds 30The coach compares a baseline with a single timing change, then requires a successful confirmation round before retaining it. It cannot tune away focus, frame-age, health or target-identity checks. Three rounds without verified combat progress stop the session.
# Inspect an existing run; no game input.
uv run --extra desktop --extra fast python -m screenquest.coach review runs/RUN-DIRECTORY
# Targeted pickup test: focus the game with nearby loot visible.
uv run --extra desktop --extra fast python -m screenquest.loot_probe --execute --seconds 25
# Unit and visual regression tests; no gameplay input.
uv run --extra desktop --extra fast pytest -qEvery live run writes events.jsonl, screenshots, timing summaries, and browsable reviews under runs/. Local calibration, model caches, browser profiles and session evidence are excluded from Git. Operating details and troubleshooting →
screenquest/
├── screenquest/ # Python package: controllers, perception, policy and judge
├── configs/ # Portable configuration example; local calibration is ignored
├── scripts/ # macOS launchers and demo rendering
├── assets/ # Calibration templates
├── tests/ # Unit tests, visual fixtures and shared helpers
├── docs/ # Architecture, operations, evidence and demo media
└── .github/workflows/ # Automated quality checks
The root contains only the README, contribution guide, license and project metadata. See the package map for individual modules.
For linting, formatting and tests without loading models, see CONTRIBUTING.md.
- Navigation still fails on some encounters. Better visual tracking and action-conditioned movement estimates are the next priority.
- Only populated, calibrated abilities should be used. This character's slots 2–4 were empty; the agent does not invent abilities.
- Coin collection is demonstrated once. Equipment pickup, health-based retreat and recovery need broader controlled trials.
- A newly visible pickup message is evidence of collection. A posted click alone earns no pickup credit.
- No verified WoW play, quest completion, inventory management, equipping, trading or purchasing is implemented.
- Gameplay perception uses screenshots rather than DOM, memory or network state. OS accessibility is used only for input-focus checks, and the optional original browser harness uses Playwright for browser control.
- Use environments where automation is permitted. ScreenQuest is not affiliated with or endorsed by Hordes.io or Blizzard.
Inspired by the Jev harness discussion. The implementation uses Laya, Laya CoreML, the multilingual ANE bundle, and Qwen3.5 4B for MLX through MLX-VLM.
Original ScreenQuest code is MIT licensed. Models and dependencies keep their own licenses and are downloaded separately. Hordes.io visuals, UI excerpts and gameplay footage belong to their respective rights holders; the code license does not relicense those assets. See third-party notices.


