summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2019-04-20 16:47:23 -0700
committerDessalines <tyhou13@gmx.com>2019-04-20 16:47:23 -0700
commita05f53dae97335431d767015f00735fbc3d6fc12 (patch)
tree152a4f386fe57fd28063e34a3910f665e3c3ee82 /docs
parent8a4b2324a1739691fef34f5aa5eb2afbd5e68bee (diff)
Adding negative score fix
- Fixes #84. - Fixing unit tests.
Diffstat (limited to 'docs')
-rw-r--r--docs/ranking.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/ranking.md b/docs/ranking.md
index f55a1284..34348c30 100644
--- a/docs/ranking.md
+++ b/docs/ranking.md
@@ -12,14 +12,14 @@ The [Hacker New's ranking algorithm](https://medium.com/hacking-and-gonzo/how-ha
## My Algorithm
```
-Rank = ScaleFactor * sign(Score) * log(1 + abs(Score)) / (Time + 2)^Gravity
+Rank = ScaleFactor * sign(3 + Score) * log(abs(3 + Score)) / (Time + 2)^Gravity
Score = Upvotes - Downvotes
Time = time since submission (in hours)
Gravity = Decay gravity, 1.8 is default
```
-- Add 1 to the score, so that the standard new comment score of +1 will be affected by time decay. Otherwise all new comments would stay at zero, near the bottom.
+- Add 3 to the score, so that even minimally downvoted comments will be affected by time decay. Otherwise all new comments would stay at zero, near the bottom.
- The sign and abs of the score are necessary for dealing with the log of negative scores.
- A scale factor of 10k gets the rank in integer form.