TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Request: simple story promotion algorithm

4 pointsby zemajalmost 18 years ago
Hi all,<p>I recently added a karma-like voting system to posts in a phpBB forum that was having some problems with spam (we have an point incentive system that users use to bid for real items - now instead of rewarding points for posts, they're now awarded for votes).<p>My question is; does anyone know a simple algorithm that can get a list of the "best-recent" posts based on votes. So simply if an item has a certain number of positive and negative points with each vote point made at a certain time, how can I combine that to get a list of highly voted, recent posts.<p>I could obviously research and come up with something myself, but there's probably quite a few people here who have experience in this area, so I thought it was worth a post!<p>Thanks, James

3 comments

dfrankealmost 18 years ago
PG recently posted the algorithm that news.yc uses:<p><a href="http://news.ycombinator.com/item?id=38704" rel="nofollow">http://news.ycombinator.com/item?id=38704</a>
nielsalmost 18 years ago
I use an algorithm where recent votes and posts has more weight:<p>(votes from the last two hours times 1) + (votes from the next two hours times 0.75)... and so on. Do the same for posts. Because it's expensive to calulate these values, I have a cron job that updates the scores every fifteen minutes.
评论 #42597 未加载
nreecealmost 18 years ago
Rank = ( ( current_time - post_time ) / number_of_votes )<p>Simple enough!
评论 #44672 未加载
评论 #42807 未加载