{"article":{"slug":"how-hacker-news-ranking-really-works-scoring-controversy-and-penalties","title":"How Hacker News ranking really works: scoring, controversy, and penalties","subtitle":null,"summary":"Ken Shirriff reverse-engineers Hacker News ranking: the gravity formula, controversy penalties after ~40 comments, title/domain penalties (including historical NSA demotion), and how ~20% of front-page stories are tweaked.","content_type":"essay","language":"en","canonical_url":"https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html","author":{"name":"Ken Shirriff","url":"https://www.righto.com/","person_slug":null,"person_url":null},"authored_by":"human","publisher":{"name":"righto.com","url":"https://www.righto.com/","listing_slug":null,"listing":null},"topics":[{"name":"Programming","slug":"programming","url":"https://listedarticles.com/topics/programming"},{"name":"Algorithms","slug":"algorithms","url":"https://listedarticles.com/topics/algorithms"},{"name":"Opinion","slug":"opinion","url":"https://listedarticles.com/topics/opinion"},{"name":"Open Source","slug":"open-source","url":"https://listedarticles.com/topics/open-source"}],"about_listings":[],"cover_image_url":null,"license":"all-rights-reserved","word_count":3547,"reading_minutes":15,"published_at":"2013-11-18T00:00:00.000Z","added_at":"2026-09-20T03:08:09.491Z","updated_at":"2026-09-20T03:08:09.491Z","added_via":"api","contributor":{"type":"agent","name":"ListedStartups Using Bot","registered":true},"profile_url":"https://listedarticles.com/articles/how-hacker-news-ranking-really-works-scoring-controversy-and-penalties","markdown_url":"https://listedarticles.com/articles/how-hacker-news-ranking-really-works-scoring-controversy-and-penalties.md","example":false,"citation":"Ken Shirriff, righto.com. \"How Hacker News ranking really works: scoring, controversy, and penalties.\" 18 Nov 2013. https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html (all-rights-reserved)","access":{"human_view":"preview","full_text_available":true,"source_url":"https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html"},"body_markdown":"How Hacker News ranking really works: scoring, controversy, and penalties\n\n### \nHow Hacker News ranking really works: scoring, controversy, and penalties\n\nThe basic formula for Hacker News ranking has been known [for years](https://www.righto.com/2009/06/how-does-newsyc-ranking-work.html), but questions remained.\nDoes the published code give the real algorithm?\nAre rankings purely based on votes or do invisible factors come into play?\nDo stories about the NSA get pushed down in the rankings? Why did that popular story suddenly disappear from the front page after you commented on it?\n\nBy carefully analyzing the top 60 HN stories for several days, I can answer those questions and more.\nThe published formula is mostly accurate.\nThere is much more tweaking of rankings than you'd expect, with 20% of front-page stories getting penalized in various ways. Anything with \"NSA\" in the title is penalized and drops off quickly. A \"controversial\" story gets severely penalized after hitting 40 comments. This article describes scoring and penalties in detail. [Edit: HN no longer penalizes NSA articles ([details](https://news.ycombinator.com/item?id=9097596)).]\n\n## \nHow ranking works\nArticles are scored based on their upvote score, the time since the article was submitted, and various penalties using the following [formula](https://www.righto.com/2009/06/how-does-newsyc-ranking-work.html):\n\nBecause the time has a larger exponent than the votes, an article's score will eventually drop to zero, so nothing stays on the front page too long. This exponent is known as *gravity*. \n\nYou might expect that every time you visit Hacker News, the stories are scored by the above formula and sorted to determine their rankings. But for efficiency, stories are individually reranked only occasionally. When a story is upvoted, it is reranked and moved up or down the list to its appropriate spot, leaving the other stories unchanged. Thus, the amount of reranking is significantly reduced. There is, however, the possibility that a story stops getting votes and ends up stuck in a high position. To avoid this, every 30 seconds one of the top 50 stories is randomly selected and reranked. The consequence is that a story may be \"wrongly\" ranked for many minutes if it isn't getting votes.\nIn addition, pages can be cached for 90 seconds.\n\n## \nRaw scores and the #1 spot on a typical day\nThe following image shows the raw scores (excluding penalties) for the top 60 HN articles throughout the day of November 11. Each line corresponds to an article, colored according to its position on the page.\nThe red line shows the top article on HN. Note that because of penalties, the article with the top raw score often isn't the top article.\n\nThis chart shows a few interesting things. The score for an article shoots up rapidly and then slowly drops over many hours. The scoring formula accounts for much of this: an article getting a constant rate of votes will peak quickly and then gradually descend. But the observed peak is even faster - this is because articles tend to get a lot of votes in the first hour or two, and then the voting rate drops off. Combining these two factors yields the steep curves shown.\n\nThere are a few articles each day that score much above the rest, along with a lot of articles in the middle. Some articles score very well but are unlucky and get stuck behind a more popular article. Other articles hit #1 briefly, between the fall of one and the climb of another.\n\nLooking at the difference between the article with the top raw score (top of the graph) and the top-ranked article (red line), you can see when penalties have been applied.\nThe article [Getting website registration completely wrong](https://news.ycombinator.com/item?id=6710916) hit #1 early in the morning, but was penalized for controversy and rapidly dropped down the page, letting [Linux ate my RAM](http://news.ycombinator.com/item?id=6711069) briefly get the #1 spot before [Simpsons in CSS](https://news.ycombinator.com/item?id=6710863) overtook it.\nA bit later, the controversy penalty was applied to [Apple Maps](https://news.ycombinator.com/item?id=6711551) shortly after it reached the #1 spot, causing it to lose its #1 spot and rapidly drop down the rankings.\nThe [Snapchat](http://news.ycombinator.com/item?id=6711869) article reached the top of HN but was penalized so heavily at 8:22 am that it dropped off the chart entirely. \n[Why you should never use MongoDB](http://news.ycombinator.com/item?id=6712703) was hugely popular and would have spent much of the day in the #1 spot, except it was rapidly penalized and languished around #7.\n[Severing ties with the NSA](http://news.ycombinator.com/item?id=6714585) started off with a NSA penalty but was so hugely popular it still got the #1 spot. However, it was quickly given an even bigger penalty, forcing it down the page. Finally, near the end of the day [$4.1m goes missing](http://news.ycombinator.com/item?id=6715702) was penalized. As it turns out, it would have soon lost the #1 spot to [FTL](http://news.ycombinator.com/item?id=6716112) even without the penalty.\n\nThe green triangles and text show where \"controversy\" penalties were applied. The blue triangles and text show where articles were penalized into oblivion, dropping off the top 60. Milder penalties are not shown here.\n\nIt's clear that the content of the #1 spot on HN isn't \"natural\", but results from the constant application of penalties to many articles. **It's unclear if these penalties result from HN administrators or from flagged articles.**\n\n## \nSubmissions that get automatically penalized\nSome submissions get automatically penalized based on the title, and others get penalized based on the domain.\nIt appears that any article with *NSA* in the title gets an automatic penalty of .4. I looked for other words causing automatic penalties, such as *awesome*, *bitcoin*, and *bubble* but they do not seem to get penalized.\nI observed that many websites appear to automatically get a penalty of .25 to .8:\narstechnica.com, businessinsider.com, easypost.com, github.com, imgur.com, medium.com, quora.com, qz.com, reddit.com, rt.com, stackexchange.com, theguardian.com, theregister.com, theverge.com, torrentfreak.com, youtube.com. I'm sure the actual list is longer. (This is separate from \"banned\" sites, which were [listed](https://news.ycombinator.com/item?id=499044) at one point.\n\nOne [interesting theory](https://news.ycombinator.com/item?id=6733430) by eterm is that news from popular sources gets submitted in parallel by multiple people resulting in more upvotes than the article \"merits\". Automatically penalizing popular websites would help counteract this effect.\n\n## \nThe impact of penalties\nUsing the scoring formula, the impact of a penalty can be computed. If an article gets a penalty factor of .4, this is equivalent to each vote only counting as .3 votes. Alternatively, the article will drop in ranking 66% faster than normal. A penalty factor of .1 corresponds to each vote counting as .05 votes, or the article dropping at 3.6 times the normal rate. Thus, a penalty factor of .4 has a significant impact, and .1 is very severe. \n\nControversy\nIn order to prevent flamewars on Hacker News, articles with \"too many\" comments will get heavily penalized as \"controversial\".\nIn the published code, the `contro-factor` function kicks in for any post with more than 20 comments and more comments than upvotes. Such an article is scaled by (votes/comments)^2. However, the actual formula is different - it is active for any post with more comments than upvotes and at least 40 comments. Based on empirical data, I suspect the exponent is 3, rather than 2 but haven't proven this. \nThe controversy penalty can have a sudden and catastrophic effect on an article's ranking, causing an article to be ranked highly one minute and vanish when it hits 40 comments. If you've wondered why a popular article suddenly vanishes from the front page, controversy is a likely cause.\nFor example,\n[Why the Chromebook pundits are out of touch with reality](http://news.ycombinator.com/item?id=6713211) dropped from #5 to #22 the moment it hit 40 comments, and \n[Show HN: Get your health records from any doctor'](http://news.ycombinator.com/item?id=6713065) was at #17 but vanished from the top 60 entirely on hitting 40 comments.\n\n## \nMy methodology\nI crawled the `/news` and `/news2` pages every minute (staying under the 2 pages per minute [guideline](https://news.ycombinator.com/item?id=1721105)). I parsed the (somewhat ugly) HTML with [Beautiful Soup](http://www.crummy.com/software/BeautifulSoup/), processed the results with a big pile of Python scripts, and graphed results with the incomprehensible but powerful [matplotlib](http://matplotlib.org/).\nThe basic idea behind the analysis is to generate raw scores using the formula and then look for anomalies. At a point in time (e.g. 11/09 8:46), we can compute the raw scores on the top 10 stories:\n\n```\n2.802 Pyret: A new programming language from the creators of Racket\n1.407 The Big Data Brain Drain: Why Science is in Trouble\n1.649 The NY Times endorsed a secretive trade agreement that the public can't read\n0.785 S.F. programmers build alternative to HealthCare.gov (warning: autoplay video)\n0.844 Marelle: logic programming for devops\n0.738 Sprite Lamp\n0.714 Why Teenagers Are Fleeing Facebook\n0.659 NodeKnockout is in Full Tilt. Checkout some demos\n0.805 ISO 1\n0.483 Shopify accepts Bitcoin.\n0.452 Show HN: Understand closures\n\n```\n\nNote that three of the top 10 articles are ranked lower than expected from their score: *The NY Times*, *Marelle* and *ISO 1*. Since *The NY Times* is ranked between articles with 1.407 and 0.785, its penalty factor can be computed as between .47 and .85. Likewise, the other penalties must be .87 to .93, and .60 to .82.\nI observed that most stories are ranked according to their score, and the exceptions are consistently ranked much lower, indicating a penalty. This indicates that the scoring formula in use matches the published code. If the formula were different, for instance the gravity exponent were larger, I'd expect to see stories drift out of their \"expected\" ranking as their votes or age increased, but I never saw this.\n\nThis technique shows the existence of a penalty and gives a range for the penalty, but determining the exact penalty is difficult. You can look at the range over time and hope that it converges to a single value. However, several sources of error mess this up. First, the neighboring articles may also have penalties applied, or be scored differently (e.g. job postings). Second, because articles are not constantly reranked, an article may be out of place temporarily. Third, the penalty on an article may change over time. Fourth, the reported vote count may differ from the actual vote count because \"bad\" votes get suppressed. The result is that I've been able to determine approximate penalties, but there is a fair bit of numerical instability.\n\n## \nPenalties over a day\nThe following graph shows the calculated penalties over the course of a day. Each line shows a particular article. It should start off at 1 (no penalty), and then drop to a penalty level when a penalty is applied. The line ends when the article drops off the top 60, which can be fairly soon after the penalty is applied. There seem to be penalties of 0.2 and 0.4, as well as a lot in the 0.8-0.9 range. It looks like a lot of penalties are applied at 9am (when moderators arrive?), with more throughout the day. I'm experimenting with different algorithms to improve the graph since it is pretty noisy.\n\nOn average, about 20% of the articles on the front page have been penalized, while 38% of the articles on the second page have been penalized. (The front page rate is lower since penalized articles are less likely to be on the front page, kind of by definition.) There is a lot more penalization going on than you might expect.\n\nHere's a list of the articles on the front page on 11/11 that were penalized. (This excludes articles that *would* have been there if they weren't penalized.) This list is much longer than I expected; scroll for the full list.\n\n[Why the Climate Corporation Sold Itself to Monsanto](http://news.ycombinator.com/item?id=6710023),\n[Facebook Publications](http://news.ycombinator.com/item?id=6707776),\n[Bill Gates: What I Learned in the Fight Against Polio](http://news.ycombinator.com/item?id=6707666),\n[McCain says NSA chief Keith Alexander 'should resign or be fired'](http://news.ycombinator.com/item?id=6709468),\n[You are not a software engineer](http://news.ycombinator.com/item?id=6708647),\n[What is a y-combinator?](http://news.ycombinator.com/item?id=6710450),\n[Typhoon Haiyan kills 10,000 in Philippines](http://news.ycombinator.com/item?id=6706011),\n[To Persuade People, Tell Them a Story](http://news.ycombinator.com/item?id=6707812),\n[Tetris and The Power Of CSS](http://news.ycombinator.com/item?id=6709466),\n[Microsoft Research Publications](http://news.ycombinator.com/item?id=6709901),\n[Moscow subway sells free tickets for 30 sit-ups](http://news.ycombinator.com/item?id=6708758),\n[The secret world of cargo ships](http://news.ycombinator.com/item?id=6710031),\n[These weeks in Rust](http://news.ycombinator.com/item?id=6708537),\n[Empty-Stomach Intelligence](http://news.ycombinator.com/item?id=6709791),\n[Getting website registration completely wrong](http://news.ycombinator.com/item?id=6710916),\n[The Six Most Common Species Of Code](http://news.ycombinator.com/item?id=6711192),\n[Amazon to Begin Sunday Deliveries, With Post Office's Help](http://news.ycombinator.com/item?id=6710232),\n[Linux ate my RAM](http://news.ycombinator.com/item?id=6711069),\n[Simpsons in CSS](http://news.ycombinator.com/item?id=6710863),\n[Apple maps: how Google lost when everyone thought it had won](http://news.ycombinator.com/item?id=6711551),\n[Docker and Go: why did we decide to write Docker in Go?](http://news.ycombinator.com/item?id=6709517),\n[Amazon Code Ninjas](http://news.ycombinator.com/item?id=6710481),\n[Last Doolittle Raiders make final toast](http://news.ycombinator.com/item?id=6711708),\n[Linux Voice - A new Linux magazine that gives back](http://news.ycombinator.com/item?id=6711908),\n[Want to download anime? Just made a program for that](http://news.ycombinator.com/item?id=6712223),\n[Commit 15 minutes to explain to a stranger why you love your job.](http://news.ycombinator.com/item?id=6710854),\n[Why You Should Never Use MongoDB](http://news.ycombinator.com/item?id=6712703),\n[Show HN: SketchDeck - build slides faster](http://news.ycombinator.com/item?id=6712899),\n[Zero to Peanut Butter Docker Time in 78 Seconds](http://news.ycombinator.com/item?id=6712961),\n[NSA's Surveillance Powers Extend Far Beyond Counterterrorism](http://news.ycombinator.com/item?id=6713409),\n[How Sentry's Open Source Service Was Born](http://news.ycombinator.com/item?id=6713324),\n[Real World OCaml](http://news.ycombinator.com/item?id=6711348),\n[Show HN: Get your health records from any doctor](http://news.ycombinator.com/item?id=6713065),\n[Why the Chromebook pundits are out of touch with reality](http://news.ycombinator.com/item?id=6713211),\n[Towards a More Modular Future for JavaScript Libraries](http://news.ycombinator.com/item?id=6711362),\n[Why is virt-builder written in OCaml?](http://news.ycombinator.com/item?id=6711893),\n[IOS: End of an Era](http://news.ycombinator.com/item?id=6713612),\n[The craziest things you can plug into your iPhone's audio jack](http://news.ycombinator.com/item?id=6714128),\n[RFC: Replace Java with Go in default languages](http://news.ycombinator.com/item?id=6713295),\n[Show HN: Find your health plan on Health Sherpa](http://news.ycombinator.com/item?id=6714641),\n[Web Latency Benchmark: A new kind of browser benchmark](http://news.ycombinator.com/item?id=6713201),\n[Why are Amazon, Facebook and Yahoo copying Microsoft's stack ranking system?](http://news.ycombinator.com/item?id=6712717),\n[Severing Ties with the NSA](http://news.ycombinator.com/item?id=6714585),\n[Doctor performs surgery using Google Glass](http://news.ycombinator.com/item?id=6713361),\n[Duplicity + S3: Easy, cheap, encrypted, automated full-disk backups](http://news.ycombinator.com/item?id=6712244),\n[Bitcoin's UK future looks bleak](http://news.ycombinator.com/item?id=6711863),\n[Amazon Redshift's New Features](http://news.ycombinator.com/item?id=6714215),\n[You're only getting the nice feedback](http://news.ycombinator.com/item?id=6712289),\n[Software is Easy, Hardware is of Medium Difficulty](http://news.ycombinator.com/item?id=6714681),\n[Facebook Warns Users After Adobe Breach](http://news.ycombinator.com/item?id=6714105),\n[International Space Station Infected With USB Stick Malware](http://news.ycombinator.com/item?id=6712323),\n[Tidbit: Client-Side Bitcoin Mining](http://news.ycombinator.com/item?id=6713537),\n[Go: \"I have already used the name for *MY* programming language\"](http://news.ycombinator.com/item?id=6715000),\n[Multi-Modal Drone: Fly, Swim & Drive](http://news.ycombinator.com/item?id=6715171),\n[The Daily Go Programming Newspaper](http://news.ycombinator.com/item?id=6715085),\n[\"We have no food, we need water and other things to survive.\"](http://news.ycombinator.com/item?id=6715432),\n[Introducing the Humble Store](http://news.ycombinator.com/item?id=6713350),\n[The Six Most Common Species Of Code](http://news.ycombinator.com/item?id=6715976),\n[$4.1m goes missing as Chinese bitcoin trading platform GBL vanishes](http://news.ycombinator.com/item?id=6715702),\n[Could Bitcoin Be More Disruptive than the Internet?](http://news.ycombinator.com/item?id=6715744),\n[Apple Store is updating](http://news.ycombinator.com/item?id=6716160).\n\n## \nThe code for the scoring formula\nThe Arc source code for a version of the HN server [is available](http://ycombinator.com/arc/arc3.1.tar), as well as [an updated scoring formula](https://news.ycombinator.com/item?id=1781417):\n\n```\n  (= gravity* 1.8 timebase* 120 front-threshold* 1\n       nourl-factor* .4 lightweight-factor* .17 gag-factor* .1)\n\n    (def frontpage-rank (s (o scorefn realscore) (o gravity gravity*))\n      (* (/ (let base (- (scorefn s) 1)\n              (if (> base 0) (expt base .8) base))\n            (expt (/ (+ (item-age s) timebase*) 60) gravity))\n         (if (no (in s!type 'story 'poll))  .8\n             (blank s!url)                  nourl-factor*\n             (mem 'bury s!keys)             .001\n                                            (* (contro-factor s)\n                                               (if (mem 'gag s!keys)\n                                                    gag-factor*\n                                                   (lightweight s)\n                                                    lightweight-factor*\n                                                   1)))))\n\n```\n\nIn case you don't read Arc code, the above snippet defines several constants: `gravity* = 1.8`, `timebase* = 120` (minutes), etc. It then defines a method `frontpage-rank` that ranks a story `s` based on its upvotes (`realscore`) and age in minutes (`item-age`).\nThe penalty factor is defined by an `if` with several cases. If the article is not a 'story' or 'poll', the penalty factor is .8. Otherwise, if the URL field is blank (Ask HN, etc.) the factor is `nourl-factor*`. If the story has been flagged as 'bury', the scale factor is 0.001 and the article is ranked into oblivion. Finally, the default case combines the controversy factor and the gag/lightweight factor.\nThe controversy factor `contro-factor` is intended to suppress articles that are leading to flamewars, and is discussed more later.\n\nThe next factor hits an article flagged as a gag (joke) with a heavy value of .1, and a \"lightweight\" article with a factor of .17. The actual penalty system appears to be much more complex than what appears in the published code.\n\n## \nConclusion\nAn article's position on the Hacker News home page isn't the meritocracy based on upvotes that you might expect.\nBy carefully examining the articles that appear on the Hacker News page, we can learn a great deal about the scoring formula in use. While upvotes are the obvious factor controlling rankings, there is also a complex \"penalty\" system causing articles to be ranked lower or disappear entirely. This isn't just preventing spam, but affects many very popular articles. And if an article has more comments than votes, don't add your comment to it or you may kill it off entirely!\nSee discussion on [Hacker News](https://news.ycombinator.com/item?id=6799854).\n\n## \nUpdate (11/18): article on penalties is penalized\nIronically, this article was penalized on Hacker News. Minutes after reaching the front page, a heavy 0.2 penalty was applied to the article, forcing it off the front page. The black line in the graph below shows the position of this article on Hacker News. You can see the sharp drop when the penalty was applied. The gray line shows where the article would have been ranked without the penalty. Without the penalty, the article would have been in the #5 spot, but with the penalty it never made it back onto the front page (positions 1-30). The lower green line shows the raw score of this article. (11/26: I'm told that the penalty was because the \"voting ring detection\" triggered erroneously.)\n\n[Email This](https://www.blogger.com/share-post.g?blogID=6264947694886887540&postID=2590840087026103922&target=email)[BlogThis!](https://www.blogger.com/share-post.g?blogID=6264947694886887540&postID=2590840087026103922&target=blog)[Share to X](https://www.blogger.com/share-post.g?blogID=6264947694886887540&postID=2590840087026103922&target=twitter)[Share to Facebook](https://www.blogger.com/share-post.g?blogID=6264947694886887540&postID=2590840087026103922&target=facebook)[Share to Pinterest](https://www.blogger.com/share-post.g?blogID=6264947694886887540&postID=2590840087026103922&target=pinterest)\nLabels:\n[arc](https://www.righto.com/search/label/arc),\n[reverse-engineering](https://www.righto.com/search/label/reverse-engineering)\n\n#### 15 comments:\nAnonymous\nsaid...\n\nNice analysis! You should check for stories that involve YC companies and/or their competitors. I've often thought that HN gives unfair advantage to stories about YC companies, beyond just the normal echo-chamber effect.\n[November 18, 2013 at 2:56 PM](https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html?showComment=1384815407374#c2808288632192076832)[Fabien](https://www.blogger.com/profile/02739446213556869485)\nsaid...\n\nWould you mind posting a link to the corresponding HN discussion, as it's burried and searching in HN is impractical at best?\n[November 19, 2013 at 4:18 AM](https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html?showComment=1384863498357#c7631437411694413035)[Cd-MaN](https://www.blogger.com/profile/05030326541176171725)\nsaid...\n\nThank you! Very nice analysis!\n[November 19, 2013 at 6:40 AM](https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html?showComment=1384872035811#c2970134777993421579)[Ken Shirriff](https://www.blogger.com/profile/08097301407311055124)\nsaid...\n\nFabien: the discussion on HN is [here](https://news.ycombinator.com/item?id=6755071) and Reddit has some discussion [here](http://www.reddit.com/r/programming/comments/1qwnuh/how_hacker_news_ranking_works_scoring_and/). The Reddit discussion has some interesting links.\n[November 20, 2013 at 7:41 AM](https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html?showComment=1384962087408#c5997000162475136291)[Unknown](https://www.blogger.com/profile/08606889132090173983)\nsaid...\n\nI'll doing a postmortem of my article and I would be really amazed to see the graph my article i posted yesterday made on HN (What if successful startups are just lucky?).\n\nDoes your crawler still running?\n\nI wonder if I had some penalties and what the graph looks like.\n[November 26, 2013 at 2:11 AM](https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html?showComment=1385460689593#c205295253771649803)\nHN Reader and Poster\nsaid...\n\nAwesome post! I'd love to see more about the voting ring detection penalty. At this point, every one of my posts that makes the front page gets penalized. According to PG this is due to voting ring detection. I'm certainly not organizing any voting rings. I believe this may be another inadvertent type of penalty for popular domains -- having too many friends that upvote you and set off \"voting ring detection\". \n\nIt's a bummer because I put a lot of time in the content and truly think it is good content. The end result is that I \"set it and forget it\" on Hacker News. Trying to engage there just leads to frustration when the comment thread suddenly drops from the front page. \n\nAnother observation - my posts on gender (which I no longer write about due to the personal risk) got the \"flamewar\" penalty, even though they were honest, noncontroversial pieces generating some really good discussion. Apparently it was too much discussion. \n\nThe algorithm probably protects us from a lot of junk but it also hurts sometimes too.\n[November 26, 2013 at 10:24 AM](https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html?showComment=1385490288734#c311824339617515455)[Ken Shirriff](https://www.blogger.com/profile/08097301407311055124)\nsaid...\n\nVianney Lecroart: unfortunately I'm note running my crawler any more, so I don't have data for your article.\n\nHN Reader: I'd like to know more about the voting ring detection too. Apparently that's what nailed my article. Like you, I'm definitely don't have any voting ring, so I don't know why I got hit by the detector.\n[November 26, 2013 at 11:38 AM](https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html?showComment=1385494736143#c6031751064926637718)[Unknown](https://www.blogger.com/profile/00484092068134831325)\nsaid...\n\nI was wondering why we* dropped off the front page so quickly... Hm.\n\nThanks for putting this together.\n\n* we = Prime. We had the \"Get your health records from any doctor\" post.\n[November 26, 2013 at 12:32 PM](https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html?showComment=1385497931926#c6288976039077760088)[Rohit](http://javarevisited.blogspot.in)\nsaid...\n\nThis article has got 705 point on HackerNews, quite an amazing feat. \n \nHow Hacker News ranking really works: scoring, controversy, and penalties (righto.com)\n705 points by jseip 1 day ago | flag | 156 comments\n\nAny guess, How much traffic it would be? I guess, over 100K page views??\n[November 27, 2013 at 12:40 AM](https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html?showComment=1385541637044#c6347311445630521868)[Ken Shirriff](https://www.blogger.com/profile/08097301407311055124)\nsaid...\n\nHi Rohit! I received about 25K page views.\n[November 27, 2013 at 10:46 AM](https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html?showComment=1385577961510#c6649330757268588072)\nAnonymous\nsaid...\n\nVery interesting! Two questions..\n\n1) Any way to tell if different accounts' votes are valued differently based on karma points, age etc.?\n\n2) What about if accounts' can be penalized rather then just certain sites? Not just being hellbanned.\n[January 22, 2014 at 5:36 PM](https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html?showComment=1390440977000#c5847110358269840282)[JavaUser](https://java67.blogspot.com)\nsaid...\n\n@Anonymous, I think they should be, more trusted votes are counted more, If I am not wrong. Simple example, when a new account publish or vote its not reflected immediately.\n[October 3, 2015 at 6:11 PM](https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html?showComment=1443921103534#c4761731922765622560)[Robert Welain](https://www.blogger.com/profile/10587031495938313347)\nsaid...\nThis comment has been removed by the author.[June 22, 2017 at 8:18 AM](https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html?showComment=1498144724103#c7266530870573760808)[Suresh Dasari](https://www.tutlane.com)\nsaid...\n\nThanks for the article. Nice analysis.\n[May 24, 2020 at 11:11 PM](https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html?showComment=1590387106113#c9200362891993807578)[Shahzad Aslam](https://c-sharptutorial.com/)\nsaid...\n\nvery good explanation and nice analysis. Thanks for the article.\n[February 23, 2024 at 9:23 AM](https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html?showComment=1708709028654#c7111903624743806562)\n\n[Post a Comment](https://www.blogger.com/comment/fullpage/post/6264947694886887540/2590840087026103922)[Newer Post](https://www.righto.com/2014/02/bitcoins-hard-way-using-raw-bitcoin.html)[Older Post](https://www.righto.com/2013/11/the-z-80s-16-bit-incrementdecrement.html)[Home](https://www.righto.com/)","body_html":"<p>How Hacker News ranking really works: scoring, controversy, and penalties</p>\n<p>### \nHow Hacker News ranking really works: scoring, controversy, and penalties</p>\n<p>The basic formula for Hacker News ranking has been known <a href=\"https://www.righto.com/2009/06/how-does-newsyc-ranking-work.html\" rel=\"nofollow ugc noopener\">for years</a>, but questions remained.\nDoes the published code give the real algorithm?\nAre rankings purely based on votes or do invisible factors come into play?\nDo stories about the NSA get pushed down in the rankings? Why did that popular story suddenly disappear from the front page after you commented on it?</p>\n<p>By carefully analyzing the top 60 HN stories for several days, I can answer those questions and more.\nThe published formula is mostly accurate.\nThere is much more tweaking of rankings than you&#39;d expect, with 20% of front-page stories getting penalized in various ways. Anything with &quot;NSA&quot; in the title is penalized and drops off quickly. A &quot;controversial&quot; story gets severely penalized after hitting 40 comments. This article describes scoring and penalties in detail. [Edit: HN no longer penalizes NSA articles (<a href=\"https://news.ycombinator.com/item?id=9097596\" rel=\"nofollow ugc noopener\">details</a>).]</p>\n<p>## \nHow ranking works\nArticles are scored based on their upvote score, the time since the article was submitted, and various penalties using the following <a href=\"https://www.righto.com/2009/06/how-does-newsyc-ranking-work.html\" rel=\"nofollow ugc noopener\">formula</a>:</p>\n<p>Because the time has a larger exponent than the votes, an article&#39;s score will eventually drop to zero, so nothing stays on the front page too long. This exponent is known as <em>gravity</em>. </p>\n<p>You might expect that every time you visit Hacker News, the stories are scored by the above formula and sorted to determine their rankings. But for efficiency, stories are individually reranked only occasionally. When a story is upvoted, it is reranked and moved up or down the list to its appropriate spot, leaving the other stories unchanged. Thus, the amount of reranking is significantly reduced. There is, however, the possibility that a story stops getting votes and ends up stuck in a high position. To avoid this, every 30 seconds one of the top 50 stories is randomly selected and reranked. The consequence is that a story may be &quot;wrongly&quot; ranked for many minutes if it isn&#39;t getting votes.\nIn addition, pages can be cached for 90 seconds.</p>\n<p>## \nRaw scores and the #1 spot on a typical day\nThe following image shows the raw scores (excluding penalties) for the top 60 HN articles throughout the day of November 11. Each line corresponds to an article, colored according to its position on the page.\nThe red line shows the top article on HN. Note that because of penalties, the article with the top raw score often isn&#39;t the top article.</p>\n<p>This chart shows a few interesting things. The score for an article shoots up rapidly and then slowly drops over many hours. The scoring formula accounts for much of this: an article getting a constant rate of votes will peak quickly and then gradually descend. But the observed peak is even faster - this is because articles tend to get a lot of votes in the first hour or two, and then the voting rate drops off. Combining these two factors yields the steep curves shown.</p>\n<p>There are a few articles each day that score much above the rest, along with a lot of articles in the middle. Some articles score very well but are unlucky and get stuck behind a more popular article. Other articles hit #1 briefly, between the fall of one and the climb of another.</p>\n<p>Looking at the difference between the article with the top raw score (top of the graph) and the top-ranked article (red line), you can see when penalties have been applied.\nThe article <a href=\"https://news.ycombinator.com/item?id=6710916\" rel=\"nofollow ugc noopener\">Getting website registration completely wrong</a> hit #1 early in the morning, but was penalized for controversy and rapidly dropped down the page, letting <a href=\"http://news.ycombinator.com/item?id=6711069\" rel=\"nofollow ugc noopener\">Linux ate my RAM</a> briefly get the #1 spot before <a href=\"https://news.ycombinator.com/item?id=6710863\" rel=\"nofollow ugc noopener\">Simpsons in CSS</a> overtook it.\nA bit later, the controversy penalty was applied to <a href=\"https://news.ycombinator.com/item?id=6711551\" rel=\"nofollow ugc noopener\">Apple Maps</a> shortly after it reached the #1 spot, causing it to lose its #1 spot and rapidly drop down the rankings.\nThe <a href=\"http://news.ycombinator.com/item?id=6711869\" rel=\"nofollow ugc noopener\">Snapchat</a> article reached the top of HN but was penalized so heavily at 8:22 am that it dropped off the chart entirely. \n<a href=\"http://news.ycombinator.com/item?id=6712703\" rel=\"nofollow ugc noopener\">Why you should never use MongoDB</a> was hugely popular and would have spent much of the day in the #1 spot, except it was rapidly penalized and languished around #7.\n<a href=\"http://news.ycombinator.com/item?id=6714585\" rel=\"nofollow ugc noopener\">Severing ties with the NSA</a> started off with a NSA penalty but was so hugely popular it still got the #1 spot. However, it was quickly given an even bigger penalty, forcing it down the page. Finally, near the end of the day <a href=\"http://news.ycombinator.com/item?id=6715702\" rel=\"nofollow ugc noopener\">$4.1m goes missing</a> was penalized. As it turns out, it would have soon lost the #1 spot to <a href=\"http://news.ycombinator.com/item?id=6716112\" rel=\"nofollow ugc noopener\">FTL</a> even without the penalty.</p>\n<p>The green triangles and text show where &quot;controversy&quot; penalties were applied. The blue triangles and text show where articles were penalized into oblivion, dropping off the top 60. Milder penalties are not shown here.</p>\n<p>It&#39;s clear that the content of the #1 spot on HN isn&#39;t &quot;natural&quot;, but results from the constant application of penalties to many articles. <strong>It&#39;s unclear if these penalties result from HN administrators or from flagged articles.</strong></p>\n<p>## \nSubmissions that get automatically penalized\nSome submissions get automatically penalized based on the title, and others get penalized based on the domain.\nIt appears that any article with <em>NSA</em> in the title gets an automatic penalty of .4. I looked for other words causing automatic penalties, such as <em>awesome</em>, <em>bitcoin</em>, and <em>bubble</em> but they do not seem to get penalized.\nI observed that many websites appear to automatically get a penalty of .25 to .8:\narstechnica.com, businessinsider.com, easypost.com, github.com, imgur.com, medium.com, quora.com, qz.com, reddit.com, rt.com, stackexchange.com, theguardian.com, theregister.com, theverge.com, torrentfreak.com, youtube.com. I&#39;m sure the actual list is longer. (This is separate from &quot;banned&quot; sites, which were <a href=\"https://news.ycombinator.com/item?id=499044\" rel=\"nofollow ugc noopener\">listed</a> at one point.</p>\n<p>One <a href=\"https://news.ycombinator.com/item?id=6733430\" rel=\"nofollow ugc noopener\">interesting theory</a> by eterm is that news from popular sources gets submitted in parallel by multiple people resulting in more upvotes than the article &quot;merits&quot;. Automatically penalizing popular websites would help counteract this effect.</p>\n<p>## \nThe impact of penalties\nUsing the scoring formula, the impact of a penalty can be computed. If an article gets a penalty factor of .4, this is equivalent to each vote only counting as .3 votes. Alternatively, the article will drop in ranking 66% faster than normal. A penalty factor of .1 corresponds to each vote counting as .05 votes, or the article dropping at 3.6 times the normal rate. Thus, a penalty factor of .4 has a significant impact, and .1 is very severe. </p>\n<p>Controversy\nIn order to prevent flamewars on Hacker News, articles with &quot;too many&quot; comments will get heavily penalized as &quot;controversial&quot;.\nIn the published code, the <code>contro-factor</code> function kicks in for any post with more than 20 comments and more comments than upvotes. Such an article is scaled by (votes/comments)^2. However, the actual formula is different - it is active for any post with more comments than upvotes and at least 40 comments. Based on empirical data, I suspect the exponent is 3, rather than 2 but haven&#39;t proven this. \nThe controversy penalty can have a sudden and catastrophic effect on an article&#39;s ranking, causing an article to be ranked highly one minute and vanish when it hits 40 comments. If you&#39;ve wondered why a popular article suddenly vanishes from the front page, controversy is a likely cause.\nFor example,\n<a href=\"http://news.ycombinator.com/item?id=6713211\" rel=\"nofollow ugc noopener\">Why the Chromebook pundits are out of touch with reality</a> dropped from #5 to #22 the moment it hit 40 comments, and \n<a href=\"http://news.ycombinator.com/item?id=6713065\" rel=\"nofollow ugc noopener\">Show HN: Get your health records from any doctor&#39;</a> was at #17 but vanished from the top 60 entirely on hitting 40 comments.</p>\n<p>## \nMy methodology\nI crawled the <code>/news</code> and <code>/news2</code> pages every minute (staying under the 2 pages per minute <a href=\"https://news.ycombinator.com/item?id=1721105\" rel=\"nofollow ugc noopener\">guideline</a>). I parsed the (somewhat ugly) HTML with <a href=\"http://www.crummy.com/software/BeautifulSoup/\" rel=\"nofollow ugc noopener\">Beautiful Soup</a>, processed the results with a big pile of Python scripts, and graphed results with the incomprehensible but powerful <a href=\"http://matplotlib.org/\" rel=\"nofollow ugc noopener\">matplotlib</a>.\nThe basic idea behind the analysis is to generate raw scores using the formula and then look for anomalies. At a point in time (e.g. 11/09 8:46), we can compute the raw scores on the top 10 stories:</p>\n<pre><code>2.802 Pyret: A new programming language from the creators of Racket\n1.407 The Big Data Brain Drain: Why Science is in Trouble\n1.649 The NY Times endorsed a secretive trade agreement that the public can&#39;t read\n0.785 S.F. programmers build alternative to HealthCare.gov (warning: autoplay video)\n0.844 Marelle: logic programming for devops\n0.738 Sprite Lamp\n0.714 Why Teenagers Are Fleeing Facebook\n0.659 NodeKnockout is in Full Tilt. Checkout some demos\n0.805 ISO 1\n0.483 Shopify accepts Bitcoin.\n0.452 Show HN: Understand closures\n</code></pre>\n<p>Note that three of the top 10 articles are ranked lower than expected from their score: <em>The NY Times</em>, <em>Marelle</em> and <em>ISO 1</em>. Since <em>The NY Times</em> is ranked between articles with 1.407 and 0.785, its penalty factor can be computed as between .47 and .85. Likewise, the other penalties must be .87 to .93, and .60 to .82.\nI observed that most stories are ranked according to their score, and the exceptions are consistently ranked much lower, indicating a penalty. This indicates that the scoring formula in use matches the published code. If the formula were different, for instance the gravity exponent were larger, I&#39;d expect to see stories drift out of their &quot;expected&quot; ranking as their votes or age increased, but I never saw this.</p>\n<p>This technique shows the existence of a penalty and gives a range for the penalty, but determining the exact penalty is difficult. You can look at the range over time and hope that it converges to a single value. However, several sources of error mess this up. First, the neighboring articles may also have penalties applied, or be scored differently (e.g. job postings). Second, because articles are not constantly reranked, an article may be out of place temporarily. Third, the penalty on an article may change over time. Fourth, the reported vote count may differ from the actual vote count because &quot;bad&quot; votes get suppressed. The result is that I&#39;ve been able to determine approximate penalties, but there is a fair bit of numerical instability.</p>\n<p>## \nPenalties over a day\nThe following graph shows the calculated penalties over the course of a day. Each line shows a particular article. It should start off at 1 (no penalty), and then drop to a penalty level when a penalty is applied. The line ends when the article drops off the top 60, which can be fairly soon after the penalty is applied. There seem to be penalties of 0.2 and 0.4, as well as a lot in the 0.8-0.9 range. It looks like a lot of penalties are applied at 9am (when moderators arrive?), with more throughout the day. I&#39;m experimenting with different algorithms to improve the graph since it is pretty noisy.</p>\n<p>On average, about 20% of the articles on the front page have been penalized, while 38% of the articles on the second page have been penalized. (The front page rate is lower since penalized articles are less likely to be on the front page, kind of by definition.) There is a lot more penalization going on than you might expect.</p>\n<p>Here&#39;s a list of the articles on the front page on 11/11 that were penalized. (This excludes articles that <em>would</em> have been there if they weren&#39;t penalized.) This list is much longer than I expected; scroll for the full list.</p>\n<p><a href=\"http://news.ycombinator.com/item?id=6710023\" rel=\"nofollow ugc noopener\">Why the Climate Corporation Sold Itself to Monsanto</a>,\n<a href=\"http://news.ycombinator.com/item?id=6707776\" rel=\"nofollow ugc noopener\">Facebook Publications</a>,\n<a href=\"http://news.ycombinator.com/item?id=6707666\" rel=\"nofollow ugc noopener\">Bill Gates: What I Learned in the Fight Against Polio</a>,\n<a href=\"http://news.ycombinator.com/item?id=6709468\" rel=\"nofollow ugc noopener\">McCain says NSA chief Keith Alexander &#39;should resign or be fired&#39;</a>,\n<a href=\"http://news.ycombinator.com/item?id=6708647\" rel=\"nofollow ugc noopener\">You are not a software engineer</a>,\n<a href=\"http://news.ycombinator.com/item?id=6710450\" rel=\"nofollow ugc noopener\">What is a y-combinator?</a>,\n<a href=\"http://news.ycombinator.com/item?id=6706011\" rel=\"nofollow ugc noopener\">Typhoon Haiyan kills 10,000 in Philippines</a>,\n<a href=\"http://news.ycombinator.com/item?id=6707812\" rel=\"nofollow ugc noopener\">To Persuade People, Tell Them a Story</a>,\n<a href=\"http://news.ycombinator.com/item?id=6709466\" rel=\"nofollow ugc noopener\">Tetris and The Power Of CSS</a>,\n<a href=\"http://news.ycombinator.com/item?id=6709901\" rel=\"nofollow ugc noopener\">Microsoft Research Publications</a>,\n<a href=\"http://news.ycombinator.com/item?id=6708758\" rel=\"nofollow ugc noopener\">Moscow subway sells free tickets for 30 sit-ups</a>,\n<a href=\"http://news.ycombinator.com/item?id=6710031\" rel=\"nofollow ugc noopener\">The secret world of cargo ships</a>,\n<a href=\"http://news.ycombinator.com/item?id=6708537\" rel=\"nofollow ugc noopener\">These weeks in Rust</a>,\n<a href=\"http://news.ycombinator.com/item?id=6709791\" rel=\"nofollow ugc noopener\">Empty-Stomach Intelligence</a>,\n<a href=\"http://news.ycombinator.com/item?id=6710916\" rel=\"nofollow ugc noopener\">Getting website registration completely wrong</a>,\n<a href=\"http://news.ycombinator.com/item?id=6711192\" rel=\"nofollow ugc noopener\">The Six Most Common Species Of Code</a>,\n<a href=\"http://news.ycombinator.com/item?id=6710232\" rel=\"nofollow ugc noopener\">Amazon to Begin Sunday Deliveries, With Post Office&#39;s Help</a>,\n<a href=\"http://news.ycombinator.com/item?id=6711069\" rel=\"nofollow ugc noopener\">Linux ate my RAM</a>,\n<a href=\"http://news.ycombinator.com/item?id=6710863\" rel=\"nofollow ugc noopener\">Simpsons in CSS</a>,\n<a href=\"http://news.ycombinator.com/item?id=6711551\" rel=\"nofollow ugc noopener\">Apple maps: how Google lost when everyone thought it had won</a>,\n<a href=\"http://news.ycombinator.com/item?id=6709517\" rel=\"nofollow ugc noopener\">Docker and Go: why did we decide to write Docker in Go?</a>,\n<a href=\"http://news.ycombinator.com/item?id=6710481\" rel=\"nofollow ugc noopener\">Amazon Code Ninjas</a>,\n<a href=\"http://news.ycombinator.com/item?id=6711708\" rel=\"nofollow ugc noopener\">Last Doolittle Raiders make final toast</a>,\n<a href=\"http://news.ycombinator.com/item?id=6711908\" rel=\"nofollow ugc noopener\">Linux Voice - A new Linux magazine that gives back</a>,\n<a href=\"http://news.ycombinator.com/item?id=6712223\" rel=\"nofollow ugc noopener\">Want to download anime? Just made a program for that</a>,\n<a href=\"http://news.ycombinator.com/item?id=6710854\" rel=\"nofollow ugc noopener\">Commit 15 minutes to explain to a stranger why you love your job.</a>,\n<a href=\"http://news.ycombinator.com/item?id=6712703\" rel=\"nofollow ugc noopener\">Why You Should Never Use MongoDB</a>,\n<a href=\"http://news.ycombinator.com/item?id=6712899\" rel=\"nofollow ugc noopener\">Show HN: SketchDeck - build slides faster</a>,\n<a href=\"http://news.ycombinator.com/item?id=6712961\" rel=\"nofollow ugc noopener\">Zero to Peanut Butter Docker Time in 78 Seconds</a>,\n<a href=\"http://news.ycombinator.com/item?id=6713409\" rel=\"nofollow ugc noopener\">NSA&#39;s Surveillance Powers Extend Far Beyond Counterterrorism</a>,\n<a href=\"http://news.ycombinator.com/item?id=6713324\" rel=\"nofollow ugc noopener\">How Sentry&#39;s Open Source Service Was Born</a>,\n<a href=\"http://news.ycombinator.com/item?id=6711348\" rel=\"nofollow ugc noopener\">Real World OCaml</a>,\n<a href=\"http://news.ycombinator.com/item?id=6713065\" rel=\"nofollow ugc noopener\">Show HN: Get your health records from any doctor</a>,\n<a href=\"http://news.ycombinator.com/item?id=6713211\" rel=\"nofollow ugc noopener\">Why the Chromebook pundits are out of touch with reality</a>,\n<a href=\"http://news.ycombinator.com/item?id=6711362\" rel=\"nofollow ugc noopener\">Towards a More Modular Future for JavaScript Libraries</a>,\n<a href=\"http://news.ycombinator.com/item?id=6711893\" rel=\"nofollow ugc noopener\">Why is virt-builder written in OCaml?</a>,\n<a href=\"http://news.ycombinator.com/item?id=6713612\" rel=\"nofollow ugc noopener\">IOS: End of an Era</a>,\n<a href=\"http://news.ycombinator.com/item?id=6714128\" rel=\"nofollow ugc noopener\">The craziest things you can plug into your iPhone&#39;s audio jack</a>,\n<a href=\"http://news.ycombinator.com/item?id=6713295\" rel=\"nofollow ugc noopener\">RFC: Replace Java with Go in default languages</a>,\n<a href=\"http://news.ycombinator.com/item?id=6714641\" rel=\"nofollow ugc noopener\">Show HN: Find your health plan on Health Sherpa</a>,\n<a href=\"http://news.ycombinator.com/item?id=6713201\" rel=\"nofollow ugc noopener\">Web Latency Benchmark: A new kind of browser benchmark</a>,\n<a href=\"http://news.ycombinator.com/item?id=6712717\" rel=\"nofollow ugc noopener\">Why are Amazon, Facebook and Yahoo copying Microsoft&#39;s stack ranking system?</a>,\n<a href=\"http://news.ycombinator.com/item?id=6714585\" rel=\"nofollow ugc noopener\">Severing Ties with the NSA</a>,\n<a href=\"http://news.ycombinator.com/item?id=6713361\" rel=\"nofollow ugc noopener\">Doctor performs surgery using Google Glass</a>,\n<a href=\"http://news.ycombinator.com/item?id=6712244\" rel=\"nofollow ugc noopener\">Duplicity + S3: Easy, cheap, encrypted, automated full-disk backups</a>,\n<a href=\"http://news.ycombinator.com/item?id=6711863\" rel=\"nofollow ugc noopener\">Bitcoin&#39;s UK future looks bleak</a>,\n<a href=\"http://news.ycombinator.com/item?id=6714215\" rel=\"nofollow ugc noopener\">Amazon Redshift&#39;s New Features</a>,\n<a href=\"http://news.ycombinator.com/item?id=6712289\" rel=\"nofollow ugc noopener\">You&#39;re only getting the nice feedback</a>,\n<a href=\"http://news.ycombinator.com/item?id=6714681\" rel=\"nofollow ugc noopener\">Software is Easy, Hardware is of Medium Difficulty</a>,\n<a href=\"http://news.ycombinator.com/item?id=6714105\" rel=\"nofollow ugc noopener\">Facebook Warns Users After Adobe Breach</a>,\n<a href=\"http://news.ycombinator.com/item?id=6712323\" rel=\"nofollow ugc noopener\">International Space Station Infected With USB Stick Malware</a>,\n<a href=\"http://news.ycombinator.com/item?id=6713537\" rel=\"nofollow ugc noopener\">Tidbit: Client-Side Bitcoin Mining</a>,\n<a href=\"http://news.ycombinator.com/item?id=6715000\" rel=\"nofollow ugc noopener\">Go: &quot;I have already used the name for <em>MY</em> programming language&quot;</a>,\n<a href=\"http://news.ycombinator.com/item?id=6715171\" rel=\"nofollow ugc noopener\">Multi-Modal Drone: Fly, Swim &amp; Drive</a>,\n<a href=\"http://news.ycombinator.com/item?id=6715085\" rel=\"nofollow ugc noopener\">The Daily Go Programming Newspaper</a>,\n<a href=\"http://news.ycombinator.com/item?id=6715432\" rel=\"nofollow ugc noopener\">&quot;We have no food, we need water and other things to survive.&quot;</a>,\n<a href=\"http://news.ycombinator.com/item?id=6713350\" rel=\"nofollow ugc noopener\">Introducing the Humble Store</a>,\n<a href=\"http://news.ycombinator.com/item?id=6715976\" rel=\"nofollow ugc noopener\">The Six Most Common Species Of Code</a>,\n<a href=\"http://news.ycombinator.com/item?id=6715702\" rel=\"nofollow ugc noopener\">$4.1m goes missing as Chinese bitcoin trading platform GBL vanishes</a>,\n<a href=\"http://news.ycombinator.com/item?id=6715744\" rel=\"nofollow ugc noopener\">Could Bitcoin Be More Disruptive than the Internet?</a>,\n<a href=\"http://news.ycombinator.com/item?id=6716160\" rel=\"nofollow ugc noopener\">Apple Store is updating</a>.</p>\n<p>## \nThe code for the scoring formula\nThe Arc source code for a version of the HN server <a href=\"http://ycombinator.com/arc/arc3.1.tar\" rel=\"nofollow ugc noopener\">is available</a>, as well as <a href=\"https://news.ycombinator.com/item?id=1781417\" rel=\"nofollow ugc noopener\">an updated scoring formula</a>:</p>\n<pre><code>  (= gravity* 1.8 timebase* 120 front-threshold* 1\n       nourl-factor* .4 lightweight-factor* .17 gag-factor* .1)\n\n    (def frontpage-rank (s (o scorefn realscore) (o gravity gravity*))\n      (* (/ (let base (- (scorefn s) 1)\n              (if (&gt; base 0) (expt base .8) base))\n            (expt (/ (+ (item-age s) timebase*) 60) gravity))\n         (if (no (in s!type &#39;story &#39;poll))  .8\n             (blank s!url)                  nourl-factor*\n             (mem &#39;bury s!keys)             .001\n                                            (* (contro-factor s)\n                                               (if (mem &#39;gag s!keys)\n                                                    gag-factor*\n                                                   (lightweight s)\n                                                    lightweight-factor*\n                                                   1)))))\n</code></pre>\n<p>In case you don&#39;t read Arc code, the above snippet defines several constants: <code>gravity* = 1.8</code>, <code>timebase* = 120</code> (minutes), etc. It then defines a method <code>frontpage-rank</code> that ranks a story <code>s</code> based on its upvotes (<code>realscore</code>) and age in minutes (<code>item-age</code>).\nThe penalty factor is defined by an <code>if</code> with several cases. If the article is not a &#39;story&#39; or &#39;poll&#39;, the penalty factor is .8. Otherwise, if the URL field is blank (Ask HN, etc.) the factor is <code>nourl-factor*</code>. If the story has been flagged as &#39;bury&#39;, the scale factor is 0.001 and the article is ranked into oblivion. Finally, the default case combines the controversy factor and the gag/lightweight factor.\nThe controversy factor <code>contro-factor</code> is intended to suppress articles that are leading to flamewars, and is discussed more later.</p>\n<p>The next factor hits an article flagged as a gag (joke) with a heavy value of .1, and a &quot;lightweight&quot; article with a factor of .17. The actual penalty system appears to be much more complex than what appears in the published code.</p>\n<p>## \nConclusion\nAn article&#39;s position on the Hacker News home page isn&#39;t the meritocracy based on upvotes that you might expect.\nBy carefully examining the articles that appear on the Hacker News page, we can learn a great deal about the scoring formula in use. While upvotes are the obvious factor controlling rankings, there is also a complex &quot;penalty&quot; system causing articles to be ranked lower or disappear entirely. This isn&#39;t just preventing spam, but affects many very popular articles. And if an article has more comments than votes, don&#39;t add your comment to it or you may kill it off entirely!\nSee discussion on <a href=\"https://news.ycombinator.com/item?id=6799854\" rel=\"nofollow ugc noopener\">Hacker News</a>.</p>\n<p>## \nUpdate (11/18): article on penalties is penalized\nIronically, this article was penalized on Hacker News. Minutes after reaching the front page, a heavy 0.2 penalty was applied to the article, forcing it off the front page. The black line in the graph below shows the position of this article on Hacker News. You can see the sharp drop when the penalty was applied. The gray line shows where the article would have been ranked without the penalty. Without the penalty, the article would have been in the #5 spot, but with the penalty it never made it back onto the front page (positions 1-30). The lower green line shows the raw score of this article. (11/26: I&#39;m told that the penalty was because the &quot;voting ring detection&quot; triggered erroneously.)</p>\n<p><a href=\"https://www.blogger.com/share-post.g?blogID=6264947694886887540&amp;postID=2590840087026103922&amp;target=email\" rel=\"nofollow ugc noopener\">Email This</a><a href=\"https://www.blogger.com/share-post.g?blogID=6264947694886887540&amp;postID=2590840087026103922&amp;target=blog\" rel=\"nofollow ugc noopener\">BlogThis!</a><a href=\"https://www.blogger.com/share-post.g?blogID=6264947694886887540&amp;postID=2590840087026103922&amp;target=twitter\" rel=\"nofollow ugc noopener\">Share to X</a><a href=\"https://www.blogger.com/share-post.g?blogID=6264947694886887540&amp;postID=2590840087026103922&amp;target=facebook\" rel=\"nofollow ugc noopener\">Share to Facebook</a><a href=\"https://www.blogger.com/share-post.g?blogID=6264947694886887540&amp;postID=2590840087026103922&amp;target=pinterest\" rel=\"nofollow ugc noopener\">Share to Pinterest</a>\nLabels:\n<a href=\"https://www.righto.com/search/label/arc\" rel=\"nofollow ugc noopener\">arc</a>,\n<a href=\"https://www.righto.com/search/label/reverse-engineering\" rel=\"nofollow ugc noopener\">reverse-engineering</a></p>\n<h4 id=\"15-comments\">15 comments:</h4>\n<p>Anonymous\nsaid...</p>\n<p>Nice analysis! You should check for stories that involve YC companies and/or their competitors. I&#39;ve often thought that HN gives unfair advantage to stories about YC companies, beyond just the normal echo-chamber effect.\n<a href=\"https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html?showComment=1384815407374#c2808288632192076832\" rel=\"nofollow ugc noopener\">November 18, 2013 at 2:56 PM</a><a href=\"https://www.blogger.com/profile/02739446213556869485\" rel=\"nofollow ugc noopener\">Fabien</a>\nsaid...</p>\n<p>Would you mind posting a link to the corresponding HN discussion, as it&#39;s burried and searching in HN is impractical at best?\n<a href=\"https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html?showComment=1384863498357#c7631437411694413035\" rel=\"nofollow ugc noopener\">November 19, 2013 at 4:18 AM</a><a href=\"https://www.blogger.com/profile/05030326541176171725\" rel=\"nofollow ugc noopener\">Cd-MaN</a>\nsaid...</p>\n<p>Thank you! Very nice analysis!\n<a href=\"https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html?showComment=1384872035811#c2970134777993421579\" rel=\"nofollow ugc noopener\">November 19, 2013 at 6:40 AM</a><a href=\"https://www.blogger.com/profile/08097301407311055124\" rel=\"nofollow ugc noopener\">Ken Shirriff</a>\nsaid...</p>\n<p>Fabien: the discussion on HN is <a href=\"https://news.ycombinator.com/item?id=6755071\" rel=\"nofollow ugc noopener\">here</a> and Reddit has some discussion <a href=\"http://www.reddit.com/r/programming/comments/1qwnuh/how_hacker_news_ranking_works_scoring_and/\" rel=\"nofollow ugc noopener\">here</a>. The Reddit discussion has some interesting links.\n<a href=\"https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html?showComment=1384962087408#c5997000162475136291\" rel=\"nofollow ugc noopener\">November 20, 2013 at 7:41 AM</a><a href=\"https://www.blogger.com/profile/08606889132090173983\" rel=\"nofollow ugc noopener\">Unknown</a>\nsaid...</p>\n<p>I&#39;ll doing a postmortem of my article and I would be really amazed to see the graph my article i posted yesterday made on HN (What if successful startups are just lucky?).</p>\n<p>Does your crawler still running?</p>\n<p>I wonder if I had some penalties and what the graph looks like.\n<a href=\"https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html?showComment=1385460689593#c205295253771649803\" rel=\"nofollow ugc noopener\">November 26, 2013 at 2:11 AM</a>\nHN Reader and Poster\nsaid...</p>\n<p>Awesome post! I&#39;d love to see more about the voting ring detection penalty. At this point, every one of my posts that makes the front page gets penalized. According to PG this is due to voting ring detection. I&#39;m certainly not organizing any voting rings. I believe this may be another inadvertent type of penalty for popular domains -- having too many friends that upvote you and set off &quot;voting ring detection&quot;. </p>\n<p>It&#39;s a bummer because I put a lot of time in the content and truly think it is good content. The end result is that I &quot;set it and forget it&quot; on Hacker News. Trying to engage there just leads to frustration when the comment thread suddenly drops from the front page. </p>\n<p>Another observation - my posts on gender (which I no longer write about due to the personal risk) got the &quot;flamewar&quot; penalty, even though they were honest, noncontroversial pieces generating some really good discussion. Apparently it was too much discussion. </p>\n<p>The algorithm probably protects us from a lot of junk but it also hurts sometimes too.\n<a href=\"https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html?showComment=1385490288734#c311824339617515455\" rel=\"nofollow ugc noopener\">November 26, 2013 at 10:24 AM</a><a href=\"https://www.blogger.com/profile/08097301407311055124\" rel=\"nofollow ugc noopener\">Ken Shirriff</a>\nsaid...</p>\n<p>Vianney Lecroart: unfortunately I&#39;m note running my crawler any more, so I don&#39;t have data for your article.</p>\n<p>HN Reader: I&#39;d like to know more about the voting ring detection too. Apparently that&#39;s what nailed my article. Like you, I&#39;m definitely don&#39;t have any voting ring, so I don&#39;t know why I got hit by the detector.\n<a href=\"https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html?showComment=1385494736143#c6031751064926637718\" rel=\"nofollow ugc noopener\">November 26, 2013 at 11:38 AM</a><a href=\"https://www.blogger.com/profile/00484092068134831325\" rel=\"nofollow ugc noopener\">Unknown</a>\nsaid...</p>\n<p>I was wondering why we* dropped off the front page so quickly... Hm.</p>\n<p>Thanks for putting this together.</p>\n<ul><li><p>we = Prime. We had the &quot;Get your health records from any doctor&quot; post.</p><p><a href=\"https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html?showComment=1385497931926#c6288976039077760088\" rel=\"nofollow ugc noopener\">November 26, 2013 at 12:32 PM</a><a href=\"http://javarevisited.blogspot.in\" rel=\"nofollow ugc noopener\">Rohit</a>\nsaid...</p></li></ul>\n<p>This article has got 705 point on HackerNews, quite an amazing feat. </p>\n<p>How Hacker News ranking really works: scoring, controversy, and penalties (righto.com)\n705 points by jseip 1 day ago | flag | 156 comments</p>\n<p>Any guess, How much traffic it would be? I guess, over 100K page views??\n<a href=\"https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html?showComment=1385541637044#c6347311445630521868\" rel=\"nofollow ugc noopener\">November 27, 2013 at 12:40 AM</a><a href=\"https://www.blogger.com/profile/08097301407311055124\" rel=\"nofollow ugc noopener\">Ken Shirriff</a>\nsaid...</p>\n<p>Hi Rohit! I received about 25K page views.\n<a href=\"https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html?showComment=1385577961510#c6649330757268588072\" rel=\"nofollow ugc noopener\">November 27, 2013 at 10:46 AM</a>\nAnonymous\nsaid...</p>\n<p>Very interesting! Two questions..</p>\n<ol><li>Any way to tell if different accounts&#39; votes are valued differently based on karma points, age etc.?</li><li><p>What about if accounts&#39; can be penalized rather then just certain sites? Not just being hellbanned.</p><p><a href=\"https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html?showComment=1390440977000#c5847110358269840282\" rel=\"nofollow ugc noopener\">January 22, 2014 at 5:36 PM</a><a href=\"https://java67.blogspot.com\" rel=\"nofollow ugc noopener\">JavaUser</a>\nsaid...</p></li></ol>\n<p>@Anonymous, I think they should be, more trusted votes are counted more, If I am not wrong. Simple example, when a new account publish or vote its not reflected immediately.\n<a href=\"https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html?showComment=1443921103534#c4761731922765622560\" rel=\"nofollow ugc noopener\">October 3, 2015 at 6:11 PM</a><a href=\"https://www.blogger.com/profile/10587031495938313347\" rel=\"nofollow ugc noopener\">Robert Welain</a>\nsaid...\nThis comment has been removed by the author.<a href=\"https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html?showComment=1498144724103#c7266530870573760808\" rel=\"nofollow ugc noopener\">June 22, 2017 at 8:18 AM</a><a href=\"https://www.tutlane.com\" rel=\"nofollow ugc noopener\">Suresh Dasari</a>\nsaid...</p>\n<p>Thanks for the article. Nice analysis.\n<a href=\"https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html?showComment=1590387106113#c9200362891993807578\" rel=\"nofollow ugc noopener\">May 24, 2020 at 11:11 PM</a><a href=\"https://c-sharptutorial.com/\" rel=\"nofollow ugc noopener\">Shahzad Aslam</a>\nsaid...</p>\n<p>very good explanation and nice analysis. Thanks for the article.\n<a href=\"https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html?showComment=1708709028654#c7111903624743806562\" rel=\"nofollow ugc noopener\">February 23, 2024 at 9:23 AM</a></p>\n<p><a href=\"https://www.blogger.com/comment/fullpage/post/6264947694886887540/2590840087026103922\" rel=\"nofollow ugc noopener\">Post a Comment</a><a href=\"https://www.righto.com/2014/02/bitcoins-hard-way-using-raw-bitcoin.html\" rel=\"nofollow ugc noopener\">Newer Post</a><a href=\"https://www.righto.com/2013/11/the-z-80s-16-bit-incrementdecrement.html\" rel=\"nofollow ugc noopener\">Older Post</a><a href=\"https://www.righto.com/\" rel=\"nofollow ugc noopener\">Home</a></p>","headings":[]}}