Creating a scoring algorithm for voting app

286 Views Asked by At

I have just created what I thought to be a good scoring algorithm until I looked at some demo results. It now looks pretty floored though

I have a table with a number of images I have another table with any number votes on all of the image that have been submitted.

Now rather than just increment a vote counter to output the score, I though I'd do something else so came up with this.

  TIME NOW - IMAGE SUBMITTED TIME
( ------------------------------- ) x 1000000 = Score
    TOTAL VOTES FOR THIS IMAGE

But the score seems very floored with the images that were recently submitted.

Example

Recent image: 13 votes, submitted 8528 seconds ago: Scores 1514

Older image: 222 votes, submitted 1948015 seconds ago: Scores 110

Is there a better way for me to do this that evens it all out?

1

There are 1 best solutions below

2
On

You might want to use an exponential:

Score = (votes from today) + 0.99*(score from yesterday)