Those in need of random "hot or not" algorithm / solutions

I am working on a “hot or not” type of web application where the user will be able to rate a random picture, and we want to encourage the user to rate by making their own images displayed more often. Below is a description of what I'm looking for.

1- You need to show a random image of user
2. A user with more activity will have a better chance that image 3 will appear. Suppose you have a lot of pictures, so I need an effective solution.

What is the most effective way to do this? The only solutions that I currently have is to save the main list table with the whole image, and when someone evaluates, I insert entries in this table to add them to% of the show, and when the user loads the application, I download random identifier 500 images in the session with the list of exceptions for already viewing / rating the image.

thanks

+3
source share
3 answers

What you need is not a random choice, but a balanced choice. The key will determine how to weigh each picture and still have some significant randomness in the algorithm. Your definition of "user activity" will give you the basis for weight.

, . , ( ). 0 1 , . 500 . , , , . .

- , , - / , , . - , - , . , , .

+3

, , Pipeline, .

. - () , .

, . , ..

, .

: , , .

+1

, . , - , , .

, / . , "", , , "".

, , .

0

Source: https://habr.com/ru/post/1716676/


All Articles