ghost/quick-calculation

Quick Calculation (F-Droid): a timed multiple choice mental maths game with addition, subtraction, multiplication, division and mixed series, with a results screen. Offline, no account.

Runs 2.7× fewer tokens Score 37/100 Official hard skill python

Token savings

63% fewer tokens
Tokenswithout246,643with91,931 (63% fewer)
Timewithout41.2 swith89.0 s (116% more time)
Tool callswithout15with9 (40% 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: open_setup · live agent session on a real phone

Control Quick Calculation on Android with an AI agent

Control Quick Calculation on Android with an AI agent. How fast can an AI do mental maths? Your agent plays a timed game on your phone and reports the score.

Target search phrase: AI agent plays a quick mental maths game on Android

Demo shows: start_game (operator=Addition, timer=120)

Ghost in the Droid seed skill for Quick Calculation (io.github.subhamtyagi.quickcalculation), an offline timed mental maths game. The question, the four answer buttons, the running score and the results are text nodes, so an agent can play and see its score. Offline, no account.

ActionWhat it doesParams
open_setupRestart the app and read the setup form (operator, number ranges).none
start_gamePick an operator and a timer (30, 45, 60, 90, 120, 300 or 600 seconds), start the game and return the first question with its four options.operator, timer
get_questionRead the current question, its four options, the time left and the score.none
answerAnswer the current question by option text (value) or button position 1-4 (option); returns right or wrong and the next question. Tapping an option answers at once.value, option
answer_manyAnswer several questions in a row (up to 8), by answer texts (values) or button positions (options), comma separated.values, options
finish_gameEnd the game with Submit and read the results (correct answers and attempts).none
get_resultRead the results screen: total correct and total attempts.none

Toolkit

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

RoleAction
Entryopen_setup, start_game
Primitivesanswer, answer_many, finish_game
Read stateget_question, get_result

Install

The app: F-Droid, or https://f-droid.org/packages/io.github.subhamtyagi.quickcalculation/. 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/quick-calculation

Use

ghost skill run ghost/quick-calculation answer --param option=2 --device <serial>
run_skill(name="ghost/quick-calculation", action="answer", params={"value": "148"})
# {"result": {"question": "74 + 74", "chosen": "148", "correct": true, "feedback": "CORRECT!", ...}}

Try asking: "Start a Quick Calculation addition game, solve the first three questions by picking the right option each time, then end the game and tell me the score."

Tested on

Real Samsung phone, Android 13 (720x1600, 300 dpi, en-GB), Quick Calculation 5. License: MIT.

Known failure modes and versions tested

Versions tested

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

Recorded failures

  • A game with a short timer can end before a slow agent finishes; the next action then sees the results screen.
  • Number range fields are not driven.

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.

open_setup

Play demo

Try asking

  • Open the Quick Calculation app
  • open the quick maths game
ghost skill run ghost/quick-calculation open_setup

start_game

Play demo

Try asking

  • Start a Quick Calculation game with addition
  • start a multiplication speed game
ghost skill run ghost/quick-calculation start_game

get_question

Play demo

Try asking

  • What is the current quick calculation question?
  • read the maths question
ghost skill run ghost/quick-calculation get_question

answer

Play demo

Try asking

  • Answer the quick calculation question with option 2
  • pick 148 as the answer
ghost skill run ghost/quick-calculation answer

answer_many

Play demo

Try asking

  • Answer the next three quick calculation questions with options 1, 2 and 3
  • answer 3 questions with the first option
ghost skill run ghost/quick-calculation answer_many

finish_game

Play demo

Try asking

  • End the quick calculation game and show the result
  • stop the game and show my score
ghost skill run ghost/quick-calculation finish_game

get_result

Play demo

Try asking

  • What was my quick calculation score?
  • show the game results
ghost skill run ghost/quick-calculation get_result