Game Design

Shuffle Bags and Controlled Randomness

How drawing outcomes without replacement from a shuffled bag limits extreme streaks in game design, with worked numbers, trade-offs and common pitfalls.

On this page
  1. The problem with independent rolls
  2. The shuffle bag idea
  3. What changes in the numbers
  4. Beyond a single rare item
  5. Trade-offs
  6. Related approaches
  7. When not to use a bag
  8. Practical guidance

The problem with independent rolls

Suppose a game gives a rare reward with a 10% chance each time a player completes a task, and every attempt is an independent roll. The average works out to one reward every ten attempts. But averages hide the spread. The chance of going 20 attempts without a single reward is 0.9 to the power 20, which is about 12%. Roughly one player in eight will see nothing for twenty attempts, and a few will go much longer.

Nothing about this is a fault. It is simply what independent chance does, and the opposite problem occurs too: some players get several rewards back to back. In many games, designers decide those extremes are bad for the experience. Long droughts feel unfair, and lucky bursts can upset a game’s pacing or economy.

The shuffle bag idea

A shuffle bag removes the independence. Instead of rolling each time, the designer fills a virtual bag with a fixed set of outcomes in the desired proportions, shuffles it and draws one item at a time without putting it back. When the bag is empty, it is refilled and reshuffled.

For the 10% example, the bag holds ten items: one rare and nine common. Each cycle of ten draws contains exactly one rare, in a random position. The long-run rate is still 1 in 10, but the variation is much narrower. A game can read this as “random, but not too random”.

The idea works the same way as dealing from a deck. If you draw without replacement, the cards that have appeared change what remains, which makes the draws dependent events. Cards already drawn cannot appear again until the reshuffle.

What changes in the numbers

With the ten-item bag:

  • Within one bag, the chance of the rare item on the next draw rises as common items are used. On the first draw it is 1 in 10; if the first nine draws were all common, the tenth is certain.
  • The longest possible run of commons is 18. This happens when the rare item is first in one bag and last in the next: nine commons after it in the first bag, then nine commons before it in the second.
  • Two rare items can be adjacent, if one is last in a bag and the next is first in the following bag. So bursts are still possible, but they cannot be longer than two in a row with this bag.

Compare this with independent 10% rolls, where there is no upper limit on a run of misses. The bag does not change the average rate; it changes the extremes.

Beyond a single rare item

The same approach works with any mix. A bag with 60 common, 30 uncommon and 10 rare items has 100 entries. A larger bag gives more randomness within each cycle, while a smaller bag gives tighter control. With a bag size equal to the total, the proportions are exact over each cycle.

Many games use the technique under different names. Falling-block puzzle games are often described as dealing pieces from a bag containing one of each type, which avoids long gaps without a particular piece. Card-based games achieve the same effect by physical shuffling. When a digital game wants to mimic this, it uses a proper shuffling algorithm such as the Fisher-Yates shuffle, which gives each ordering equal chance when the underlying generator is good.

Trade-offs

Shuffle bags are useful, but they have costs.

Predictability. If players know the bag size, they can reason about what remains. After nine commons in a ten-item bag, the rare is guaranteed. Some designs treat this as a feature; others find it breaks the sense of chance. Counting what has been drawn is the basis of card counting in deck games, and the same logic applies here, in a harmless form.

Altered feel of odds. A player who understands the system may no longer treat each draw as independent. This is correct inside the bag, but it can lead to the gambler’s fallacy if a player applies the same logic to a game that does use independent rolls. Knowing which model a game uses matters.

Edge effects at refill. Where one bag ends and another begins, patterns can appear, such as two rare items together or a long gap, as shown above. If these matter, designers can shuffle the new bag with rules about its first item or merge the leftovers.

Fixed proportions. The bag ensures exact ratios, but if the design needs the chance to change with context, the bag must be rebuilt, which adds complexity.

Shuffle bags sit within a family of controlled-randomness tools. Some systems keep independent rolls but raise the probability after each miss, as in the pseudo-random distribution used by some video games for critical hits. Others use pity timers that guarantee a reward after a certain number of failures. These alter the odds on the fly rather than fixing the pool. Each one has the same goal as a bag: to keep long streaks from ruining the experience. Such runs are a natural feature of random streaks in any fair sequence, and controlled systems deliberately reduce them.

When not to use a bag

If randomness is meant to be genuinely independent, such as a fair coin or die in a game of chance, a bag is the wrong tool, because it would make results depend on previous ones. For real-money games it would also be inappropriate to describe a system as streak-free or due: in games with independent outcomes, past results do not change future odds. Players should be wary of any claim that a game is “due” to pay out, and should keep to limits they set beforehand.

Practical guidance

  1. Decide the proportions you want and choose a bag size that expresses them exactly.
  2. Shuffle properly, using an unbiased method.
  3. Draw without replacement, then refill when empty.
  4. Check the longest possible gap and the edge cases at refill.
  5. Test with a simulation to compare observed streaks with the independent version.
  6. Tell players if the system matters to how they plan, especially in games where drop rates are central.

The complete guide to game design

Probability and Game Design: A Guide
Read the guide

Keep exploring

Guides from other topics

All topics →