Skip to content

feat: add Monte Carlo simulation and fast-forward mode - #2

Merged
cloudygreybeard merged 1 commit into
mainfrom
feat/monte-carlo
Aug 1, 2026
Merged

cloudygreybeard merged 1 commit into
mainfrom
feat/monte-carlo

Conversation

@cloudygreybeard

Copy link
Copy Markdown
Owner

Add monte-carlo and fast-forward flags with histogram display.

Add --monte-carlo N flag for repeated trials with a live-updating
horizontal histogram rendered on stderr. The empirical distribution
converges to uniform as N increases, providing a visual proof of
fairness. Final frequency table written to stdout in TSV format.

Add --fast-forward flag to skip the wheel animation for any run,
printing only the selected item. In Monte Carlo mode, fast-forward
accumulates trials silently, updating only the histogram.

New exported function Select() provides random selection without
animation, used as the fast path for both modes.
@cloudygreybeard
cloudygreybeard merged commit b8bdf5c into main Aug 1, 2026
3 checks passed
@cloudygreybeard
cloudygreybeard deleted the feat/monte-carlo branch August 1, 2026 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant