Ranking algorithm for Bear Blog discover page
Unproofread notes
On the Bear Blog discover page, they have the below-mentioned snippet that explains how articles are ranked:
This page is ranked according to the following algorithm:
Score = log10(U) + (S / B * 86,400)
Where,
U = Upvotes of a post
S = Seconds since Jan 1st, 2020
B = Buoyancy modifier (currently at 14)
--
B values is used to modify the effect of time on the score. A lower B causes posts to sink faster with time.
I asked ChatGPT to explain how this works and ranks articles, and I learned the below:
- The
log10(U)
part means that as a post gets more upvotes, its score increases, but each additional upvote has a slightly smaller effect than the previous one. This helps prevent very popular posts from dominating the rankings indefinitely. - The
(S / (B * 86,400))
part adds a time-based component to the score. Since there are 86,400 seconds in a day, this part increases the score as time passes, giving newer posts a chance to appear higher in the rankings. - The buoyancy modifier
B
controls how quickly the time component affects the score. A lowerB
value would make posts "sink" faster over time, while a higherB
value would allow them to stay prominent longer.
I think, it's very interesting and, someday, it would really be useful for something that I build in the future.
Comment via email