Magic 8 ball
One outcome in 20
Drawn in your browser · nothing stored
Ask a yes-or-no question and one of twenty answers comes back. Ten are affirmative, five are non-committal and five are negative: the same distribution moulded into the icosahedral die inside the original toy.
How to use the Magic 8 ball
The toy has been made since 1950 and the twenty answers have barely changed. The split is the interesting part: half positive, a quarter negative and a quarter refusing to answer, which is exactly the mix that keeps someone shaking it. Here each of the twenty is equally likely, drawn from your browser’s cryptographic generator, so ten of the twenty faces are affirmative and the odds of a yes-ish answer are precisely half. It goes without saying, but the ball does not know anything — if you find yourself asking twice, you already have a preference and it is worth noticing what it is.
Questions
Twenty, on the faces of an icosahedral die: ten affirmative, five non-committal and five negative.
Yes. Every face has the same chance, so an affirmative comes up exactly half the time.
Nothing stops you, and the second answer is independent of the first. That is also the point at which the ball stops being useful and you should trust your own preference.
The draw comes from crypto.getRandomValues, the same generator used for cryptographic keys. There is no pattern and no memory.
The question is never typed anywhere and nothing at all leaves the page.