# Probabilistic Chooser

In the common Internet context of listing dynamic content that users are voting for, one encounters users gaming the ranking system by seeing who gets first, or unrecognized but good content content hiding below the popular content.

The solution is to give a weighted listing where each item is chosen proportional to its vote. This technique will prevent positive feedback loops that raise popular items forever above the rest (due to limitations of people's attention span to scan all contributions or positions). It's based on evolutionary theory (and has been used in a GeneticAlgorithm for selecting from a pool of ranked genes between generations). The idea is for every contribution, tally a count of all votes, then each contribution gets weighted from this total and an intelligent throw is made to pick a given item, as follows.

If given these item/vote pairs, for example:

• "I am good hacker.": 3 votes
• "I am a better hacker.": 8 votes
• "No! I am the best HackORZZ!": 13 votes
• "I might be the best, but no-one recognizes me": 1 vote

That is a sum total of 25 votes.

The probability of being shown first becomes, respectively:

• 3/25 = 0.12
• 8/25 = 0.32
• 13/25 = 0.52
• 1/25 = 0.04

Totaling, as expected: 1.0 (or 25/25)

Next, take those numbers and accumulate them thusly:

• 0.12
• 0.44
• 0.96
• 1.00

Now, throw a random number [0.0,1.0) and pick the element that is between those results.

Bingo! Problem solved! Over time, under-valued contributors will get moved upward -- no positive reinforcement loops! [Edit: I need to re-write this for integer values and where items can't be selected more than once.] (Algorithm licensed: CC-BY-NC, CreativeCommons)

-- MarkJanssen

Just throw a random integer [0,25] (in this case) and pick the element that is between the result and not worry about rounding.

• Good point, I developed the idea in the context of floating-point values mixed in a gene pool, rather than integer votes. Also where genes could be selected more than once. So I have to re-write this.

This topic could use some context. What alternative is it improving over? What's it for?

Google, for example, could use it to display search results so people don't "game the system" with SearchEngineOptimization?. OR http://quora.com could use it to display all the answers for people to vote for, rather than have the first few values getting all the attention.

Getting different results each time is going to drive users and testers crazy.

EditText of this page (last edited November 26, 2014) or FindPage with title or text search