I have noticed something on hn, that the posts on the main page gets arranged in a peculiar way. For example, a link posted 4 hours ago with less than 20 upvotes might be on the main page still, while another similarly aged link with twice as much upvotes might be on the second page.<p>I am wondering what algorithm is used in ordering them. Any idea?
There are several small tweaks that I've noticed. There's something about the length of a post, possibly something about the number of comments, and possibly others. There are also penalties for various things. Items without a link are ranked more lowly than those with a link, and some topics <i>du jour</i> have a penalty applied.<p>All in all, it's actively curated by PG, with small changes to keep the system in balance and running smoothly. Enquiring too closely is discouraged.<p>It's also plausible that this item will get deleted. After all, this is a site for hackers, not a site about Hacker News.
<a href="http://news.ycombinator.com/item?id=1781013" rel="nofollow">http://news.ycombinator.com/item?id=1781013</a><p>quoting from PG's comment on that post:<p>(= gravity* 1.8 timebase* 120 front-threshold* 1
nourl-factor* .4 lightweight-factor* .17 gag-factor* .1)<p><pre><code> (def frontpage-rank (s (o scorefn realscore) (o gravity gravity*))
(* (/ (let base (- (scorefn s) 1)
(if (> base 0) (expt base .8) base))
(expt (/ (+ (item-age s) timebase*) 60) gravity))
(if (no (in s!type 'story 'poll)) .8
(blank s!url) nourl-factor*
(mem 'bury s!keys) .001
(* (contro-factor s)
(if (mem 'gag s!keys)
gag-factor*
(lightweight s)
lightweight-factor*
1)))))</code></pre>
-----<p>or simplifying a bit:<p>Score = (P-1) / (T+2)^G<p>where,
P = points of an item (and -1 is to negate submitters vote)
T = time since submission (in hours)
G = Gravity, defaults to 1.8 in news.arc
I noticed that this morning too:<p><a href="http://news.ycombinator.com/item?id=1966201" rel="nofollow">http://news.ycombinator.com/item?id=1966201</a>