Usage example:
random.sample(['choice1', 'choice2'], {probs: [0.6, 0.4]})
This would allow, for instance, choosing different moves or options with different probabilities.
Some details:
- We don't want to assume the probs sum to one (i.e. we want to normalize).
- We probably want to change the signature to
Random.sample(choices :T[], options: {n: number ,...}) for all methods of Random. This should probably be a prerequisite to the probs new feature.