Perceptle is a daily browser game with five perception tasks. How do you compare a landing prediction that misses by 60 pixels with a dot estimate that misses by 20%?
Putting both numbers on a results screen is easy. Giving them a shared scoring scale takes another step. The implementation measures each answer in its own units, divides that error by a task-specific tolerance, and applies one Gaussian scoring function.
Five tasks, five kinds of error
The rounds run in a fixed order:
- Count: estimate how many dots appeared.
- Track: predict where a disappearing ball will land.
- Angle: rotate a line to a target angle.
- Tempo: continue tapping after a metronome goes quiet.
- Split: place a marker at a requested fraction of a line.
Each round gets a score from 0 to 100. The game's total is the rounded mean of those five scores, with a letter grade assigned from configured thresholds.
The useful separation is between measuring an answer and scoring it. A measurement function knows what a mistake means for its task. The shared scoring function only needs the size of the error and a tolerance in matching units.
Start with a measurement
These are the measurements and tolerances for normal rounds:
| Task | Raw error | Tolerance, sigma
|
|---|---|---|
| Count | Absolute count difference divided by the true count | 0.2 |
| Track | Absolute horizontal distance from the landing point | 60 logical pixels |
| Angle | Shortest circular difference from the target angle | 8 degrees |
| Tempo | 0.6 * drift + 0.4 * jitter |
60 milliseconds |
| Split | Absolute position error divided by the line length | 0.05 |
The units matter. Track uses the stage's logical coordinates, so its tolerance is expressed in that coordinate system. Split divides by the full line length, giving it a proportional error instead.
Tempo does more work before returning its error: it uses the player's synchronized taps to calibrate timing, then combines drift and jitter from the later taps. That measurement deserves its own explanation; the scoring layer does not need to know how it was obtained.
Friday rounds have different tolerances and some different rules. In particular, Friday Angle retains whole rotations and measures a linear difference. The table describes normal rounds only.
One curve after normalization
Here is the scoring function from the project:
export function gaussianScore(rawError: number, sigma: number): number {
return Math.round(100 * Math.exp(-0.5 * (rawError / sigma) ** 2));
}
Dividing rawError by sigma produces a ratio without a unit. The same curve can then accept a relative count error, a pixel distance, or an angle difference.
At zero error, the score is 100. At one tolerance of error, it rounds to 61. At two tolerances, it rounds to 14. Small misses near the target have a gentle penalty; scores fall more quickly as the error grows.
Here, sigma is a game design parameter. The function has a Gaussian shape, but the score is not a percentile, a probability of being correct, or a claim about the distribution of human perception.
Two inputs that both earn 61
The repository already has measurement tests with these inputs:
- Count: the target is 50 dots and the guess is 60.
- Track: the landing coordinate is 500 and the click coordinate is 440.
Count's raw error is abs(60 - 50) / 50, or 0.2. Dividing by its normal tolerance of 0.2 gives 1.
Track's raw error is abs(440 - 500), or 60 logical pixels. Dividing by its normal tolerance of 60 also gives 1.
The following example uses the project's internal modules. The @/ alias resolves to src/ in this repository:
import {
gaussianScore,
measureCount,
measureTrack,
SIGMA,
} from "@/domain/rules";
const count = measureCount({ n: 50 }, { guess: 60 });
const track = measureTrack({ landingX: 500 }, { clickX: 440 });
gaussianScore(count.rawError, SIGMA.count.normal); // 61
gaussianScore(track.rawError, SIGMA.track.normal); // 61
These are test fixtures, rather than today's targets or player results. They demonstrate that the normalization behaves consistently: both inputs are exactly one configured tolerance away from their target.
Whether those mistakes are equally difficult for a person is a separate question. The function cannot establish that. Choosing a tolerance sets a design assumption, and validating that assumption would require evidence beyond these unit tests.
Keeping measurement separate makes that distinction visible in the code. A test can check the pixel distance without involving the score. Another can check the curve at one or two tolerances without creating a puzzle or starting the UI.
Make the daily targets reproducible
A shared scoring function is only part of a daily game. Players also need the same targets.
Daily puzzles use a UTC date string as their seed. The puzzle builder creates one random number generator, then passes it through the five generators in their fixed order: Count, Track, Angle, Tempo, Split.
That ordering is part of the behavior. Recreating the generator for every task, changing the order, or changing a task's random-number consumption can change the resulting puzzle. Reproducing a date's targets depends on preserving the generation code as well as the seed.
Unlimited mode uses a random seed for each new game. It shares the scoring system while changing how a puzzle starts and what happens to the result.
Historical demonstration: puzzle #100, October 25, 2026. This screenshot comes from the project's capture script, not the current daily puzzle.
What this model leaves open
The configured tolerances should be read as design choices. This implementation does not establish a population norm or validate equal difficulty across tasks. A deterministic seed also does not provide server-side anti-cheat checks or guarantee identical experiences across input devices.
The two modes have different result policies. Daily saves completed results in the current browser and supports statistics and sharing. Unlimited keeps a tally for the current visit, including the best and average total. Refreshing clears that tally; it does not contribute to Daily statistics.
For another game with mixed inputs, the reusable steps are straightforward: define an error with a clear meaning, choose a tolerance in matching units, and test the conversion separately from the interaction. That gives you a place to revisit the assumptions as you learn more about how people play.
How would you choose or validate the tolerances for tasks with such different inputs?
This article was prepared with AI assistance for structure, drafting, and checks against the project's source code and existing tests.


Top comments (0)