Hey Ron,

Thanks for the input.

Actually, what that member said is that there are too many 4-4
among the doubles.

But I haven't seen the data, so I don't know.

Regards,
Dimitrios

----- Original Message ----- From: "Ron Wheeler" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <flashcoders@chattyfig.figleaf.com>
Sent: Thursday, November 17, 2005 5:21 PM
Subject: Re: [Flashcoders] Math.random()


The randomness of Math.random is one possible source of concern but what you do with the random number to produce a dice roll is more important. It is easy to make a simple mistake in the mapping of a random number to an integer between 1 and 6 that results in a skewed distribution.

Gamblers always complain about dice rolls even if you use real dice.
Do they have a specific complaint about the rolls - never getting any doubles - too many doubles - too many double-sixes,
no rolls with 5 in them, always the same sequence of rolls??????

If the complaint is that their opponent is always getting better rolls, you can fiddle with Math.random until you die of boredom and not fix the problem.

What is the suspected or reported problem?
Play a few games and record all of the rolls, put them in a spreadsheet and do some simple tests. A basic statistics book will tell you how to test the randomness. Looking for patterns is harder but if the players claim that there are repeated sequences, you should see them pretty easily.

Ron

Ian Thomas wrote:

If this was connected to prizes/tournaments, from what I remember it depends
on whether the user pays to play or not; and the laws of the country that
your site is hosted in.

From a UK perspective, if the user paid to play you'd need a gaming and/or
gambling license (gaming for fixed-odds, gambling for games of skill - I
assume Backgammon would come under the latter).

I know that to get one of those licenses in the UK (for interactive TV
gaming, which is why I'm being a bit woolly about the website thing) we
needed to buy a much better random number generator. In fact - a hardware
random number generator, with certification that we could show the
authorities.

This Wikipedia entry explains about hardware generators:
http://en.wikipedia.org/wiki/Hardware_random_number_generator

If your game isn't pay-to-play, I _think_ you'd be in the clear and could
use whatever randomness your client was happy with; as essentially your
client would be giving away stuff for free. If it is pay to play, you need
to check it all out with the lawyers, I'm afraid.

Hope that's helpful,
Ian


On 11/17/05, Dimitrios Bendilas <[EMAIL PROTECTED]> wrote:

Hello,

I have built a Backgammon game in Flash for a client.

He is starting to ask questions about the randomness
of the dice, because a registered member of the game said
he's recorded the stats of about 100 backgammon games
and found that the numbers generated are not so random.
(I haven't seen the data, so I don't know if that's true)

I know that Math.random() is not the best random generator
in the world. I also know that a computer can never produce
*really* random numbers.

So, my question is this: Should I use some other algorithms
for generating the value of the dice? Or Math.random()
is really good enough? What if this game was connected
to prizes, tournaments etc? Would I have to find something
better then?


Thank you
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to