Select Page
Poker Forum
Over 1,291,000 Posts!
Poker ForumPoker News, Reviews, Tools

Online algorithm

Results 1 to 44 of 44
  1. #1

    Default Online algorithm

    I have been hearing a lot of people who feel that there is a problem with people catching really weird cards at online casinos. Now I figure the consensus is that there are more people playing more hands and crazier cards so you will see more bad beats.

    Does anyone know if the online casinos get audited or there algorithms audited?

    Does anyone know how they work. Do they randomly shuffle a deck and then simulate burning cards like a real casino. Or do they randomly pick the next card out of the available cards left in the deck. And should this matter.

    No one yet has seen 6 aces yet that I know of. But one guy said he saw a table get 3 each AA and KK and several times at the end od a tourny and also lost same pairs showdown (10 10 v 10 10) to flushes.
  2. #2

    Default Re: Online algorithm

    Quote Originally Posted by robe43
    Does anyone know if the online casinos get audited or there algorithms audited?
    Well, I'm sure that if these gaming sites were based in the US, they could and would get audited. Since they are all outside, I think that they don't.

    But some sites take this into consideration.

    Paradise guarantees their randomization through Price Waterhouse Coopers. This is the company that talleys up the votes for the Academy Awards and even consults for the US Presidential Election in a lot of places.

    Other sites probably have people double-checking and verifying their work. But a lot of sites just say, "Trust me, it's random"
    I don't know what they have to say
    It makes no difference anyway.
    Whatever it is...
    I'm against it.
  3. #3
    Most sites have information on their web pages about auditing processes. As far as chance goes, it wouldn't matter whether the deck was randomly shuffled and then put together and dealt like in a live game, or if a card was randomly chosen from a list of available cards.
    "Why does this still seem like gambling to you!?"
  4. #4
  5. #5
  6. #6
    If you poke around the sites, you'll see that most of them boast about their random number generator having been audited.
  7. #7
    I don't know if the sites online burn cards or not. I know that sites like Platinum Poker don't burn cards because its just a 'cosmetic gesture' for B & M games.
    The artist formerly known as Knish
    Only mediocre players are always at their best.
    Phil Ivey Owns You
  8. #8
    Quote Originally Posted by Knish
    I don't know if the sites online burn cards or not. I know that sites like Platinum Poker don't burn cards because its just a 'cosmetic gesture' for B & M games.
    It's actually not a cosmetic gesture for B&M games - they burn the card after the betting round so you can't see a marked card on the top of the deck and bet accordingly.

    I am fairly sure there is no burn card online - it makes no mathematical difference so there's no need to generate that kind of overhead on processing.
  9. #9
    I wonder

    somewhere in one of those articles they question the randomness od b&m decks. I have often wondered when these decks come ordered by rank and suit how do you get them shuffled randomly?
  10. #10
    michael1123's Avatar
    Join Date
    Jun 2004
    Posts
    1,328
    Location
    Rochester Hills, MI
    ... A random number generator?

    Its very simple. Each card in a deck is numbered 1 to 56. A random number generator then picks a random number between 1 and 56, and gives the first player that card. That card (number) is then taken out of the deck (number possibilities), and the RNG then picks another random number of the remaining 55 and the second player gets that card. Repeat until all cards are dealt out preflop, and then 5 more random numbers for the flop.

    Also, davfan is right about the auditing. Nearly every site has information about who audits them and all that.
  11. #11
    i think the math behind picking the "random" number is what is tricky not numbering the deck but I am not sure
  12. #12
    michael1123's Avatar
    Join Date
    Jun 2004
    Posts
    1,328
    Location
    Rochester Hills, MI
    Random number generators are not an uncommon thing though, even outside of the poker world.

    Here's a little essay I found about them on a site I use when I need a random number for something.

    http://www.random.org/essay.html

    This is the link to their random number generator - http://www.random.org/nform.html
  13. #13
    Cool I'll check it out I am sure they have them doen but back in the ah hmm 80s when I was in finance class random number generation was a big thing
  14. #14
    Seems it would cost much less to run a program once that generates the 51! (or whatever) different shuffled deck combinations then use a RNG to select a given deck. The real problem is finding a seed that's large and is random enough to generate a large random # to make it equally probable over the long term that any deck would be used.
  15. #15
    Wow, good idea.
  16. #16
    I'm pretty sure they don't generate the 51! decks or however many it is, that's a lot of computation and sorting. The most common, easiest, and least costly would be to generate a random number and choose that card, if it's gone, generate another and choose that card. The most common seed value to use is the time in seconds since 1970, since it is never the same. They may use some special hardware, to get that to be in milliseconds or something, so that they can generate even more seed values.
    "Why does this still seem like gambling to you!?"
  17. #17
    Quote Originally Posted by LockLow34
    Seems it would cost much less to run a program once that generates the 51! (or whatever) different shuffled deck combinations then use a RNG to select a given deck.
    I'm pretty sure what they really do is generate all of the possible 25 card combinations from the 52 card deck. This is all you need for a ten handed holdem hand. Then they store them and pick them from random.

    Storing only 25 cards for each hand saves them 52% in storage space, but just think - the card you need might not even exist!
    "Limit poker is a science, but no-limit is an art..."
  18. #18
    Fnord's Avatar
    Join Date
    Dec 2003
    Posts
    19,388
    Location
    Silicon Valley
    My inner Software Engineer is cringing, so I'll chime in here.

    Per "weird" hands online. It's a matter of perception combined with seeing more hands per hour. You should get better distributed deals online than in a B&M. People with huge Poker Tracker databases have long since put the conspiracy theories to rest.

    Per how hands are dealt. Storing each deck permutation is silly. So is burning cards (a procedure to limit the effect of accidently marked cards.) The classic card shuffling algorithm is:

    Start with the deck from the last deal (or an ordered deck if this is the first deal.)

    LET X = 1
    WHILE X < 52
    SWAP CARD X WITH RANDOM CARD from X+1 to 52
    X = X + 1

    This gives us a random deck to work from. However, we only need 25 cards, so we could just iterate 25 times to save some computation. Better yet we could just pick a remaining undealt card at random each time we need to deal a new card.

    So it comes down to the random number generator. How randomly are we picking a card to deal out next. There was one case a while ago of a poker room having a poor one and getting hit for a ton of $$$, but since then it's understood how important they are. There is a ton of research on this subject because this same problem is applicable to generating encryption keys.

    Party's generator is probably fed with all sorts of noise, like disk read times, input from players, etc. and all of that is likely fed into a strong hash function. Then the sequence is likely staggered accross multiple tables. Finally, they've certainly tested the #$*^ out of it mathematically (there are certain properties to look for in a "good" random number generator) and the guys that validate slot machines have certified it. Even if you had the code you couldn't predict outcomes. Heck, I wouldn't be surprised if that if you broke into their data center attached a debugger to the server you couldn't determine what turn card is comming because it likely hasn't been picked yet!

    In short, you're getting a better "deal" online than you would ever get at a B&M. Also, the risk of destroying their customer base is greater than the additional profit online cardrooms would gain by "juicing" games with action deals.
  19. #19
    It would be really stupid for them to tamper with anything since it shouldn't really matter to them who wins. No matter who wins they win.
  20. #20
    Quote Originally Posted by Fnord
    LET X = 1
    WHILE X < 52
    SWAP CARD X WITH RANDOM CARD from X+1 to 52
    X = X + 1
    C'mon Fnord - I see enough pseudocode at work!

    ::grumbles::

    Too many programmers on here ....
  21. #21
    Any common random number generation would not be good enough when dealing with millions of dollars a day. Look at your time theory for example. By using time provides some randomness, but not a lot of entropy. if you seed a rnd function with time() or GetDateTime() from C it is fairly simple to search outwards from now, and home in on your value, particularly when dealing with only 52 values. A finer resolution clock would be better, but the same could still be done just at a slower pace. There are only 31.5 million ticks of a computer each year, which is not alot when dealing with crypto deciefers. Rnd() type functions have been known to produce blotches of the same number/sequences, simple by having a program watch a table for a few weeks could produce enough of a pattern to predict a range of cards that are likely to fall.

    My guess would be that poker sites employee/ed a crypto expert to produce true cryptographic quality random numbers. In that they could go as far to show to the public the algorithm used to generate the numbers and you or a super computer would never be able to predict the number that would be produced.

    Alot of cyrpto people use the video memory of a computer as a source for randomness. My guess would be an online site would use the timing of people connecting to thier site, or say an avg ping value from 1000+ of its users as seeds to randomness.
  22. #22
    Quote Originally Posted by Fnord
    Party's generator is probably fed with all sorts of noise, like disk read times, input from players, etc. and all of that is likely fed into a strong hash function. Then the sequence is likely staggered accross multiple tables. Finally, they've certainly tested the #$*^ out of it mathematically (there are certain properties to look for in a "good" random number generator) and the guys that validate slot machines have certified it. Even if you had the code you couldn't predict outcomes. Heck, I wouldn't be surprised if that if you broke into their data center attached a debugger to the server you couldn't determine what turn card is comming because it likely hasn't been picked yet!
    Easiest (and most likely) method of doing it.

    This is the same method my company uses to select the winners of sweepstakes.
  23. #23
    Ya unix uses disk read times to seed it's rand type functions. Input from players would be to slow IMO, but is a great source for true randomness when dealing with client side apps.

    Regardless what they use, it's safe to bet they don't use:

    seed(time());
    nrivcard = rand(1,52);



    I wish they did, I'd have millions in the bank

    What would be interesting is if you could query thier hand database for information on other players
  24. #24
    Just one more thought on the subject,

    With online poker becoming so popular, why arn't they policed yet?

    Where is the US government to protect the hundreds of millions of US dollars being fed through these sites?

    Isn't it safe to say a member of a terrorist organization could pass money undetected very easily. 5k head to head match anyone? oops I lost with a pair of 2s all-in?

    I'm not at the level of game where these questions concern me very much, but when I get beat with an 85%+ hand on the riv when alot of money is at stake I start to wonder myself. BUT, then I remember pulling a few long shots out of my a$$ too.

    Arn't all lottery corperations still using balls to generate thier numbers? must be because a computer would be to easy to manipulate, what makes this any different?

    Personally I think its going to get to the point of the govn will start to put pressure on these online sites to the point where the lottery corps open it's own version backed by the govn.
  25. #25
    The US can't regulate because the online casinos are in the Caribbean and Canada for the most part I think, someone correct me if I am wrong. I think it would be good if the US would legalize it and tax a little could help the deficit or use the money for social programs.


    I think they still use the little balls because they are fun to watch on the local TV at 7 PM and your average Joe is more likely to believe in the balls bouncing as random as opposed to seeing 8 numbers pop on the computer.

    I think most people feel that online poker isn't rigged and I've still about a dozen times thought this BS this has to be rigged. Can you imagine 10 million folks calling the powerball guys asking them about their random number generator? He He
  26. #26
    Quote Originally Posted by KewlKatt
    Just one more thought on the subject,

    With online poker becoming so popular, why arn't they policed yet?

    Where is the US government to protect the hundreds of millions of US dollars being fed through these sites?

    Isn't it safe to say a member of a terrorist organization could pass money undetected very easily. 5k head to head match anyone? oops I lost with a pair of 2s all-in?

    I'm not at the level of game where these questions concern me very much, but when I get beat with an 85%+ hand on the riv when alot of money is at stake I start to wonder myself. BUT, then I remember pulling a few long shots out of my a$$ too.

    Arn't all lottery corperations still using balls to generate thier numbers? must be because a computer would be to easy to manipulate, what makes this any different?

    Personally I think its going to get to the point of the govn will start to put pressure on these online sites to the point where the lottery corps open it's own version backed by the govn.
    Every online casino that I know of is outside of US jurisdiction. However, almost all of them that I know also have verified the quality of their RNG's with an outside auditor. I trust them completely, as much as I'd like to doubt them when I'm on a losing streak.

    Remember that the casino is making money on the rake - they don't care who wins the hand - so the guy pulling the 2-outer on the river means nothing to them. As said many times before, there's way too much made by the rake to risk losing their customer base over a scandal.

    The lottery still uses balls to generate their numbers for a couple reasons. First, they only need to do the calculation ONCE every couple days. Time isn't exactly of the essence. In contrast, PartyPoker needs to perform the same type of calculation thousands of times per second. Plus, watching a live lottery drawing pop up on a monitor wouldn't be nearly as engaging, although if you live around New York, that's exactly how QuickDraw is done (kind of like Keno).
  27. #27
    Quote Originally Posted by robe43
    I think they still use the little balls because they are fun to watch on the local TV at 7 PM and your average Joe is more likely to believe in the balls bouncing as random as opposed to seeing 8 numbers pop on the computer.
    I heard casinos unsuccessfully tried to switch their quarter slot machines from the reels to the graphics screen.

    People didn't take to it. Even though the same RNG was used in both machines and people had the same chances to win. People thought they would fair better if they played with reels. They eventually went back and forth. Now nickel slots have the screen that displays some reels and the quarters mostly have reels.

    I'm sure it's the same thing with bingo, lottery and poker. When you can see the stuff, you feel it's more real. Fact is, it's equally easy to rig either way. However, by rigging a game, you have more to lose than you do to gain.
    I don't know what they have to say
    It makes no difference anyway.
    Whatever it is...
    I'm against it.
  28. #28
    I wish the gov. would keeps its hands off most everything including online gambling. All they tend to due is overbeaurcrat everything and make it harder and more expensive to do most everything. Take responsibility for yourself. Wow I went on a little rant there. Have a happy day!
    Holy crap I cant play against Yoda!!
  29. #29
    From PokerStars' web site:

    * A deck of 52 cards can be shuffled in 52! ways. 52! is about 2225. We use 249 random bits from both entropy sources (user input and thermal noise) to achieve an even and unpredictable statistical distribution.
    * Furthermore, we apply conservative rules to enforce the required degree of randomness; for instance, if user input does not generate required amount of entropy, we do not start the next hand until we obtain the required amount of entropy from Intel RNG.
    * We use the SHA-1 cryptographic hash algorithm to mix the entropy gathered from both sources to provide an extra level of security
    * We also maintain a SHA-1-based pseudo-random generator to provide even more security and protection from user data attacks
    * 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:
    o we take 5 random bits and convert them to a random number 0-31
    o if this number is greater than 25 we just discard all 5 bits and repeat the process
    * This method is not affected by biases related to modulus operation for generation of random numbers that are not 2n, n = 1,2,..
    * To perform an actual shuffle, we use another simple and reliable algorithm:
    o 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
    o 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
    o we repeat the process until all cards have moved from the original deck to the new deck
    * This algorithm does not suffer from "Bad Distribution Of Shuffles" described in [2]
    For note, it's 2^225 on the page, not 2225
  30. #30
    Xianti's Avatar
    Join Date
    Dec 2003
    Posts
    9,246
    Location
    facebook.com/mediacookery
    My head hurts.
  31. #31
    Hmm...I think that's all a bunch of mumbo jumbo to say it's rigged. "If we don't get the desired entropy..." doesn't the desire to have a certain amount of entropy or whatever make it not random, not that anything can truly be random. It seems like their trying to make it more statistically likely to happen, than truly random.
    "Why does this still seem like gambling to you!?"
  32. #32
    Like you said, it's never TRULY random. But there's no way you could possibly analyze all that data in realtime and combine it and achieve exactly the same seed as they do.

    They want entropy (variation) on user input to minimize the chance that someone can figure out the seed for the RNG - if they don't receive enough different values, they can it and try again.

    Makes sense to me.
  33. #33
    Fnord's Avatar
    Join Date
    Dec 2003
    Posts
    19,388
    Location
    Silicon Valley
    Quote Originally Posted by scgolfer
    I wish the gov. would keeps its hands off most everything including online gambling. All they tend to due is overbeaurcrat everything and make it harder and more expensive to do most everything. Take responsibility for yourself. Wow I went on a little rant there. Have a happy day!
    We've been here before. The problem is the (local) government does have their hands very much in B&M gambling, hence have little interest in seeing online poker rooms successful.

    If the government would clear up the grey-market status of online poker rooms, it would be a boon to players in the form of increased competion and hence reduced rakes.
  34. #34
    Fnord's Avatar
    Join Date
    Dec 2003
    Posts
    19,388
    Location
    Silicon Valley
    Quote Originally Posted by AvatarKava
    Like you said, it's never TRULY random. But there's no way you could possibly analyze all that data in realtime and combine it and achieve exactly the same seed as they do.
    By that standard, neither are the cards at your local B&M (unless they're using a top notch shuffling machine.)
  35. #35
    I would guess that online decks would be closer to being random or more random (if I am not making a mathimatical ass out of myself) than the B&M shufflers and I would think way more random than your average home game.

    Not to mention the one guy who keeps dropping the cards in his beer when he shuffles.
  36. #36
    Quote Originally Posted by robe43
    I wonder

    somewhere in one of those articles they question the randomness od b&m decks. I have often wondered when these decks come ordered by rank and suit how do you get them shuffled randomly?
    Wash
    shuffle
    shuffle
    box cut
    shuffle
    shuffle
    cut


    When you open a new deck you spread it out face up. Ensure all 52 cards are there. then "wash" them by taking your hands and spreading them around over top of each other. www.21ace.com has a small video of a dealer wash and shuffle.

    After the wash shuffle twice, box cut, shuffle cut and deal. (see above website for a video.)
  37. #37
    Quote Originally Posted by davfagan
    Hmm...I think that's all a bunch of mumbo jumbo to say it's rigged. "If we don't get the desired entropy..." doesn't the desire to have a certain amount of entropy or whatever make it not random, not that anything can truly be random. It seems like their trying to make it more statistically likely to happen, than truly random.
    IIRC from my college physics days, entropy is a measure of disorder in a system. Greater entropy means more disorder, or randomness. So you'd want more entropy, not less.
  38. #38
    Quote Originally Posted by Fnord
    Quote Originally Posted by AvatarKava
    Like you said, it's never TRULY random. But there's no way you could possibly analyze all that data in realtime and combine it and achieve exactly the same seed as they do.
    By that standard, neither are the cards at your local B&M (unless they're using a top notch shuffling machine.)
    Agreed - some of the Vegas casinos have some pretty intense shufflers, but there's no such thing as truly random in the world of computers. The best you can do is make the data you're throwing in as chaotic as possible so the chance of someone being able to figure out the seed quickly enough for it to make any difference is nil.
  39. #39
    speaking of RNGs i would be very surprised if any of the poker sites did not generate truly random numbers. in one of my statistics classes we looked at some random numbers generated by an infamous IBM algorithm, it was fairly old so it's not used anymore. but anyways, on a 2D graph it appeared to be completely random, but once we plotted it on a 3D graph and rotated it about and around eventually you could see distinct lines of dots that were parellel to each other, thus it wasn't random at all.

    all RNGs today will pass the 3D test. as far as i'm concerned that's random enough.
  40. #40
    Quote Originally Posted by AvatarKava
    Like you said, it's never TRULY random. But there's no way you could possibly analyze all that data in realtime and combine it and achieve exactly the same seed as they do.

    They want entropy (variation) on user input to minimize the chance that someone can figure out the seed for the RNG - if they don't receive enough different values, they can it and try again.

    Makes sense to me.
    I am new to on line hold'em. I play alot of home games and local tourney's. It just seems to me that there are far to many good pocket cards at any given game. I mean aa,qq,ak,kk all in one game and that dosen't seem uncommmon. A couple of days ago I got AA 3 times in a row and had an Ax like 4 times after that in a row(not that Im complaining about that) but what give's is it because it drives up the pot which in turn produces a larger rake?[/quote]
  41. #41
    a500lbgorilla's Avatar
    Join Date
    Sep 2004
    Posts
    28,082
    Location
    himself fucker.
    No. Online poker is not rigged. We've had this discussion too, too much.

    Use the search button to save us from telling you the same things.

    -'rilla
    <a href=http://i.imgur.com/kWiMIMW.png target=_blank>http://i.imgur.com/kWiMIMW.png</a>
  42. #42
    I wear a tin foil hat when i play at any online site so their spy satelite photos can't see my facial expressions and detect tells i give off.
  43. #43
    a500lbgorilla's Avatar
    Join Date
    Sep 2004
    Posts
    28,082
    Location
    himself fucker.
    Quote Originally Posted by Bmxicle
    I wear a tin foil hat when i play at any online site so their spy satelite photos can't see my facial expressions and detect tells i give off.
    LMAOWFOOANW14STTG,DOI!

    {Laugh My Ass Off While Falling Out Of A Nearby Window 14 Stories To The Ground, Dying On Impact!}

    -'rilla
    <a href=http://i.imgur.com/kWiMIMW.png target=_blank>http://i.imgur.com/kWiMIMW.png</a>
  44. #44
    Quote Originally Posted by a500lbgorilla
    Quote Originally Posted by Bmxicle
    I wear a tin foil hat when i play at any online site so their spy satelite photos can't see my facial expressions and detect tells i give off.
    LMAOWFOOANW14STTG,DOI!

    {Laugh My Ass Off While Falling Out Of A Nearby Window 14 Stories To The Ground, Dying On Impact!}

    -'rilla
    'rilla, you crack me up man.
    I built my own poker table... Check It Out

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •