...
- 2010.10.11 - amix.dk - How Hacker News ranking algorithm works
- HN discussion
- I couldn't make sense of the Arc/Lisp code, but the Python version (of the original Arc implementation) is:
Code Block language py def calculate_score(votes, item_hour_age, gravity=1.8): return (votes - 1) / pow((item_hour_age+2), gravity)
- The practical takeaway from knowing how the algorithm works seems to line up with the advice people have been giving:
- The only way you can influence your article's ranking are by trying to influence 1) the age of your submission, and 2) the number of upvotes.
- Submit in the early morning on a weekday.
- A submission is heavily penalized by the algorithm for being more than a few hours old. If you submit your article at 3am Pacific and get only a handful of upvotes until 9am Pacific, and someone else submits at 9am Pacific and gets some friends to give them a "boost" of a few upvotes, and then both your articles begin getting upvoted at the same rate, the other person may end up with a (far?) higher score than you.
- Organize a group of people to upvote your article within the first 20-30 minutes of submitting.
- It isn't clear to me how PG arrived at "1.8" for the gravity factor. I'm guessing he just tried a bunch of different values and thought that worked well-enough
- ← The three values of gravity tried here are 0.5, 1.8, and 2.0.
- From looking at the graph, and from my experience with HN, it seems the gravity factor is tweaked to have the popular articles stay on the front page for hours, but the 'average' articles changing every few hours.
Tools
- HNPickup ← GitHub repo
- This is example of a simple data mining application. Here Hacker News aggregator is our source of data. The data mining objective is to figure out when is good time to post an article or a story on Hacker News website so other people will up-vote it and it will get to from the "newest" page to "news" page.
- Readers
...