new_game
Play demoTry asking
- Start a new game of Connect Four
- new connect four game
- reset the connect 4 board
- start over in Connect Four
ghost skill run ghost/connect-four new_game ConnectFour Studio (F-Droid): start a new game, drop a disc in a column and read the engine's reply. Offline, no account.
Agent run: stopped early 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.
76× fewer tokens, 3.6× faster with the skill. Agent run: stopped early without the skill, finished with it (not independently checked).
| Run | Time | Tokens | Tool calls | Result |
|---|---|---|---|---|
| No skill: agent drives by hand | 70.3 s | 1,561,970 | 27 | stopped early |
| With skill: find_skill, run_skill | 19.3 s | 20,558 | 3 | finished |
Prompt: Play three moves in Connect Four: columns 4, 4 and 3.
Same prompt, same phone, clean app state per side. Left: no skill, the agent drives the UI by hand. Right: find_skill + run_skill. 'ok' means the agent finished its turn; the result was not independently checked.
One recorded pair on samsung-a03s, claude-haiku-5-5; tokens count every input, cache and output token once per assistant message. Not a signed run: it adds no run evidence.
Control ConnectFour Studio on Android with an AI agent. Play Connect Four against a perfect-play engine on your phone: an agent starts the game, drops the discs and reads the engine replies.
Target search phrase: AI agent plays Connect Four on Android
Demo shows: new_game (columns=4,4,3)
Ghost in the Droid seed skill for ConnectFour Studio (
io.github.patrickric.connectfourstudio), an offline Connect Four game with a perfect-play engine from F-Droid. Offline, no account.
| Action | What it does | Params |
|---|---|---|
new_game | Start a new game | none |
play_column | Drop a disc in column 1-7 and read the reply | column |
play_moves | Play a sequence of columns on a fresh board | columns |
get_state | Read move number, side to move and status | none |
undo_move | Take back one move (the < button) | none |
An agent can drive the whole app with these; compose them.
| Role | Action |
|---|---|
| Entry | new_game |
| Primitives | play_column, play_moves, undo_move |
| Read state | get_state |
The app: F-Droid, or https://f-droid.org/packages/io.github.patrickric.connectfourstudio/. 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/connect-four
ghost skill run ghost/connect-four new_game --device <serial>
ghost skill run ghost/connect-four play_moves --param columns=4,4,3 --device <serial>
run_skill(name="ghost/connect-four", action="play_column", params={"column": "4"})
# {"column": 4, "state": {"move": 3, "status": "Computer played 2 in 0.00 s.", "to_move": "Human"}}
Try asking: "Play three moves in Connect Four: columns 4, 4 and 3."
Real Samsung phone, Android 13 (720x1600, 300 dpi, en-GB), ConnectFour Studio 1.0.1. License: MIT.
| App version | Android | Device | Skill version | Dates |
|---|---|---|---|---|
| 1.0.1 | 13 | Samsung real phone (720x1600, 300 dpi, en-GB) | 1.0.0 | 2026-11-02 |
SOFT.md is the narrative an agent reads when the exact steps no longer match your app version and it has to adapt the skill.
What each action means, which UI landmarks it relies on and how success is recognised, so an agent can adapt it to another app of this kind or another version.
Package: io.github.patrickric.connectfourstudio (ConnectFour Studio, GPL-3.0, version 1.0.1 from the official F-Droid repository, sha256-verified)
Verified: 2026-11-02 on a real Samsung phone, Android 13, 720x1600 @ 300 dpi, en-GB. Offline, no account.
Skill class: HARD. No login, no checkpoints.
id/status ("New game.", "Computer is thinking...", "Computer played N in ..."), id/turn_text (side to move), and the Info panel pairs (Move: then its number). Buttons: New, <<, <, >, >>, Move, Analyze.new_game()Tap New (no confirmation). Success: status "New game." and the move counter is 1.
play_column(column)Tap the column, wait until the status reads "Computer played N" and the move counter rose by 2. Returns the before and after state.
play_moves(columns)New game, then each column in turn, waiting for the reply each time. Returns the reply after every move and the final state.
get_state()Reads Move:, turn_text and status from the screen.
undo_move()Tap <; the move counter drops. Returns the state before and after.
Other Connect Four apps differ in the controls but usually expose a status line. The canvas board means moves are coordinate taps; recompute the column centres from the board width.
Try a sample prompt or run an action by name. Replace any parameters in braces with your own values.
new_gameTry asking
ghost skill run ghost/connect-four new_game play_columnTry asking
ghost skill run ghost/connect-four play_column play_movesTry asking
ghost skill run ghost/connect-four play_moves get_stateTry asking
ghost skill run ghost/connect-four get_state undo_moveTry asking
ghost skill run ghost/connect-four undo_move Each release is an immutable git tag. The tree hash pins the exact skill directory the installer verifies.
| Version | Released | App versions | Tree | Size | Provenance |
|---|---|---|---|---|---|
1.0.0latest | never | >=1.0.1 | pending | 19.7 KB | untagged |