Fair draws: why crypto randomness matters
Fair draws need crypto randomness (getRandomValues), not Math.random: the first is unpredictable per call, the second is a seeded PRNG — fine for games against yourself, not for anything adversarial.
Fairness also means method: ranges without modulo bias (rejection or float scaling), public procedures (seed shown, draws logged), and no re-rolls behind closed doors.
Mistakes: % range on raw bytes (bias toward low values), 'random' sort with Math.random (broken shuffle), deciding the method after seeing who it favors, and tiny samples declared 'proof'.
Example: randint 1–100 via (randomUint32 / 2^32 × 100) + 1 — every face exactly 1%. Run it 10,000 times and the histogram stays flat.
Try: Random Integer · Coin Flip
Teams that feel fair
Teams feel fair when the method is visible and the constraints are honored: shuffle with crypto randomness, then snake-draft by skill so strength spreads evenly instead of clumping.
Publish the roster algorithm before names go in: N balanced teams, no-repeat jars for repeated draws, late joiners appended by rotation — procedure first, luck second.
Mistakes: captains picking (popularity contest), re-shuffling 'until it looks right' (that is choosing), splitting couples/friends across rivals without asking, and uneven sizes without a stated rule.
Example: Ana, Bo, Cy, Dan + skill ranks → shuffle → snake into 2 teams of 2. Everyone sees the method; nobody argues the outcome.
Try: Team Generator · Random Student
Weighted wheels, honestly explained
Weighted wheels stay honest with an audit list: every option shows its weight, total weight is public, and the pick lands where cumulative weight crosses one uniform random number.
Weights mean shares of outcomes, not 'chances plus luck': A:2 B:1 means A wins 2/3 of the time over many draws — say it, show the math, log the draws.
Mistakes: weights that don't sum to what you claim, changing weights mid-contest, presenting one draw as destiny (variance is real: 2:1 still loses a third), and hidden zero-weight decoys.
Example: A:2, B:1, C:1 → totals 4 → ranges A 0–50%, B 50–75%, C 75–100%. Roll 0.62 → B. Table published, result reproducible from the logged roll.
Try: Weighted Choice · Random Choice