I'm building a system similar to Reddit, where users "like" items. "Likes" would be used to determine ranking of items. There's also an "aging" factor, where more recent "likes" count more than ancient "likes".
All in all, it's similar to the algorithm described here.
My problem is that I need to ensure diversity of the items in the result ranking. Each item belongs to a category. Certain categories may be disproportionately popular. I don't want to have all items in the front page (or 2nd page) to belong to Category A, while items from other categories are nowhere to be found.
So are there any clever algorithm that can ensure diversity of results here -- to make sure there's a nice mix of different categories in every page?