Model card
- Architecture: CNN (frame + difference to the previous frame; 3 conv layers) → 32 features → GRU (32 hidden) → probability per cup position
- Parameters: 27,044
- Input: Pixels only: a 64×32 grayscale frame from a fixed “cat camera” above the table, 30 frames per second of game time (frames identical to the previous one are skipped). Game state, swap events and cup positions are never given to the model. Its memory is reset when you hide the toy (that’s when the cat starts watching).
- Training data: 2,003 random rounds, 561,703 frames, rendered in headless Chrome by the same three.js scene and the same cat camera. Speeds, swap counts and lighting randomised.
- Training: PyTorch (CPU), 40 epochs ≈ 94 min × 4 CPU threads; per‑frame cross‑entropy
- Accuracy (held‑out rounds): 100.0% (240/240) · random guessing: 33.3%
- Honesty check: blank/constant camera → probabilities stay near 33% (29.5%–36.1%) · mirrored camera → mirrored answer (240/240 rounds) · toy erased from every frame after the hide → still right (135/135): it tracks the cups, not the toy
- Size: 111 KB ONNX
- Limitations: In tests it was not fooled even at the fastest setting (164 ms per swap): 100.0% (180/180). But it only works in this scene with this camera; other cups, light or angles would blind it. I may publish the weights on Hugging Face later.
- GitHub: hocestnonsatis/coinflip-ai
Accuracy: swaps × speed (prediction at the last frame)
| swaps | slow 752 ms | medium 526 ms | fast 367 ms | very fast 257 ms | lightning 164 ms |
|---|
| 0 | 100% | 100% | 100% | 100% | 100% |
|---|
| 1 | 100% | 100% | 100% | 100% | 100% |
|---|
| 2 | 100% | 100% | 100% | 100% | 100% |
|---|
| 3 | 100% | 100% | 100% | 100% | 100% |
|---|
| 5 | 100% | 100% | 100% | 100% | 100% |
|---|
| 8 | 100% | 100% | 100% | 100% | 100% |
|---|
| 12 | 100% | 100% | 100% | 100% | 100% |
|---|
| 20 | 100% | 100% | 100% | 100% | 100% |
|---|
| 30 | 100% | 100% | 100% | 100% | 100% |
|---|
Every cell = 20 held‑out test rounds (never trained on), one press of shuffle ×N. Random guessing is 33.3%.
🎭 Against cheating (model not retrained)
- On one empty cup · before: 60/60 right · fell for a sticker 0 times · mean confidence 100%
- On one empty cup · after: 60/60 right · fell for a sticker 0 times · mean confidence 100%
- On both empty cups · before: 60/60 right · fell for a sticker 0 times · mean confidence 100%
- On all three · before: 60/60 right · fell for a sticker 0 times · mean confidence 100%
- On all three · after: 60/60 right · fell for a sticker 0 times · mean confidence 100%
- On the toy’s cup · before: 60/60 right · fell for a sticker 0 times · mean confidence 100%
- On the toy’s cup · after: 60/60 right · fell for a sticker 0 times · mean confidence 100%
Each row: 60 rounds never seen in training (0–20 swaps, 3 speeds). "before" = the sticker was already there during the hide; "after" = stuck on after the hide.
😴 Sleepy cat (model not retrained)
Accuracy: fps × speed (1–30 swaps)
| fps | slow 752 ms | medium 526 ms | fast 367 ms | very fast 257 ms | lightning 164 ms |
|---|
| 30 | 100% | 100% | 100% | 100% | 100% |
|---|
| 15 | 100% | 100% | 100% | 77% | 38% |
|---|
| 10 | 100% | 100% | 59% | 42% | 35% |
|---|
| 5 | 61% | 37% | 33% | 33% | 41% |
|---|
Accuracy: fps × swaps (all 5 speeds) · %
| fps | 0 | 1 | 2 | 3 | 5 | 8 | 12 | 20 | 30 |
|---|
| 30 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 |
|---|
| 15 | 100 | 91 | 89 | 87 | 84 | 84 | 81 | 73 | 75 |
|---|
| 10 | 100 | 76 | 77 | 68 | 68 | 65 | 59 | 60 | 65 |
|---|
| 5 | 100 | 48 | 47 | 52 | 34 | 33 | 41 | 33 | 38 |
|---|
The same 900 held‑out test rounds; 30 fps = the normal cat. Frame rate is in game time; at low rates the middle of fast swaps falls between frames.