ghost/mancala

Mancala (F-Droid): start a Kalah game, play pits for each player in turn, read the board, stores and winner. The whole game is a readable text console. Offline, no account.

Proven 4.3× fewer tokens Score 39/100 Official hard skill python

Token savings

77% fewer tokens
Tokenswithout354,880with81,677 (77% fewer)
Timewithout46.6 swith51.8 s (11% more time)
Tool callswithout17with6 (65% 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 Mancala on Android with an AI agent

Control Mancala on Android with an AI agent. Play Mancala on your phone: an agent sets up a game, sows pits for each player and reads the board and the winner.

Target search phrase: AI agent plays Mancala on Android

Demo shows: move (pit=3)

Ghost in the Droid seed skill for Mancala (com.willie.mancala), an offline two-player Mancala (Kalah) game played in a text console. The transcript is fully readable, so the board, both stores, whose turn it is and the winner are parsed exactly. Offline, no account.

ActionWhat it doesParams
new_gameRestart and set up a game (default 6 pits, 4 seeds)pits, seeds
moveSow one pit for whoever is to move; returns the board, stores and next playerpit
play_movesPlay several pits in a row (3,1,5)pits
get_stateRead both rows, both stores, whose turn it is and the resultnone

Toolkit

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

RoleAction
Entrynew_game
Primitivesmove, play_moves
Read stateget_state (rows, stores, to_move, game_over, result)

Install

The app: F-Droid, or https://f-droid.org/packages/com.willie.mancala/. 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/mancala

Use

ghost skill run ghost/mancala new_game --param pits=6 --param seeds=4 --device <serial>
ghost skill run ghost/mancala move --param pit=3 --device <serial>
run_skill(name="ghost/mancala", action="move", params={"pit": 3})
# {"result": {"player": 1, "extra_turn": true, "state": {"player1_store": 1, ...}}}

Try asking: "Start a Mancala game and play pits 3, 1 and 5."

Tested on

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

Known failure modes and versions tested

Versions tested

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

Recorded failures

  • Hot-seat game: no computer opponent; the agent plays both sides.
  • After the game ends the app asks whether to start another game; new_game restarts the app instead of answering it.
  • Never type exit: it quits the app (the skill refuses to type unless the console is on screen).
  • The transcript prints an Invalid input line after each prompt; it is app noise and is ignored.

Popups and first-run screens handled

  • None.

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 Mancala game
  • play mancala
  • new mancala game with 6 pits
ghost skill run ghost/mancala new_game

move

Play demo

Try asking

  • Play pit 3 in Mancala
  • mancala: sow pit 1
  • pick pit 5
ghost skill run ghost/mancala move

play_moves

Play demo

Try asking

  • Play pits 3, 1 and 5 in Mancala
  • play pits 2,4,6 in mancala
ghost skill run ghost/mancala play_moves

get_state

Play demo

Try asking

  • What does the Mancala board look like?
  • mancala score
  • whose turn is it in mancala
ghost skill run ghost/mancala get_state