Den

CASE STUDY 02

autospinner

Solves Tower of Saviors orb boards in a browser or on Android, then executes the drag.

VANILLA JS · CHROME EXTENSION · BEAM SEARCHBROWSER + ANDROIDSOURCE ON GITHUB  (opens in new tab)

OBJECT · READ → SOLVE → SPINHOVER TO OPEN · CLICK TO PLAN A DRAGTAP TO PLAN A DRAG
REAL CAPTURE · demo.mp4
demo.mp4 — the browser extension reading the board, solving it, dragging the route and resolving the combos. Plays inline, muted and looped.
REAL CAPTURE · phone-demo.mp4
phone-demo.mp4 — the Android path: recognition to MaaTouch in the live game. Plays inline, muted and looped.

THE PROJECT

WHAT IT DOES

Solves Tower of Saviors orb boards in a browser or on Android, then executes the drag.

WHY I BUILT IT

Choosing and dragging an orb route by hand was the problem I wanted to automate.

HOW IT WORKS

READ → SOLVE → DRAG

Two targets share one solver. Only how the board is read and how the drag is performed change between them.

  1. 01BROWSERRead the board

    Takes the orb grid straight from the simulator's canvas pixels.

  2. 02ANDROIDRead the board

    Classifies screenshot patches of the live game into orb types, and tracks sealed, shielded, cursed and blocked cells.

  3. 03SHAREDSolve

    Beam search over drag paths, each scored by an exact combo, gravity and cascade simulation.

  4. 04BROWSERDrag

    The Chrome extension performs the route in the simulator.

  5. 05ANDROIDDrag

    ADB and MaaTouch perform the route on the phone, after dry-run and stale-board checks.

SCENARIOS

REAL PHONE RECORDINGS

CHAPTER 1

Learning the rules

CHAPTER 2

Working within limits

CHAPTER 3

Changing the board

THE RULE

WHAT WE ASKED

WHAT HAPPENED

THE ENGINEERING

01

Cascade-aware search

Drag paths are scored by simulating the whole resolution — combos, gravity and cascades — not by matching only the first clear. Parallel beam search explores the routes, and constructive planners take over when the beam comes up empty.

02

One solver, two targets

The same solving core drives a Chrome simulator and the real Android game. Reading the board differs — canvas pixels in the browser, classified screenshot patches on the phone — and so does the drag, but the decision is shared.

03

Rules, not routes

The phone runner composes stage rules and card effects instead of hardcoding a route: clear-all demands, required or forbidden rune types, pinned endpoints, touch conversion, and rearrange mode with several physical drags before the board resolves.

STACK

VANILLA JS

No build step and no package dependencies. A deterministic regression suite covers the solver.

CHROME EXTENSION

Runs the solver against the browser simulator, reading its canvas and performing the drag.

BEAM SEARCH

Parallel search over drag paths, scored by full cascade simulation.