News for hackers. Stuff that matters.
Re:Reverse Engineering the Hacker News Ranking Algorithm by nstj on Tuesday March 14, 2017 @11:35AM (#13868335)
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
Re:Reverse Engineering the Hacker News Ranking Algorithm by overcast on Tuesday March 14, 2017 @11:40AM (#13868397)
Yeh 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.
Re:Reverse Engineering the Hacker News Ranking Algorithm by foob on Tuesday March 14, 2017 @11:51AM (#13868527)
From 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.

Re:Reverse Engineering the Hacker News Ranking Algorithm by sillysaurus3 on Tuesday March 14, 2017 @11:41AM (#13868401)
That'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.

Re:Reverse Engineering the Hacker News Ranking Algorithm by nstj on Tuesday March 14, 2017 @11:55AM (#13868576)
> 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 :)

Re:Reverse Engineering the Hacker News Ranking Algorithm by sillysaurus3 on Tuesday March 14, 2017 @11:58AM (#13868613)
I mean, it's cool to see. I wish dang would show the latest version.

Maybe if all of us ask him nicely?

Re:Reverse Engineering the Hacker News Ranking Algorithm by jacquesm on Tuesday March 14, 2017 @01:02PM (#13869284)
Not 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.

Re:Reverse Engineering the Hacker News Ranking Algorithm by jedberg on Tuesday March 14, 2017 @02:29PM (#13870146)
reddit's is open source and available for anyone to see. Knowing the algorithm doesn't help you game it in this case -- it's knowing the spam controls that do, and those are secret.
Re:Reverse Engineering the Hacker News Ranking Algorithm by sillysaurus3 on Tuesday March 14, 2017 @01:08PM (#13869357)
From 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.

Re:Reverse Engineering the Hacker News Ranking Algorithm by jacquesm on Tuesday March 14, 2017 @01:14PM (#13869428)
That's not correct.

A person trying to game the front page could get all kinds of useful info from there. For instance how the flame detector and voting ring detector work and what penalties exist and when they trigger. The ranking algorithm is a lot more than a simple formula.

Re:Reverse Engineering the Hacker News Ranking Algorithm by sillysaurus3 on Tuesday March 14, 2017 @01:17PM (#13869461)
There was a flame detector (and presumably a voting ring detector) six years ago, but it wasn't revealed by pg showing off that algorithm. Dan could just redact whatever he's not comfortable showing.
Re:Reverse Engineering the Hacker News Ranking Algorithm by TheSpiceIsLife on Tuesday March 14, 2017 @09:43PM (#13873148)
They effectively have redacted whatever they're not comfortable showing.
Re:Reverse Engineering the Hacker News Ranking Algorithm by foob on Tuesday March 14, 2017 @11:57AM (#13868606)
To be fair, the ranking code is included in the article :-).