Two Plus Two Older Archives  

Go Back   Two Plus Two Older Archives > General Poker Discussion > Poker Theory
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-14-2005, 07:41 AM
sunek sunek is offline
Member
 
Join Date: Feb 2005
Location: Denmark/Aarhus
Posts: 51
Default How does the random card generator at the internet poker sites work?

Hi

The posting about random generators made me wonder about how the different poker sites use random generators. I am a master of computer science so I know it is possible to make a computer generate random numbers in a way that makes it impossible for a human (or computer for that matter) to discover any kind of patterns in the numbers generated.
So unless the people who made the random generators at the poker sites were complete idiots, and there is no reason to believe they are, it is safe to assume that the pattern of these random numbers can not be discovered by anyone (even the people who made the random generator).
So it is impossible to “guess” how the next deck of cards will be shuffled.

But there are at least two different strategies to pick the cards that are dealt and the cards for flop, turn and river:

1. The smart way. All cards are randomly picked from a “pile” of cards when a card is needed. The reason I call this method smart is that no matter how clever you are you will never be able to determine the exact flop, turn and river for that particular hand.
2. The straight forward way. All cards are placed in a stack in random order just like when you shuffle the cards in an offline card game. The problem with this approach is that it will be possible for people with the right skills (hackers) to access the stack of cards and see the flop, turn and river from the split second the first card is dealt.

Does anyone know which approach the online poker rooms are using?

By the way even though it is possible to cheat if the poker rooms are using approach number 2, the cheater will probably be sentenced to prison if discovered, since the crime will be similar to hacking a bank. And I guess that will scare most players from cheating this way.

I hope that this posting made sense.

Regards

sunek
Reply With Quote
  #2  
Old 06-14-2005, 10:00 AM
phish phish is offline
Member
 
Join Date: Sep 2003
Posts: 47
Default Re: How does the random card generator at the internet poker sites work?

[ QUOTE ]
Hi

By the way even though it is possible to cheat if the poker rooms are using approach number 2, the cheater will probably be sentenced to prison if discovered, since the crime will be similar to hacking a bank. And I guess that will scare most players from cheating this way. "

Utter silliness. No one will be sent to jail for hacking a poker site. 1) the site wouldn't want the bad publicity and it's not their money that's lost anyway and 2) these things are all based offshore and aren't really legal in the US. How're they going to get US authorities to devote the resources to capture and prosecute what to the US would be a minor crime against an offshore entity.

Also, threat of jail (and there is no threat here) doesn't deter everyone from committing crimes.
Reply With Quote
  #3  
Old 06-14-2005, 11:33 AM
Yawkey Yawkey is offline
Member
 
Join Date: Jul 2004
Posts: 65
Default Re: How does the random card generator at the internet poker sites work?

I'm not sure that your second solution is straight forward, why randomly generate 52 different cards when all you need is 15-25. If I were programming it I would opt for the one card at a time method. I don't think we can assume any poker room does it either way, and some may in fact generate the entire deck for each hand. Every different poker room has it's own algorithm, and they are trade secrets as releasing to the public could certainly damage the card rooms integrity.

The other thing that you may want to think about is seed selection. I would be very suprised if the poker rooms selected a new seed for every card that is dealt, maybe not even every hand. This means they are relying on the complexity of their algorithm to keep players guessing what card is to come next. In theory with a large enough sample size, one could eventually determine the algorithm used at their favorite online poker room (you may have more success at a blackjack table where you can see every card dealt, if you never hit). I believe there is at least one known instance where some people did figure out a card rooms algorithm and made a lot of money from it, I can't think of it off the top of my head but I will look it up, and report back.
Reply With Quote
  #4  
Old 06-14-2005, 12:34 PM
chapstick chapstick is offline
Member
 
Join Date: Mar 2005
Posts: 90
Default Re: How does the random card generator at the internet poker sites wor

[ QUOTE ]
Every different poker room has it's own algorithm, and they are trade secrets as releasing to the public could certainly damage the card rooms integrity.


[/ QUOTE ]

How's that?

http://www.paradisepoker.com/shuffling.html

[ QUOTE ]

The other thing that you may want to think about is seed selection. I would be very suprised if the poker rooms selected a new seed for every card that is dealt, maybe not even every hand.


[/ QUOTE ]
The above indiciates they select a new seed for every hand.
Reply With Quote
  #5  
Old 06-14-2005, 05:02 PM
Yawkey Yawkey is offline
Member
 
Join Date: Jul 2004
Posts: 65
Default Re: How does the random card generator at the internet poker sites wor

Paradise is by no means giving out the algorithm they are using to shuffle the cards. This is a very general description to help ensure us that they have devised an algorithm that will keep the cards random. To further drive the point home they mention their generator is "based on the Berkeley prng using a state table size of 64 longs", however they certainly make no mention of what part of their rng differs from the Berkeley prng. With such large seeds and small sample sizes it would be near impossible to determine the exact algorithm being used. That's good to know that at least one of the major poker rooms has gone to great lengths to keep their games random.
Reply With Quote
  #6  
Old 06-14-2005, 06:56 PM
AaronBrown AaronBrown is offline
Senior Member
 
Join Date: May 2005
Location: New York
Posts: 505
Default Re: How does the random card generator at the internet poker sites wor

There is a minor, but puzzling, error in the article. They give the example of a random number algorithm that generated six-bit random numbers. If you had to use this for a shuffling algorithm, you would just throw away any value it returned greater than 51. You don't need to have bias. With a standard 15-bit random number, you would throw away 8 values and have a perfectly uniform distribution.

My other comment about the analysis is it touts theory over practice. They have eliminated some theoretical problems, and even used "overkill" for what they admit are marketing purposes. In the process of doing that, you can make the system so complicated that it has a bug. Often implementations like this work great when they're built, because you paid top dollar for a motivated programmer to do it right. But when the stuff gets maintained by people with less talent who don't understand it, problems creep in.
Reply With Quote
  #7  
Old 06-15-2005, 04:39 AM
sunek sunek is offline
Member
 
Join Date: Feb 2005
Location: Denmark/Aarhus
Posts: 51
Default Re: How does the random card generator at the internet poker sites wor

I believe that the shuffle algorithm is OK at paradise. However it still makes a lot of difference whether they generate a whole deck of cards and pick each card form one end of the deck like it is done in an off line game, or they pick each card randomly from the remaining cards in the deck. If the cards are picked from one end of the deck dishonest gamblers might be able to access the deck of cards and see the flop, turn and river before the hit board.

-sunek
Reply With Quote
  #8  
Old 06-15-2005, 08:30 AM
AaronBrown AaronBrown is offline
Senior Member
 
Join Date: May 2005
Location: New York
Posts: 505
Default Re: How does the random card generator at the internet poker sites wor

But if they can break into the deck, they can break into your hand, which is even more valuable. Plus your cards are inherently less secure, since they must be sent to you.

Even if the algorithm picks one card at a time, if you know its current state and the code, you can predict the next card just as if it had been stored. The site claims they reseed using mouse click and keyboard delays, that would defeat prediction.
Reply With Quote
  #9  
Old 06-15-2005, 05:02 PM
chapstick chapstick is offline
Member
 
Join Date: Mar 2005
Posts: 90
Default Re: How does the random card generator at the internet poker sites wor

[ QUOTE ]
Paradise is by no means giving out the algorithm they are using to shuffle the cards. This is a very general description to help ensure us that they have devised an algorithm that will keep the cards random. To further drive the point home they mention their generator is "based on the Berkeley prng using a state table size of 64 longs", however they certainly make no mention of what part of their rng differs from the Berkeley prng.


[/ QUOTE ]

Yes, that is true. An aside: My experience of 'Computer Science meets Marketing' is that when they say "based on" they really mean "it is" with maybe some very minor midifications. If they actually did extend, or significantly modify, the algorithm, then I would have expected them to hype it up. But that's just my pessimistic view of corporations. You are right though, the exact algorithm is not presented. I am one of those that believe security through obscurity is not really security.
Reply With Quote
  #10  
Old 06-15-2005, 10:03 PM
AaronBrown AaronBrown is offline
Senior Member
 
Join Date: May 2005
Location: New York
Posts: 505
Default Re: How does the random card generator at the internet poker sites wor

I agree with you, but I feel more confident if they implemented a known algorithm than if they improved it.
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 05:56 PM.


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