mmetro / WeirdSideofYouTube

MIT License
6 stars 3 forks source link

Improve 'random video' algorithm to avoid repeats and weight selections. #53

Closed ghost closed 7 years ago

ghost commented 7 years ago

Currently, a simple random number is used. Potential improvements may include weighting selections based on popularity, likes, length, etc. Additionally, it may avoid repeating videos by receiving a short history from the user.

siviyn commented 7 years ago

I think we should go for more of a short term history with the user rather than weighted results. It would ensure that going in fresh you would have a completely random chance to get each video. The issue we need to solve is just getting the same video multiple times in a session (which shouldn't happen)

ghost commented 7 years ago

With changes, the program re-runs random number generation while the selected video is in the last 100 videos of the users' history, or total video count / 2 (whichever is smaller).