weighted_randomizer
weighted_randomizer copied to clipboard
Sample should be without replacement
The definition of sample is that it should be WITHOUT replacement. From the Rubydocs on Array#sample: The elements are chosen by using random and unique indices into the array in order to ensure that an element doesn’t repeat itself unless the array already contained duplicate elements.
@robbat2 I just made an alternative to weighted_randomizer
partly to correct this issue.