Skip to content

kimhamberg/brainbout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

291 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Brainbout

Brainbout

CI License: GPL-3.0 Web Linux Windows Android

A daily brain workout. Train your brain, not your scroll thumb.

3 timed cognitive games in ~18 minutes. No accounts, no ads, no internet required. Progress tracked locally.

  • Crown — Chess960 rapid, 15+10 vs Stockfish
  • Flux — adaptive rule-switching with inhibition (60s)
  • Lex — vocabulary with per-word mastery (120s)

Screenshot

Requirements

Quick start

npm install
make dev

Build

Target Command Output
Dev make dev localhost:5173
Desktop make build-server brainbout
Linux make build-linux brainbout-linux-amd64
Windows make build-windows brainbout-windows-amd64.exe
Android make build-android app-debug.apk
Clean make clean

The desktop build embeds all web assets into a single binary — no runtime dependencies.

Lint

make lint

Runs ESLint (TypeScript), Stylelint (CSS), Ruff (Python), staticcheck + go vet (Go), ktlint (Kotlin), and Prettier (all files).

Tests

npm test

158 tests across 11 files covering position generation, chess clock, cognitive games, engine parsing, timer, and progress tracking.

Sound

20 synthesised sounds generated with NumPy + SciPy + Pedalboard — modal wood synthesis for chess pieces, FM bells, additive warm tones.

.venv/bin/python scripts/gen-sounds.py

Stack

Research

Each game targets a cognitive domain with peer-reviewed evidence behind it. The evidence varies in strength — spaced repetition is among the most replicated findings in psychology, while chess transfer claims face serious methodological challenges.

Flux — task switching & inhibitory control

Flux combines cued task switching with go/no-go inhibition. These target two of the three core executive functions identified by Diamond (2013): cognitive flexibility and inhibitory control. Task switching produces a measurable "switch cost" — slower, more error-prone responses after a rule change — that reflects the time needed to reconfigure mental resources (Monsell, 2003). Go/no-go training produces immediate cognitive gains, but a meta-analysis found that go/no-go training alone does not sustain long-term benefits in healthy adults; combining it with other paradigms does (Li et al., 2022).

Crown — chess

A prospective cohort study of 469 adults over 75 in the New England Journal of Medicine found that cognitively stimulating leisure activities — including board games — were associated with reduced dementia risk (HR 0.93 per point of cognitive activity), while physical activities were not (Verghese et al., 2003). A meta-analysis of 24 studies found chess instruction modestly improves mathematics (d = 0.38) and cognition (d = 0.34) in school-age children (Sala et al., 2017). However, the same authors found that these effects drop to near zero when studies use active control groups, and far transfer from chess to unrelated cognitive domains has not been reliably demonstrated (Sala & Gobet, 2017).

Lex — spaced repetition

The spacing effect is one of the most robust findings in memory research, first demonstrated by Ebbinghaus (1885) and replicated 130 years later with comparable results (Murre & Dros, 2015). A meta-analysis of 317 experiments across 184 articles confirmed that distributed practice produces stronger retention than massed practice, with optimal inter-study intervals scaling with the target retention interval (Cepeda et al., 2006). At the neural level, spacing increases pattern similarity in the ventromedial prefrontal cortex across repetitions, and irregular spacing outperforms uniform intervals — a prediction from computational models validated experimentally (Smolen et al., 2016).

Roadmap

  • Every game feels vital and polished — tight animations, satisfying sounds, zero rough edges
  • Crown matches feel like playing a real human — natural move timing, personality, tension
  • Lex actually trains vocabulary — spaced repetition that sticks, real progress over weeks

Contributing

Contributions are welcome. Please open an issue first to discuss what you'd like to change.

License

GPL-3.0

About

Daily brain workout — four timed cognitive games to replace doomscrolling

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors