[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pbmserv-dev] Solitaire game scoring



On Thu, Apr 15, 2004 at 11:37:32PM +1000, Cameron Browne wrote:
> 
> >Hmm, people can have freak low scores as well - would it be possible to
> >use, say, 'average of top ten scores' or would that require too much new
> >programming/data storing?
> 
> It would take very little work but I'm not sure what side effects might 
> result from changing such a fundamental data format used by all games. It 
> sounds a bit dangerous, especially if there are only going to be one or two 
> solitaire games.
> 
> Best if we can make do with the existing data structure which contains only 
> the following information:
> 
>     StringList name;
>     IntList won, lost, tie, rating;

How about a compromise?   average of the last N games?


if totalplayed is < N, use your algorithm

                   (totalplayed * oldrating) + currentscore
    newrating = ----------------------------------------------
                              totalplayed + 1


Once  totalplayed >= N, then it becomes a rolling average of the last 
N games played

                   ((N-1) * oldrating) + currentscore
    newrating = ----------------------------------------------
                              N



-- 
 /  \__  | Richard Rognlie / Sendmail Ninja / Gamerz.NET Lackey
 \__/  \ | Work like you don't need the money    www.gamerz.net/~rrognlie
 /  \__/ | Love like you've never been hurt      <rrognlie at gamerz.net>
 \__/    | Dance like nobody's watching -- "Satchel" Paige