jeudi 26 mai 2016

Dynamic Biased Randomized Selection Algorithm

I'm looking to implement an algorithm that picks items from a list randomly, albeit in a biased way. Say I have a value priority for each element in that list. I would like an element with higher priority appear more often in the selection.

Another thing is that the priority of these elements would be changed. If someone particularly picks an element rather than letting that element come from a random selection, the priority of that element should be increased by a certain factor.

I'm afraid I'm not quite sure how to phrase my question mathematically. Also, I don't know where to begin either. I found an article here which deals with the first part but doesn't deal with dynamically increasing the priority of elements.

One approach I thought of is that more the priority of an element, the more copies we make of it. However, this is very unfeasible to implement in computer code

I've also posted this question on math.stackexchange hoping for some mathematical insight.

NOTE: Just to be clear, I'm not looking for any implementation of sort. I'm just looking for a clear direction/few insights so I can go ahead and code up my own algorithm.




Aucun commentaire:

Enregistrer un commentaire