vpFREE2 Forums

random cyclicality in vp

"mroejacks" write (snip):

My question is, does anyone
know of a method IGT might use to utilize the full randomness of 32
bits without weighting the distribution?

In my program, Optimum Video Poker, I use the output of the RNG
modulo 52 (i.e., divide by 52, and use the remainder, which will be
in the range zero to 51). With only a 32-bit RNG, this will give a
little extra weight to the lower 7 or 8 values, but I use a 64-bit
RNG, so this slight bias is insignificant.

More importantly, the RNG output is not used to select a card.
Instead, it is called 52 times to shuffle a simulated deck; then if
the player hasn't made a bet, it shuffle again, repeating until the
player does make a bet. This way, the number of shuffles depends on
the speed of the player, but it's always a large number of times
because it takes less than a millisecond to do each shuffle.

I think that the casinos machines shuffle in a similar manner. Such a
procedure makes the cards completely unpredictable to the player.

If you knew the exact algorithm, and you were allowed to use a laptop
computer while playing, it might be possible to write a program that
would predict the draw cards after seeing the dealt cards.

One possibility might be to separate each 32 bit value into 5
distinct 6 bit values and use each of them to select a card or
shuffle the deck. This only loses about 4-5 bits of randomness but
still has some weighting issues.

Using more than one piece of one RNG output would not be very random.

Dan

···

--
Dan Paymar
Author of best selling book, "Video Poker - Optimum Play"
Developer of VP analysis/trainer software "Optimum Video Poker"
Visit my web site at www.OptimumPlay.com

"Chance favors the prepared mind." -- Louis Pasteur

[Non-text portions of this message have been removed]

In my program, Optimum Video Poker, I use the output of the RNG
modulo 52 (i.e., divide by 52, and use the remainder, which will be
in the range zero to 51). With only a 32-bit RNG, this will give a
little extra weight to the lower 7 or 8 values, but I use a 64-bit
RNG, so this slight bias is insignificant.

As long as you're not using the RNG value to define a card then I
don't see how the bias has any impact. The actual shuffling algorithm
would probably overpower any numerical bias.

More importantly, the RNG output is not used to select a card.
Instead, it is called 52 times to shuffle a simulated deck; then if
the player hasn't made a bet, it shuffle again, repeating until the
player does make a bet. This way, the number of shuffles depends on
the speed of the player, but it's always a large number of times
because it takes less than a millisecond to do each shuffle.

Sounds like a little overkill for a software tutor but is clearly
a "better" mathematical approach (assuming a good algorithm).

I think that the casinos machines shuffle in a similar manner. Such

a

procedure makes the cards completely unpredictable to the player.

If you knew the exact algorithm, and you were allowed to use a

laptop

computer while playing, it might be possible to write a program

that

would predict the draw cards after seeing the dealt cards.

That's where a good reseeding mechanism should help. If the pRNG was
reseeded before enough hands were played to detect the current
positions of the deck and the RNG then even a computer wouldn't help
(without also understading the reseeding approach and all the
variable data it used).

>One possibility might be to separate each 32 bit value into 5
>distinct 6 bit values and use each of them to select a card or
>shuffle the deck. This only loses about 4-5 bits of randomness but
>still has some weighting issues.

Using more than one piece of one RNG output would not be very

random.

Doesn't that depend on the RNG algorithm? It seems to me that a bit
manipulating algorithm would be random for any subset of contiguous
bits. Condensing 32 bits by using modulus 52 will weaken any
algorithm. However, for VP purposes I don't think it's much of a
problem as long as the RNG output is not directly mapped into a card
like it was in early IGT machines.

If my above assumption is right, then wouldn't it be possible to do
multiple shuffles with one RNG output? For example, exchange cards
defined by the first 12 bits, exchange again based on the next 12
bits and then cut the deck based on the final 6 bits. Maybe I'm out
in left field here ... (yeah, I know, the entire topic is overkill
but I'm just curious).

Dick

···

--- In vpFREE@yahoogroups.com, Dan Paymar <Dan@...> wrote: