Back to projects

Algorithms· ▶ Playable

Indetectable

A daily browser game: forge one stroke that blends into the machine's. An algorithmic detective tries to catch the human intruder. You win if it can't.

Live demo →Source →

Problem

Build a viral "one game a day" toy that runs with zero backend, zero recurring cost, and no secrets — in a fully public repo. The core challenge is detection: tell a human-drawn stroke apart from machine-drawn ones in the browser, instantly, with no training dataset and no model to host. The skill the game tests is imitation, not cleanliness — drawing too perfectly betrays you as much as drawing too shakily.

My role

Designed and built the whole system spec-first: a DOM-free, dependency-free self-calibrating detector that scores each stroke as a z-score against the day's procedural cluster — shape conformance ($1-recognizer / Procrustes normalization), micro-tremor (Savitzky–Golay residual), speed and curvature signatures. Plus a deterministic daily seed (xmur3 + mulberry32), a 3-knob difficulty model with weekly rotation, raw-vs-display point capture (Pointer Events + perfect-freehand), localStorage streaks with the Wordle one-attempt lock, es/en/pt i18n, and a shareable verdict card.

Tradeoff

Chose an algorithmic detective over an LLM: it runs 100% in the browser at $0 with instant inference, but gives up the richer judgment a model could bring. No accounts and no sync — progress lives only in localStorage, so clearing the cache loses your streak. Self-calibration against the on-screen cluster removes the need for a training set, at the cost of careful per-feature weight and threshold tuning against real human strokes.

Metric

v1 ships fully client-side with 71 unit testscovering detector separability and determinism, scoring, scene/PRNG, difficulty, persistence, i18n, canvas, and the share card. The detector adds no network calls and ~200 lines of readable TS. Remaining pre-release work: calibrate the detector's weights and thresholds against real human strokes (target: high separability between forged and machine strokes without flagging good imitations).