in reply to Re: Too much positive votes on questions (Seekers of Perl Wisdom)
in thread Too much positive votes on questions (Seekers of Perl Wisdom)
pzbagel++, I was about to say the same.
The formula, and today's value for NORM, are taken from Voting/Experience System.
#!/usr/bin/perl -w use strict; # Average XP for a number of ++ votes, with no -- votes, given a NORM. my $votes = 50; my $NORM = 10.7453; my @val = (0, 1/3, 1/2, 2/3, 3/4, 1); my $xp = 0; foreach my $rep ( 1 .. $votes ) { foreach (1..$#val) { $xp += $val[$_], last if $rep <= $_ * $NORM; } } printf "XP = %.1f\n", $xp;
XP = 31.7
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Too much positive votes on questions (xp gain table)
by Aristotle (Chancellor) on May 04, 2003 at 05:01 UTC |