Shuffle bag
Fair randomness with no long unlucky streaks: outcomes go into a bag, get shuffled and come out one by one. One win in four then really means one win in every four.
When you need it
When bad luck would feel unfair: critical hits, item drops, which enemy comes next, which level part follows. The worst streak is a fixed number your AI can work out and show you as proof, instead of a matter of luck.
Say this to your AI
Use the shuffle bag from Spielerando for my critical hits, one in four, and show me the longest streak without one that can ever happen.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP
Settings
- copies (1): How many of each item go into the bag. More copies feel more random, but allow longer streaks.
- avoidRepeats (on): Keeps a new bag from starting with the item the last one ended on. That shortens the worst streak.
Your AI gets the code
The finished code and math come through the Spielerando connection, so your AI can use them right away. Connect your AI
Common questions
how do i stop long unlucky streaks in my game
Instead of rolling each time, deal from a shuffled bag. A player gets exactly the share you set in each bag, so a streak can only be so long, and you know how long.
why does my random feel unfair
True randomness has streaks, and players read them as broken. A bag spreads the results out, which feels fairer even though it is less random.
what is the difference between a shuffle bag and a random drop chance
A drop chance rolls fresh each time and has no memory. A bag remembers what has come out, so results even out and a player's luck cannot run away.