Spielerando

Random pick keeps giving the same thing three times in a row

Plain random feels broken: streaks of the same enemy, the same song, the same loot. A shuffled bag fixes the streaks inside a round, but a nasty repeat can still sneak in exactly where the bag starts over. This entry covers that seam.

Why this works

People judge luck by streaks they notice, not by long-run averages. Drawing from a bag that empties before it refills keeps every kind turning up evenly, and checking the join between two bags removes the one place where a repeat could still hide.

When not to use it

Skip it when surprise is the whole point, such as a gambling-style game, or when outcomes must stay truly independent, for example a duel where players could use the pattern. Then use plain chance, or make the bag so large nobody can count it.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 29 lines of example code with 4 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "Random pick keeps giving the same thing three times in a row" (read_entry shuffle-bag-no-repeat-across-refill) in my game. Build it step by step, and show me how you checked that it works.

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP