5 ms·
Or you could just search for Paul Graham's posts[0] :) > (= gravity* 1.8 timebase* 120 front-threshold* 1 nourl-factor* .4 lightweight-factor* .17 g
by nstj 10y ago
Or you could just search for Paul Graham's posts[0] :)
> (= gravity* 1.8 timebase* 120 front-threshold* 1
nourl-factor* .4 lightweight-factor* .17 gag-factor* .1)
(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)))))
[0]: https://news.ycombinator.com/item?id=1781417 https://news.ycombinator.com/item?id=1781417
- overcast 10y agoYeh I'm not sure why this is even a thing. I thought everyone knew that algorithm at this point? Hell, I'm using the same thing on a couple projects.
- foob 10y agoFrom the article: I find this to be a particularly interesting question, not because I actually care about the answer, but because it feels like the data should be able to tell us the answer... My main goal was to tease out the ranking algorithm from the data in a simple and elegant fashion. This made it a little more interesting as an endeavor and hopefully makes it a more interesting read as well. You're right, the details of the algorithm aren't hugely interesting and are generally available. The point here was to use the data to uncover it in a somewhat novel way. Figuring things out can be fun in and of itself, even if the answers are already available.
- sillysaurus3 10y agoThat's almost seven years out of date. The algorithm has changed significantly since then. Example: Flags affect a story's position, but that algorithm doesn't mention flags at all.
- nstj 10y ago> Here's the code running now: it's from 2345 days ago, which is < 7 years and I'm guessing it had a reasonable lifetime after that anyway - how come you're thinking that it's > 7 years old? And my point wasn't so much about the actual algorithm either, just that sometimes a pinch of Google = a dollop of calculus :)
- foob 10y agoTo be fair, the ranking code is included in the article :-).
- sillysaurus3 10y agoI mean, it's cool to see. I wish dang would show the latest version. Maybe if all of us ask him nicely?
- jacquesm 10y agoNot a chance if I'm any judge of this. For a simple reason: HN is already being gamed, no need to hand the other side a freebie. Security by obscurity is bad practice if that's your only layer of defense but it certainly doesn't hurt as one of the layers in your onion.
- sillysaurus3 10y agoFrom the point of view of someone gaming HN, there's nothing to be gained by knowing the ranking algorithm. It doesn't matter if you know five flags will bump you off the front page, or that mods can adjust the position of your story, because that's not something that you can use to your advantage. The only thing you'd be able to do with that info is to use it maliciously, like flag a story off the front page. But everyone already knows that you can remove a story via flags, and it's pretty easy to figure out how many flags are required. Honestly the argument "there are bad people, we need to worry about them" is getting tired. It was cool when pg was showing off Arc to the community. It felt like we were all discovering something new, and how to build a community together.