๐ฐ Anki Slot Machine

Warning
This add-on is still in testing.
Expect balance tweaks, UI changes, and rough edges.
Use it at your own risk.
I am not responsible for resets, lost progress, broken profiles, deck issues, or other unexpected Anki problems while it is still in beta.
Turn your suffering into fake money.
This add-on adds a completely unnecessary, slightly addictive, and emotionally manipulative slot machine on top of Anki.
It does not improve your memory.
It does not change scheduling, intervals, cards, or notes.
It does make you want to press "Good" just one more time.

โจ Features
- ๐ฐ Real slot-machine style spin that feels tied to the result
- ๐๏ธ Faster reel animation with a clean slowdown at the end
- ๐ฐ Multiple independent slot windows can spin at once
- โ๏ธ Quick settings for rewards, roll cost, and spin cadence
- ๐ธ Persistent fake-money balance across review sessions
- ๐ Live terminal-style stats window with a PnL chart, tape feed, and quant sidebar
- ๐ Odds and rewards page inside Anki
- ๐ File-based slot profile with reel faces and pair/triple payouts
- ๐งฑ Pixel-art slot UI with local bundled assets
- ๐ No scheduling changes and no note/card field edits
Everything runs locally inside Anki. No CDN, no online dependency, no network
call for the slot UI.
๐ง What is this?
Every review becomes a gamble.
- You answer your card
- The slot resolves
- You win fake money, win nothing, or burn money on
Again
- You feel something
Thatโs it. Thatโs the product.
๐ธ Rules (very serious business)
-
Hard, Good, and Easy โ run the slot and multiply their payout (0.5, 1, and 1.5 by default)
โ fake finance begins
-
Again โ 0 by default, so it usually adds nothing
โ but if you believe learning should involve suffering, you can make it negative in the config
-
No match โ x0
โ pain
-
Exact pair โ profile pair multiplier
โ small hope
-
Triple โ profile triple multiplier
โ the machine acknowledges your existence
-
Stacked mode โ every review adds its configured answer value to one shared stack, and every spin_trigger_every_n reviews that stack settles into a spin
โ delayed chaos
-
Roll cost โ charges on every review before the spin math happens, so the payout and the final net can tell different stories
โ the spin can pay even when the full cycle still feels rough
๐ฏ The Philosophy
Most spins give nothing.
Some spins give something.
Rare spins hit.
Like life. But compressed into 300ms.
๐งฎ How it works (for nerds)
- The add-on loads one shared slot profile JSON file
- Every visible machine uses that same profile
- All machines share one bankroll, one streak, and one stats feed
- Reel probabilities come directly from the configured face counts
- The backend builds a real reel strip from those faces and keeps reel positions per machine
- Visible reel symbols are derived from real backend stop positions
- The reel strip is mixed into a stable order so the visible 3x3 window feels less clumpy without changing the configured probabilities
- Pairs and triples are evaluated from a real 3-reel backend result
- The odds page computes both per-machine odds and aggregate expected payout
Important:
The machine is not solving the economy for you anymore.
It just runs the profile you give it.
Short Changelog
v0.0.12 Rebalanced the default base.json
v0.0.11 Roll cost controls, deterministic stacked spins, and clearer payout-versus-net feedback.
v0.0.10 Shared stacked settlements, Stealth Mode auto-hide/show behavior, and a Stealth-only collapsed Slots progress label.
v0.0.9 Settings dialog, cleaner controls, and reviewer polish.
v0.0.8 Configurable rewards, cleaner odds, and lag fixes.
v0.0.7 One-slot default, collapsed controls, configurable spin triggering, and lighter DOM usage.
v0.0.6 Real reel rotation, smoother reel visuals, better timing, and no replayed spins on restore.
v0.0.5 Multi-slot support with one shared bankroll and quick slot controls.
v0.0.4 Stats window, better history tracking, and stronger layout/state handling.
v0.0.3 Draggable, resizable slot window with saved layout.
v0.0.2 Slot profiles, undo support, and spun-loss Again behavior.
v0.0.1 Initial playable slot-machine add-on release.
โ๏ธ Config
Main config lives in src/anki_slot_machine/config.json.
{
"starting_balance": 100,
"decimal_places": 2,
"roll_cost": 1.0,
"spin_animation_duration_ms": 500,
"spin_trigger_every_n": 1,
"stealth_mode_enabled": false,
"answer_base_values": {
"again": 0.0,
"hard": 0.5,
"good": 1.0,
"easy": 1.5
},
"slot_profile_path": "slot_profiles/base.json",
"machines": [
{
"key": "main",
"label": "Slot 1"
}
]
}
A slot profile looks like this:
{
"name": "base",
"faces": {
"SLOT_1": 35,
"SLOT_2": 25,
"SLOT_3": 20,
"SLOT_4": 12,
"SLOT_5": 8
},
"pair_multipliers": {
"SLOT_1": 1.00,
"SLOT_2": 1.25,
"SLOT_3": 1.50,
"SLOT_4": 3.00,
"SLOT_5": 5.30
},
"triple_multipliers": {
"SLOT_1": 2.50,
"SLOT_2": 6.60,
"SLOT_3": 13.50,
"SLOT_4": 53.00,
"SLOT_5": 300.00
}
}
Useful intuition:
faces โ how often each symbol shows up on one reel
pair_multipliers โ what an exact pair pays
triple_multipliers โ what a triple pays
spin_animation_duration_ms โ total reel animation budget, capped at 750
roll_cost โ charged once per visible machine on each review; it does not change odds or multipliers
spin_trigger_every_n โ stack n reviews, then settle that shared answer stack into a spin
stealth_mode_enabled โ keep slot windows hidden until a real spin happens, then keep them visible until the next non-spin review; in this mode the collapsed Slots button shows stack progress
answer_base_values โ signed per-answer base values, configurable in JSON
slot_profile_path โ which profile file the add-on loads
machines โ which machine windows appear on screen
More detail is documented in src/anki_slot_machine/config.md.
๐ Installation
This project is still in beta.
If you are testing it locally:
make install
Or install the built .ankiaddon archive manually from the dist/ folder after
running:
make build
๐ Odds & Rewards
Tools โ Slot Machine โ Show Odds and Rewards
Includes:
- aggregate expected payout across all active machines
- real probabilities
- actual multipliers
- expected payout per machine spin
The add-on menu also includes:
Show Stats
Reset Balance and Stats
๐พ Persistence
Your fake wealth is stored locally.
Yes, it survives restarts.
No, you cannot cash it out.
Runtime state is stored separately from Anki card data, so the add-on does not
modify scheduling, note fields, or card content. All machines share the same
saved bankroll and stats history.
โ ๏ธ Disclaimer
- This is not gambling
- This is not productive
- This is barely educational
But it might make you review more cards.
Repo Structure
The repo uses a lightweight src/<package> layout:
src/anki_slot_machine/addon.py registers the add-on once
src/anki_slot_machine/reviewer.py wires Anki reviewer hooks and the JS bridge
src/anki_slot_machine/service.py coordinates config, state, and review application
src/anki_slot_machine/game.py contains slot and payout logic
src/anki_slot_machine/config.py loads the slot profile and computes the odds summary
src/anki_slot_machine/state.py owns local persistence
src/anki_slot_machine/ui/ contains Qt dialogs
src/anki_slot_machine/web/ contains reviewer CSS and JavaScript
src/anki_slot_machine/slot_profiles/ contains packaged slot definitions
Development
make install-dev
make lint
make check
make test
make real-slot-report
make build
make install