This question is more logic than programming at the moment.. once I understand what algorithm(s) I need to use I'll be looking into how to implement it.
I've got a list of items in a database that need to be voted up or down by users to determine if they are correct or not. The aim is to provide a % for each item to show how reliable the item information is.
There's a few criteria to take into account..
- Votes are not absolute - each user’s vote weight depends on their karma.
- User karma should be calculated based on their votes - for example, if the user submits an item and other users vote to confirm that it is correct, that user's karma would increase. Karma could also be given if a user votes for an item in the same direction that other users with high karma have voted. If they vote in the opposite direction to other users with high karma, their vote would be considered incorrect and although it'd lower the score of the item it'd also lower their karma level, making them less influential in future voting.
- Users can cast negative votes as well as positive votes.
- Calculated scores of items should take into account the age of the item (over time the score would decrease as the item could become less reliable).
Does anyone have any recommendations on the best algorithm(s) for doing this, or any tips on how to implement this in a programming language (such as PHP)?