How haarshadd/blunder-buffer works
Blunder Buffer is a chess forecasting system with historical training and a live tournament path. Live sources normalize pairings and results into game events; the worker tracks changes, requests T0 forecasts, and resolves completed predictions. Staged prediction also supports a separate ECO-conditioned T1 update. Predictions and outcomes feed the ledger and replay sampler; training evaluates challengers and uses the registry for champion promotion. The README documents historical baseline/ECO/momentum experts, meta learning, and ACPL research, but sampled source does not establish every expert’s runtime wiring.
Main entry points: realtime_chess.py Realtime worker · staged_predict.py Staged prediction API · ledger.py Prediction ledger · chess_results.py Results adapter
Components 19
Live tournament
- Results adapter
workers/adapters/chess_results.py - Normalized game event
live/events.py - Realtime worker
workers/realtime_chess.py - Tournament config
live/config.py
Forecasting
- Staged prediction API
live/staged_predict.py - Live features
live/features_live.py - Pregame meta
live/pregame.py - ECO expert
live/eco.py - Opening update
live/opening_update.py - Baseline expert
others/twic_historical_loop.py - ACPL research
workers/chess_analysis.py
Learning governance
- Prediction ledger
core/ledger.py - Experience replay
core/replay_buffer.py - Meta training
train_meta.py - Promotion gate
core/orchestrator.py - Model registry
core/registry.py - Ledger backfill
core/backfill_ledger.py
Other components
- Tournament operator
- Chess-Results
Connections 19
- Tournament operator → Realtime worker: starts polling
workers/realtime_chess.py - Realtime worker → Results adapter: fetches games
workers/realtime_chess.py - Results adapter → Chess-Results: fetches pages
workers/adapters/chess_results.py - Results adapter → Normalized game event: normalizes rows
workers/adapters/chess_results.py - Realtime worker → Normalized game event: tracks changes
workers/realtime_chess.py - Realtime worker → Tournament config: uses settings
workers/realtime_chess.py - Realtime worker → Staged prediction API: requests T0
workers/realtime_chess.py - Staged prediction API → Live features: builds features
live/staged_predict.py - Staged prediction API → Pregame meta: runs T0 meta
live/staged_predict.py - Staged prediction API → ECO expert: gets ECO probabilities
live/staged_predict.py - Staged prediction API → Opening update: runs T1 meta
live/staged_predict.py - Live features → Baseline expert: uses historical features
- Staged prediction API → Prediction ledger: logs predictions
live/staged_predict.py - Realtime worker → Prediction ledger: resolves outcomes
workers/realtime_chess.py - Prediction ledger → Experience replay: supplies resolved examples
core/replay_buffer.py - Meta training → Experience replay: samples batch
train_meta.py - Meta training → Promotion gate: submits metrics
train_meta.py - Promotion gate → Model registry: registers and promotes
core/orchestrator.py - Ledger backfill → Prediction ledger: writes historical entries
core/backfill_ledger.py