Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Build a Recoverable Android Game Automation Loop with State, Pause, and Resume

说明与用途

通过将导航、观察和处理分离,使用显式状态转换、暂停、受限重试和证据捕获,构建可恢复的 Android 游戏自动化循环。

问题

Linear game automation macros fail when screen timing or target positions change, causing drift or missed actions.

结果

Automation becomes resilient to timing and target changes, reduces drift, and provides reproducible evidence for failures.

工作流

  • 1. Define a Navigation Map service with state, progress, and position data.
  • 2. Implement a small state machine (idle, moving, paused, completed, stuck, lost, error).
  • 3. In the orchestration loop, query router.status() to decide actions based on state and observations.
  • 4. When a target is detected, pause navigation, re-observe if needed, handle the target, verify a concrete postcondition, then resume navigation.
  • 5. Keep retries bounded at the narrowest layer with a maximum attempt count and exit state.
  • 6. Separate stuck time from handling time so pauses and waits do not count as failures.
  • 7. On lost or error states, capture evidence (screenshot, map ID, progress, position, confidence, etc.).
  • 8. Test all edge cases: target during movement, invalid target after pause, pause without active route, duplicate continue, map switch, stop when idle, completion, confidence collapse, forbidden target, recovery success.
  • 9. Use UI Automator’s performActionAndWait or similar condition-based synchronization instead of arbitrary sleeps.

证据

The fragile version of Android game automation is a long linear macro: move -> wait -> detect -> tap -> wait -> move -> repeat

来源

Use explicit state transitions

来源

Pause before acting on a moving screen

来源

  • 记录日期: 2026-09-21T15:30:43.600Z