ghost/tic-tac-toe

Dooz (F-Droid) tic-tac-toe against the computer: new game, play a cell, play several, read the board and result. Offline, no account.

Proven 11.8× fewer tokens Score 41/100 Official hard skill python

Token savings

92% fewer tokens
Tokenswithout671,757with56,878 (92% fewer)
Timewithout55.0 swith68.2 s (24% more time)
Tool callswithout13with4 (69% fewer)

Agent run: finished without the skill, finished with it (not independently checked).

One recorded run each way, claude-haiku-5-5, same phone and same prompt. Watch it in the Before / after tab.

Recorded: new_game · live agent session on a real phone

Control Dooz on Android with an AI agent — play tic-tac-toe

Control Dooz on Android with an AI agent. Play noughts and crosses against the computer on your phone: an agent starts a game, marks cells and reads the board.

Target search phrase: AI agent plays tic-tac-toe on Android

Demo shows: new_game (cells=1,5,9)

Ghost in the Droid seed skill for Dooz (io.github.yamin8000.dooz), a simple offline tic-tac-toe game against the computer from F-Droid. Offline, no account.

ActionWhat it doesParams
new_gameStart a new game against the computernone
play_cellMark one cell 1-9 and read the computer's answercell
play_cellsNew game, then mark several cells in ordercells
get_boardRead free/occupied cells, result and difficultynone

Toolkit

An agent can drive the whole app with these; compose them.

RoleAction
Entrynew_game
Primitivesplay_cell, play_cells
Read stateget_board

Install

The app: F-Droid, or https://f-droid.org/packages/io.github.yamin8000.dooz/. The skill:

pip install "ghost-in-the-droid>=1.6.0"   # 1.6.0 is not on PyPI yet: until it ships, git clone the repo and `pip install -e .`
ghost skill install ghost/tic-tac-toe

Use

ghost skill run ghost/tic-tac-toe new_game --device <serial>
ghost skill run ghost/tic-tac-toe play_cell --param cell=5 --device <serial>
run_skill(name="ghost/tic-tac-toe", action="get_board")
# {"board": {"free": [2, 4, 6, 7, 8, 9], "occupied": [1, 3, 5], "result": "Unknown", "game_over": false}}

Try asking: "Play tic-tac-toe: take the top left, then the centre, then the bottom right."

Tested on

Real Samsung phone, Android 13 (720x1600, 300 dpi, en-GB), Dooz 1.0.24. License: MIT.

Known failure modes and versions tested

Versions tested

App versionAndroidDeviceSkill versionDates
1.0.2413Samsung real phone (720x1600, 300 dpi, en-GB)1.0.02026-11-02

Recorded failures

  • The computer sometimes opens the game (and may take the centre): play_cell reports taken: true instead of failing.
  • The board is fully disabled while the computer thinks: the helpers wait until a read is stable and not all-disabled.
  • The Portal accessibility tree drops the enabled attribute, so the helpers read the plain uiautomator dump.
  • Undo did not take a move back against the computer, so the skill has no undo action.

Popups and first-run screens handled

  • None: the app has no first-run screens and asks for no permissions.

Try a sample prompt or run an action by name. Replace any parameters in braces with your own values.

new_game

Play demo

Try asking

  • Start a new tic-tac-toe game
  • new noughts and crosses game
  • play tic tac toe
  • restart the board
ghost skill run ghost/tic-tac-toe new_game

play_cell

Play demo

Try asking

  • Play the centre square in tic-tac-toe
  • put my X in the top left
  • take the middle square
ghost skill run ghost/tic-tac-toe play_cell

play_cells

Play demo

Try asking

  • Play tic-tac-toe: centre, then top left, then bottom right
  • play 5, 1 and 9 in tic tac toe
ghost skill run ghost/tic-tac-toe play_cells

get_board

Play demo

Try asking

  • What does the tic-tac-toe board look like?
  • who is winning in tic tac toe
  • which squares are free
ghost skill run ghost/tic-tac-toe get_board