lundi 28 mars 2016

Prioritizing first items in a list (Random & Probability Distribution)

I have a list of sorted elements. First elements are supposed to be prioritized in contrast to last elements. Currently, I am just using random.choice(foo) to select items from my list.

The algorithm I am writing would be a lot more efficient with a different probability distribution (described above). Unfortunately, I am not sure how to implement it




Aucun commentaire:

Enregistrer un commentaire