by ars · 14y ago · 0 comments
http://news.ycombinator.com/item?id=140283
http://news.ycombinator.com/item?id=595419
http://news.ycombinator.com/item?id=1078831
http://news.ycombinator.com/item?id=1485286
http://news.ycombinator.com/item?id=1290590
http://news.ycombinator.com/item?id=2467703
Some have more comments than others.
Like a dream all of the net is meshing together.
At any rate, given how many readers are probably new to the The Last Question, it's probably worth citing another Asimov piece that is oft-mistaken for The Last Question - The Last Answer. It's a more recent work, and a bit more obscure, but worth the read if you're into Asimov.
Exponential decay is important because it is, as they say in statistics, "memoryless": it has a simple geometric property that adding a new point today has the exact same effect as adding a new point on the first day. It can therefore be implemented as follows: when you add points to a link, you add them not just to the total points, but also to some accumulator which I will call Hotness. This number is a double; we increment by 1 when someone adds a point.
Every half-hour, some independent process working over still-Hot threads multiplies their Hotness by 0.97153. This gives a half-life of about 12 hours: your rating has hotness 0.5 after half a day, 0.25 after a whole day, and so on. We could tune that if we wanted finer granularity. When something gets below 0.001 Hot we can probably just reset it to 0 Hot abruptly so that we don't check it anymore. (Because doubles will try to go to -infinity if you use them multiplicatively in this way, and if you get to, say, 1000 points this will still mean that we can stop paying attention to you in, say, 10 days.)
Suddenly, adding points to a dead article is the exact same as sponsoring a new article. So we store articles under their URLs as keys, and if you resubmit an existing news story you merely bump it up to 1 Hot.
The "new" page would be very peculiar in this system, though. It might work by listing only those 1 Hot posts which were 0 Hot previously, I don't know.
As for a major con to this approach, I think HN uses polynomial decay rather than exponential decay because exponential decay somehow didn't feel like it had the right "shape" to it or so. This is probably because they didn't implement it in the "memoryless" configuration, though, where each point has value 1 from the moment it's added, and decays slowly.
Doubles will go to infinity after a few years, but you can either reset the epoch at that time, or store the significand and the exponent seperately.
In this situation: what book do you recommend to me? I want to able to reason a thought like that, more real-world stuff.