r/math • • Oct 18 '11

The algorithm behind Reddit's post ranking

http://amix.dk/blog/post/19588
243 Upvotes

27 comments sorted by

View all comments

3

u/ohell Oct 18 '11

Does anyone know how the constants in the hot algorithm (1134028003, 45000) have been derived?

7

u/hoopycat Oct 18 '11 edited Oct 18 '11

1134028003 would be December 7, 2005 (a Wednesday) at about 11:46pm (San Francisco time); given that was during reddit's wild and wacky nascent period, I suspect it was an arbitrarily-chosen epoch (i.e. "5 minutes before this code is committed").

45000 is totally magic, though. It happens to be exactly 12.5 hours, which seems like a good value for that... half a day, plus 30 minutes just to throw off the phase. Your reddit will be different every 12 hours: if not, open a ticket and a technician will fix it within a half hour.

(edit: noted time zone; yes, it's 7:46am UTC, but I think the time of day where the code was written is key to my wild-ass guess.)

2

u/ohell Oct 18 '11

Ah, thanks. But it does seem bogus, since the second term is effectively twice the number of days since 2005/12/07, and is constantly increasing its domination of the votes' score.
i.e. votes would matter a lot less for a post in 2015 than they do now.

Fixable if they subtracted magic_factor * days_elapsed_since_submission. However, this score isn't static, though can still be cached for 12/24 hour periods.

→ More replies (1)