Perl: the Markov chain saw PerlMonks

### RE: X-treme P-ondering

by Blue (Hermit)
 on Nov 13, 2000 at 20:37 UTC ( #41341=note: print w/replies, xml ) Need Help??

Looking at Voting/Experience System, it seems that there are two parts to XP gains from votes - 25% per vote, and 1/6 of total votes if all votes given in a day, but only up to level 5 (Monk).

Saints get 40 votes, the most of anyone. At a 25% for 1 XP, that means that on average, a saint who finds 40 things to vote on in a day will gain about 10 XP. Which is not significant compared to the amount of XP needed.

Even a monk with 20 votes will, on average, gain 5 XP, needing 300 to travers the level, meaning that if you vote all of your votes Monday thru Friday and both days of the weekends you can go up a level in about 3 months. Assuming you find 20 worthwhile (good or bad) posts everyday.

This does not seem to be a big deal. At the worst it means that you are reading every post and contributing to PM via evaluating nodes instead of a more direct addition of posts, but that's not a major sin.

=Blue
...you might be eaten by a grue...

Replies are listed 'Best First'.
RE: X-treme P-ondering
by Dominus (Parson) on Nov 13, 2000 at 21:32 UTC
Yes, and that 5XP a day from voting looks even smaller when you consider that the same person is also getting a free 2XP every day just for logging in.

On a related metter, a couple of days ago I got to wondering how big the voting bonus really was. An Acolyte gets 8 votes per day, so it's easy to see that the Acolyte can expect to acquire an extra 2 XP from casting votes. (Not counting an additional bonus of 2 XP for using them all up.) But the 2XP is really a 25% chance of 1 XP for each vote, so the Acolyte might be lucky and get more XP, or unlucky and get none at all.

```my \$n = shift || 8;
my \$p = shift || .25;

for (\$i=0; \$i<=\$n; ++\$i) {
my \$prob = choose(\$n,\$i) * (\$p**\$i) * ((1-\$p)**(\$n-\$i));
\$x += \$i * \$prob;
\$tp += \$prob;
printf "%2d %.4f\t(%.4f)\n", \$i, \$prob, 1-\$tp;
}
print "Expected: \$x\n";

sub choose {
my (\$n, \$r) = @_;
return 0 if \$n < 0 || \$r < 0 || \$r > \$n;
return 1 if \$r == 0 || \$r == \$n;
return choose(\$n-1,\$r-1) * \$n / \$r;
}
(THe program will run When you run this, you can give it an argument which is the number of votes you get per day; it defaults to 8. Then it prints out a table showing the probability of getting each possible number of XP:

``` 0 0.1001       (0.8999)
1 0.2670       (0.6329)
2 0.3115       (0.3215)
3 0.2076       (0.1138)
4 0.0865       (0.0273)
5 0.0231       (0.0042)
6 0.0038       (0.0004)
7 0.0004       (0.0000)
8 0.0000       (0.0000)
Expected: 2
The '3' line here says that there is a 20.76% chance of receiving exactly 3 XP, and a 11.38% chance of receiving more than 3 XP. The '0' line says there's a 10.01% chance of receving nothing at all.

The chances fall off pretty quickly as the number of points increase, but still about one Acolyte in 11 can expect to get 4 XP from casting votes instead of only 2 XP on a given day.

All very true, but perhaps not as significant as it seems. While any given day you may get up to 1 XP per vote while others you get 0, in order to get enough votes to go up a level, you need more then one days worth of voting. As such, over a large number of votes, it will most likely average about 1/4 XP per vote. Because of the randomness factor there will always be local variation and noise, but over a large number of votes, it will average out.

BTW, nice program, and thanks for bringing Perl into our discussion.

=Blue
...you might be eaten by a grue...

Create A New User
Node Status?
node history
Node Type: note [id://41341]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2020-10-24 06:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
My favourite web site is:

Results (242 votes). Check out past polls.

Notices?