I am looking for a random number generator that is biased towards giving numbers "furthest away" from a set of already selected numbers. For example, if my range is [1, 50] and I pass in a set of numbers such as (1, 20, 40), then I would want the generator to "prefer" producing numbers further away from 1, 20, and 40. Therefore, numbers such as 50 or 30 would be more likely to be drawn than 20 or 40. I suspect that this may already exist. Does anyone know of such an implementation that I can use for Java?
Aucun commentaire:
Enregistrer un commentaire