Suppose I’ve a recreation with 6 gamers, every of which will get a payout on a unique aspect of a D6 roll. The D6 is rolled many instances over the course of the sport.
This yields a fair payout in the long term, utilizing an unbiased D6. Nevertheless, my recreation is just not lengthy sufficient for the payouts to revert to the imply. Due to this fact, I wish to make a biased cube mechanism, the place rolls that haven’t come up just lately are extra seemingly.
One strategy I can consider is to simulate a deck of playing cards:
- Take a listing
[ 1, 2, 3, 4, 5, 6 ]
- Repeat the checklist
n
instances (the placen
is a few a number of of the everyday recreation size) - Shuffle the checklist
- To make a “roll”, pop a quantity off of the checklist
The issue with this strategy is selecting n
… too low and we threat working out of rolls; too excessive and the rolls usually are not biased sufficient.
What algorithms / methods can be found right here?
Additionally it is helpful if the algorithm may be simply defined to the participant.