A math quiz for an 11–12 year old (grade 6–7), in English and Hebrew. One HTML file, no dependencies, no build step, no server. Progress is saved in the browser.
Play it: https://minskya.github.io/math-arcade/
Or download index.html and open it — it works the same offline.
Rounds of ten multiple-choice questions. Instant feedback with a one-line worked explanation, a streak counter, XP and levels, badges, and per-topic accuracy. No timer. Topics the kid gets wrong come back more often, and the difficulty of each topic moves independently based on how they're doing.
Topics: percents, fractions, decimals, ratio, negative numbers, order of operations, powers, area and perimeter, angles, averages, rates, sequences, factors and primes, and multi-step word problems.
Built-in inventor (default). Fourteen topic generators build questions from randomised numbers on every call, so the supply is unlimited rather than a fixed bank, and the arithmetic is computed rather than written down. The wrong answers are deliberate: a percents question offers "forgot to divide by 100" and "used the wrong base" — the mistakes a twelve-year-old actually makes, not random numbers. Needs no key and no network.
AI word problems (optional). In Setup, paste a free API key and the game will also write creative word problems, tagged ✨:
- Google Gemini — free key from aistudio.google.com (starts with
AIza) - Groq — free key from console.groq.com (starts with
gsk_)
The provider is detected from the key prefix. Every generated question is validated before it's accepted (exactly four distinct choices, answer index in range, sane length, no duplicates), and anything malformed is discarded. If the request fails, the game falls back to the built-in inventor without interrupting play. Because a model can still get arithmetic wrong, AI questions carry a "this looks wrong — remove it" link.
Everything stays on the device. XP, badges, stats and the API key live in
localStorage under mathArcade.v1 and are never sent anywhere. The only
network requests are Google Fonts (with system-font fallbacks, so offline is
fine) and — if a key is set — the chosen AI provider.
- English/Hebrew toggle in Setup, with full RTL layout. Language is auto-detected from the browser on first open.
- Keyboard:
1–4to answer,Enterto continue. - Erasing progress and ending a round use a two-tap confirm rather than a browser dialog, which is friendlier on a phone.