Two Plus Two Newer Archives  

Go Back   Two Plus Two Newer Archives > Internet Gambling > Internet Gambling
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #21  
Old 10-02-2007, 11:07 AM
nineinchal nineinchal is offline
Senior Member
 
Join Date: Jan 2006
Location: Brooklyn
Posts: 1,285
Default Re: Shuffling at sites

[ QUOTE ]
[ QUOTE ]
I always thought poker stars shuffled for every card but then I saw this today in the WCOOP main event chat:





snake8484: is the flop preset ? or does the deck continue to shuffle the remaining cards until the player presses call or fold etc
[...]
HostMarkW [Support]: the deck is only shuffled once at the start of the hand


Maybe they had changed the method.

Do you know how it is?

And what networks have continuous shuffling (shuffling for every card) and what networks shuffles the deck before all the cards are dealt so the flop etc. would be the same regardless of action?

[/ QUOTE ]

The actual method we use to shuffle is described in
great detail on this page:

http://www.pokerstars.com/poker/room/features/security/

Let's cover that in detail, step by step, from the "Shuffle
Highlights" section:

> We use 249 random bits from both entropy sources (user input and
> thermal noise) to achieve an even and unpredictable statistical
> distribution.

So, to shuffle a hand, we take 249 truly random bits from the thermal
source, and 249 truly random bits from the aggregate mouse movements --
two truly random (not pseudo-random) sources.

> We use the SHA-1 cryptographic hash algorithm to mix the entropy
> gathered from both sources to provide an extra level of security

Thus, we use a mathematical formula to combine these two different 249
bit numbers into a single 498 bit number. Now we have a binary stream
of units and naughts, something like this:

01010111100101100111011010001000101011110101010101 1010101010101011...

It's much longer than that in reality (498 bits), but you get the idea.

The page then says:

> To convert random bit stream to random numbers within a required
> range without bias, we use a simple and reliable algorithm. For
> example, if we need a random number in the range 0-25:
>
> - we take 5 random bits and convert them to a random number 0-31
> - if this number is greater than 25 we just discard all 5 bits
> and repeat the process

Finally, we use that method to do the actual shuffle:

> To perform an actual shuffle, we use another simple and reliable
> algorithm:
>
> - first we draw a random card from the original deck (1 of 52)
> and place it in a new deck - now original deck contains 51
> cards and the new deck contains 1 card
>
> - then we draw another random card from the original deck (1 of
> 51) and place it on top of the new deck - now original deck
> contains 50 cards and the new deck contains 2 cards
>
> - we repeat the process until all cards have moved from the
> original deck to the new deck

So, how does it work? First, we need a number from 0 to 51 to get one
of 52 available cards. To get such a number, we need 6 bits. (I'm
assuming you know at least a little bit about binary numbers here
since you said it was a "technical" discussion). We take the first
six bits of our much larger stream of random bits, and never use them
again:

01010111100101100111011010001000101011110101010101 1010101010101011...
010101 (use these)

11100101100111011010001000101011110101010101101010 1010101011...
(these are what's left)^^^^^^^^^^

If that number is from 52 to 63, we discard it as too large. If it is
between 0 and 51, we use it to choose the card. In this case, 010101
is our six bit number, and it is "21", so we choose card 21 as the
first card.

We continue down the bitstream as needed. We now need 0 to 50 (51
cards left), and the next six bits are 111001, which is 57:

------11100101100111011010001000101011110101010101101010 1010101011...
------111001 (use these)
01100111011010001000101011110101010101101010101010 1011...
(these are what's left)^^^^^^^^^^

We discard that as too large and continue with the next six bits,
011001, or 25. And so on.

Each time the number of cards is reduced, the number of bits we need
can drop, too. Here's a table showing how many bits of data we need
to choose from N remaining cards:

52 = 6 bits needed 35 = 6 bits needed 18 = 5 bits needed
51 = 6 bits needed 34 = 6 bits needed 17 = 5 bits needed
50 = 6 bits needed 33 = 6 bits needed 16 = 4 bits needed
49 = 6 bits needed 32 = 5 bits needed 15 = 4 bits needed
48 = 6 bits needed 31 = 5 bits needed 14 = 4 bits needed
47 = 6 bits needed 30 = 5 bits needed 13 = 4 bits needed
46 = 6 bits needed 29 = 5 bits needed 12 = 4 bits needed
45 = 6 bits needed 28 = 5 bits needed 11 = 4 bits needed
44 = 6 bits needed 27 = 5 bits needed 10 = 4 bits needed
43 = 6 bits needed 26 = 5 bits needed 9 = 4 bits needed
42 = 6 bits needed 25 = 5 bits needed 8 = 3 bits needed
41 = 6 bits needed 24 = 5 bits needed 7 = 3 bits needed
40 = 6 bits needed 23 = 5 bits needed 6 = 3 bits needed
39 = 6 bits needed 22 = 5 bits needed 5 = 3 bits needed
38 = 6 bits needed 21 = 5 bits needed 4 = 2 bits needed
37 = 6 bits needed 20 = 5 bits needed 3 = 2 bits needed
36 = 6 bits needed 19 = 5 bits needed 2 = 1 bit needed
1 = 0 bits needed

If you add up all the bits you get (you guessed it) 249 -- the number
of bits we take from each of our truly random entropy sources.

Since we start with DOUBLE the number of truly random bits needed (249
each from thermal and user inputs), this is enough to ensure that even
if we have to discard every other group of bits as "bigger than the
maximum number we need", we have enough truly random bits to complete
the shuffle.

Thus, there isn't really a "seed". That's a concept that applies only
to pseudo-random generators. When you refer to a "seed" you mean the
first, initial number fed to the pseudo-RNG, from which flows all of
the following numbers in a mathematical progression. If you know the
seed, and know the mathematical formula, you can get the Nth number in
a pseudo-RNG progression by running that formula on the seed, and then
the result, and then that result, N times.

That doesn't happen at all with our method. At PokerStars, NOTHING is
ever pseudo-anything, and nothing is ever "seeded". The next number
doesn't depend on the prior one and there's no mathematical formula
one can use to figure out the next number. Every time we choose
the "next card to go into the randomly shuffled deck", the choice is
truly random and not the result of a pseudo-random number generator.

Once randomized, the order of the deck is
never changed throughout the deal. The cards that come out on any
given round are totally independent of any player action.

[/ QUOTE ]

This is why stars is the best. Their games mimic actual casino play. I always believed the continuous random shuffle was not the best method for maintaining integrity in the games.

It is possible that the next card COULD be rigged to create either more action or fix the outcome of a hand utilizing a continuous "random" shuffler.
Reply With Quote
  #22  
Old 10-02-2007, 11:34 AM
Janis N. Janis N. is offline
Senior Member
 
Join Date: Jul 2007
Posts: 527
Default Re: Shuffling at sites

a) to state the obvious, the "continuous shuffler" doesn't need to be shuffling the cards all the time, just reshuffle them before putting the next card out. Therefore it's more of a JIT (just-in time) shuffler than a continuous one and thus doesn't impact performance.

b) [ QUOTE ]
Continuous shuffling discourages results oriented thinking ... shuffling at the start of the hand is obviously closer to how it would be in a casino.

[/ QUOTE ]
qft

I'd rather like JIT shuffling as it helps me be less results oriented. The fish all yap about "I folded J8 [img]/images/graemlins/frown.gif[/img]" when flop comes JJ8 and I don't want to be like that even in thoughts.

c) [ QUOTE ]
I always believed the continuous random shuffle was not the best method for maintaining integrity in the games.

It is possible that the next card COULD be rigged to create either more action or fix the outcome of a hand utilizing a continuous "random" shuffler.

[/ QUOTE ]That's because you are clueless about software development.
Reply With Quote
  #23  
Old 10-02-2007, 11:46 AM
Henry17 Henry17 is offline
Senior Member
 
Join Date: Aug 2007
Posts: 1,285
Default Re: Shuffling at sites

There is zero benefit from using JIT shuffle but added complexity. So why would anyone use something that is even marginally more complex but offers no benefit?
Reply With Quote
  #24  
Old 10-02-2007, 12:03 PM
nineinchal nineinchal is offline
Senior Member
 
Join Date: Jan 2006
Location: Brooklyn
Posts: 1,285
Default Re: Shuffling at sites

[ QUOTE ]
a) to state the obvious, the "continuous shuffler" doesn't need to be shuffling the cards all the time, just reshuffle them before putting the next card out. Therefore it's more of a JIT (just-in time) shuffler than a continuous one and thus doesn't impact performance.

b) [ QUOTE ]
Continuous shuffling discourages results oriented thinking ... shuffling at the start of the hand is obviously closer to how it would be in a casino.

[/ QUOTE ]
qft

I'd rather like JIT shuffling as it helps me be less results oriented. The fish all yap about "I folded J8 [img]/images/graemlins/frown.gif[/img]" when flop comes JJ8 and I don't want to be like that even in thoughts.

c) [ QUOTE ]
I always believed the continuous random shuffle was not the best method for maintaining integrity in the games.

It is possible that the next card COULD be rigged to create either more action or fix the outcome of a hand utilizing a continuous "random" shuffler.

[/ QUOTE ]That's because you are clueless about software development.

[/ QUOTE ]

I may be clueless about software development, but I am an expert in determining breaches in security and procedures, including detemining how perpetrators were enabled.
Reply With Quote
  #25  
Old 10-02-2007, 12:23 PM
Rek Rek is offline
Senior Member
 
Join Date: Aug 2007
Location: London
Posts: 747
Default Re: Shuffling at sites

Assuming any site's RNG is not rigged then it does not matter what system they use because the next card will be random. Having said that I prefer the Stars approach because you always know whether your decision was correct or not if the hand progresses on difficult decisions. Doesn't help but I just like to know.
Reply With Quote
  #26  
Old 10-02-2007, 12:38 PM
Henry17 Henry17 is offline
Senior Member
 
Join Date: Aug 2007
Posts: 1,285
Default Re: Shuffling at sites

[ QUOTE ]
Assuming any site's RNG is not rigged then it does not matter what system they use because the next card will be random.

[/ QUOTE ]

Actually no. If a site uses a PRNG then even though the numbers would appear random they actually are not. They could make it very very difficult to near impossible to predict the next card but near impossible is not the same as impossible.

My view is that you can approach the level of Stars system but never surpass it using any other RNG methods so why use something that is even slightly less then the best possible option?
Reply With Quote
  #27  
Old 10-02-2007, 01:18 PM
notreallymyname notreallymyname is offline
Senior Member
 
Join Date: Dec 2006
Location: NL100
Posts: 123
Default Re: Shuffling at sites

The simplest shuffle is to not shuffle at all, but instead randomly pick the cards from an ordered deck on demand. But all fair shuffling systems are equivalent.
Reply With Quote
  #28  
Old 10-02-2007, 01:56 PM
Henry17 Henry17 is offline
Senior Member
 
Join Date: Aug 2007
Posts: 1,285
Default Re: Shuffling at sites

No the simplest method and by far the best method is to use a TRNG to pick at random one of the ~8E67 possible orderings.

Any other system at best approaches this method but will always be inferior even if only by a margin that is insignificant.
Reply With Quote
  #29  
Old 10-02-2007, 02:59 PM
notreallymyname notreallymyname is offline
Senior Member
 
Join Date: Dec 2006
Location: NL100
Posts: 123
Default Re: Shuffling at sites

You don't need the full deck ordering, only some of the cards will actually be used. The order of the rest doesn't matter and thus doesn't need to be determined.
Reply With Quote
  #30  
Old 10-02-2007, 03:13 PM
Henry17 Henry17 is offline
Senior Member
 
Join Date: Aug 2007
Posts: 1,285
Default Re: Shuffling at sites

If you don't order them all then every time a new random event is required the site would have to consult their entropy source. This is much less efficient then simply ordering them all at once.

You gain nothing with JIT shuffle but you add a bunch of extra steps. Why would anyone want to add unnecessary steps?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:37 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.