go ahead... be a heretic | |
PerlMonks |
Re: Sainthood via Seniority Simulationby pg (Canon) |
on Nov 05, 2003 at 06:04 UTC ( [id://304638]=note: print w/replies, xml ) | Need Help?? |
The logic is a little bit off in the while loop ;-) If during the day, you advance to the next level, number of votes you can cast for that day is still based on your previous day's level. However in your script, you do $level = $level->{next} first, and then right the way started to use $level->{votes}, which is the number of votes for the new level. Not much difference in terms of the final results, especially take all the rand() into consideration, but the simulation is not precise.
In Section
Perl Monks Discussion
|
|