in reply to The game of Skunk
I tested it with R => 0.5 (rolls 50% of the time) which did pretty good. Setting this higher, brought better results. Eventually I found that always rolling did pretty well (in fact, beat all the other players consistently), as a streak to 100 can mount pretty quickly.package SkunkPlayer::Random; my $meta_object = { NAME => "Random Roller", DESCRIPTION => "Rolls randomly", CREATE => sub { new (__PACKAGE__, @_} } }; sub ask_to_roll { return (rand() < shift->{R}) ? 1 : 0; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: The game of Skunk
by John M. Dlugosz (Monsignor) on Jun 26, 2003 at 04:56 UTC |