Online Video Poker (maybe)

Well I'll keep an open mind and retract my "zero" then (Black Swans and all that ;)). Maybe 4OAK can amaze me and prove it but unless he has been playing on obscure proprietory softwares then it would be pretty astonishing. I will certainly tip my hat to him if he can come up with the goods. But given that VP has been tested extensively in the player community over many years it would be a huge shock. And as you hinted above 'variance sure can be a bitch.'
 
This thread isn’t about my personal outcomes or beliefs. It’s about trying to find out how the game video poker is being offered to us online.

As this thread confirms we at least know of two different versions, (class 111) and (class 11). Like binary128 mentioned before both are perfectly legal, one being controlled based on pre-determined house hold settings, and the other being controlled by random card draw.

Like I said before I’m not certain if I could tell the difference playing a class 111 game or a class 11 that was pre-set with the same expectancy percentages as a class 111. Yet, if I was playing a class 11 with the proper return settings, I’m confident I would know the difference rather quickly if it suddenly was reduced. Okay, maybe not that quick but after two years of the same, it might be time to back off and start scratching your head.

Can I prove it???? Of course not… Does anyone here actually think I could produce a decades worth of all the video poker hands I played? If I had them of course I would send them to the wizard of odds for analyzes. Unless he could make a judgment comparing annual dollar losses, I don’t think he could be much help. And yes, I know the wizard did do analyzes for RTG but that was over a decade ago, so give that a break.

Just like some members here are confident and secure where they choose to play, I’m not that confident and secure any longer, which is why I decided to stop. I could be completely wrong with my assumptions and I’m willing to chalk it off as a bad run (variance), but not till I’m convinced of how my cards are being dealt to me.

For the most part the vast majority of gamblers are clueless when it comes to the actual inner workings and or statistics of the games being offered. Many seem to forget that most of the members here are pretty much up to snuff with gaming, and don’t realize how small of a percentage they actually are when compared to the masses. Most gamblers don’t have a clue where to go or what to ask about even if they knew.

Serious well educated gamblers (not sure how smart a person is that knows they’ll eventually lose) not only love the action but are willing to lose 100k with the hopes of getting 200k in return and are just as happy to get 50k back. But, this type of gambler needs to know everything their up against, regardless which game they choose to play.

I’m not saying that there is any difference between a low roller or high roller when it comes to gambling for entertainment. But low rollers treating a Friday night playing online no different then going out to dinner really can’t be compared to the player willing to risk 10k over the weekend. With that being said I don’t mean the 10k hi roller is any better then the low roller or any smarter. Trust me there is plenty stupid ass hi rollers all over the place. What I’m trying to say is the majority of hi rollers do research and confirms what their up against before losing their money. At the very least they get a lot more action for their money.

I already knew before I even started this thread that no confirmed facts would be found out one way or the other. At least we know that all video poker programs are not all created equal.

I also would like to add that binary128 representing Galewind software, and jstrike representing his software, that even without confirmed fact I would be willing to give their software a go of it. Their honesty, transparency, and hands on can’t be over looked.
 
4OAK I agree with you that it's totally unacceptable you can't get answers to your most valid questions. That is an excellent reason not to play in my opinion. This industry is far too opaque and is a bit of a shambles really. I just can't believe Playtech, MG and RTG et al don't have technical reps on this forum. And what about Alderney, eGOGRA and all the other regulators/testers?

The truth of the murky casino world is all the real testing is undertaken by the players themselves. When English Harbour were caught out on the VP doubling it was a player, Lawnet, that exposed them. If you have the skills to do it you can do a lot of testing on games like BJ and VP. The systems are fairly open and it is possible to create feedback loops similar to what jstrike was talking about above with reference to his own casino. This is why i think it is very unlikely VP cheating could go undetected for more than a short time.

The reel problem (geddit?) is not card or table games but slots as these cannot be verified by players. A VP theoretical RTP can be verified to a very high degree of accuracy but with slots it is not possible due to the bonus rounds and theoretical RTP can never be verified. So if there is cheating going on then it's far far more likely to happen with slots than VP or card games because only a regulator or tester with access to the source code could detect it.
 
This post is just an assortment of bits and pieces.

In an earlier post by iNetBet Promos:

... Take for example the game Aces & Eights: Our Paytable for this game is set to High. This gives an expected return on this game of 99.78% on max bet. If the paytable was changed to low (reducing the payout of 4 OAK Other and Full House) then the expected return would reduce to 97.72% ...

I infer from this that they can request from their Software provider different pay tables for the same Video Poker game. In this example, they can request a "High" pay table or a "Low" pay table for the game of Aces & Eights.

Please allow me to emphasize: there is nothing intrinsically wrong with this. As iNetBet Promos pointed out in the rest of their post, they believe that they operate Class III machines, which means that you can use the Wizard of Odds'
You do not have permission to view link Log in or register now.
to calculate the Theoretical Maximum RTP of any and all of their Video Poker games, so nothing is hidden.

I simply found it interesting.


Another snippet:

... With a class II type slot, we could predict what we'd make this year ...

I started to think; "Aren't all Slot games, by definition, Class II machines?"

And in that thinking I determined that they aren't (or, more accurately, that they might not be).

Consider what I/we have learned about Class II machines. Disclaimer: the following conclusions may or may not be accurate, because they are based on the limited data which I/we have on hand.

For Class II machines, some finite quantity of games are defined and stored somewhere on a server. Using whatever software calculations the programmers applied, this finite set of games (let's say a million) in total represents a pre-determined, and pre-approved, Actual RTP, let's say 93%.

If it was discovered, however, that when this 1 million game set was first created and analyzed it had an Actual RTP of 91%, or an Actual RTP of 95%, then they would generate more games, or replace some games in the set, or modify some games in the set, or whatever, such that the result was 1 million games with a total Actual RTP of 93%.

Games from this set would then be sent out to client machines on request.

Which is not how totally random (what I will now term) Class III Slot machines work at all. Given a Slot with a Theoretical RTP of 93%, a 1-million sample set might have an Actual RTP of 97%, a 2-million sample set might have an Actual RTP of 92%, a 3-million sample set have an Actual RTP of 91%, a 4-million sample set have an Actual RTP of 99%, and like that.

Yes, this slot's Actual RTP will eventually approach its Theoretical RTP, but the sample size involved might be in the tens of millions.

Again allow me to emphasize: I place no value judgments on any of this. Bottom line: a Class II machine at 93% Theoretical RTP is functionally equivalent to a Class III machine at 93% Theoretical RTP. The only difference is variance, which could work for you or against you.

I simply find it interesting to consider that there might indeed be Class II and Class III Slot machines available in the world. Maybe others will have a greater, or more accurate, insight than mine.

Chris
 
For Class II machines, some finite quantity of games are defined and stored somewhere on a server. Using whatever software calculations the programmers applied, this finite set of games (let's say a million) in total represents a pre-determined, and pre-approved, Actual RTP, let's say 93%.

If it was discovered, however, that when this 1 million game set was first created and analyzed it had an Actual RTP of 91%, or an Actual RTP of 95%, then they would generate more games, or replace some games in the set, or modify some games in the set, or whatever, such that the result was 1 million games with a total Actual RTP of 93%.

Games from this set would then be sent out to client machines on request.


Chris


I don't think this is quite right somehow, I think we need to go back to the beginning and look at why these machines came about in the first place.

Non random fruit machines came about in the UK in the 1960's I think and were invented so that owners of Chinese takeaways could own a machine with a limited liability and that was also practical to operate. How they worked was they were set up so they couldn't pay out unless they had enough coins in them to be able to pay a jackpot. I don't think you need any sort of game set but a measurement of how much is going in and out of the machine, with the reels reflecting this process. It was all about the coin in and coin out hoppers.

Perhaps strangely the online ones seem to operate in a similar way in that each player seems to be assigned their own machine. So you can fill your own machine up with cash and eventually jackpot it. It will remember it's state in between the players visits to the casino.

When the arcade machines moved to chips in the late 70's and 80's various people began to devise cunning ways of tricking the machine into thinking it was full when infact it was not. Sometimes it was pressing a sequence of buttons on the machine and other times it might be making illogical moves at certain times in the game cycle such as rejecting wins or features. I believe one was as simple as turning the plug on and off at a certain point. At it's height there were guys going round with carrier bags full of coins and some big money was made by a few.

So the online versions have come from this method but with much tighter code. Allegedly :D. Jstrike had better get his coding right on his Class 11 machines or he could end up getting a nasty surprise, like the one 32Red got when a player managed to win £50K one night ;). If you ask the player involved (who posts here) nicely he will tell you that story I'm sure :).
 
Again allow me to emphasize: I place no value judgments on any of this. Bottom line: a Class II machine at 93% Theoretical RTP is functionally equivalent to a Class III machine at 93% Theoretical RTP. The only difference is variance, which could work for you or against you.

I simply find it interesting to consider that there might indeed be Class II and Class III Slot machines available in the world. Maybe others will have a greater, or more accurate, insight than mine.

Chris

There are a group of Class II machines on MG called AWP's, they are a lot of fun. The problem online is because it is your own individual machine it will always be empty when you first play which means variance can never be on your side.

OTOH if you could somehow fool it into thinking it is full when it isn't then you would be quids in :).
 
... I'm thinking about putting together a kinda...I don't know, a Player's Bill of Rights, or something like that. Like something casinos could only sign onto if they followed all these rules, and it wouldn't be like a regular certification, it would be something where all of the info has to be shown to everybody, in a format they can use to run their own statistical checks, and not just shown to eCOGRA or somebody where it's buried and smoothed over in the end-of-month statistical paybacks. And the important features aren't randomness or RTP, they're about a hand-by-hand analysis of how things went down, because that's where you can really tell if something's fair or not...a couple hundred hands at a time.

JStrike,

Re: the Player's Bill of Rights. If you haven't already, take a look at My Closing Comments for my thread "Return to Player - Critiques Requested."

I think that some of the things that I have listed in my expanded paragraph "For question #1, ..." would work here.

But I temper all of this with the PITA factor of question #2 - specifically, how much work do I want to do to ensure I'm playing a fair game but still focus on actually playing that fair game.

Chris
 
There are a group of Class II machines on MG called AWP's, they are a lot of fun. The problem online is because it is your own individual machine it will always be empty when you first play which means variance can never be on your side.

OTOH if you could somehow fool it into thinking it is full when it isn't then you would be quids in :).

Only some of them work that way but not all.

Treasure Island and its clones and a few others start "empty" (99% of the time anyway), but games like Ski Bunny etc can give you 1000x on the first spin - which happened to me when I had never played that game before at that casino or that casino group.
 
There are a group of Class II machines on MG called AWP's, they are a lot of fun. The problem online is because it is your own individual machine it will always be empty when you first play which means variance can never be on your side.

OTOH if you could somehow fool it into thinking it is full when it isn't then you would be quids in :).

DiamondGeezer,

For this post, and your previous post, I bow to your superior knowledge.

Given the proper instructions on how these AWP machines function I'm sure that Galewind would be able to build them.

At the moment, our game build "To Do List" is mostly table games - Spanish 21, Let It Ride, Sic Bo, multi-hand Blackjack, maybe a multi-hand Video Poker or 2, maybe Red Dog or Casino War, and like that.

Are these AWPs something we should be considering?

Chris
 
Actually I cribbed all that stuff of Vinylweatherman :o. He is the expert on AWP's and incredibly did win £50K at 32Red when he 'forced' a machine to megastreak by playing it in a certain way. It's a bit of a joke round here that he likes to tell that story but it is a brilliant one.

No need for AWP's/Class II's really. No 1 priority is 4 Line VP, then 10. A VP progressive would be a very good move too. And some more table games and slots. Guess you'll be busy!
 
Got this pm from Bodog today:


From the bodog casino manager:

"Our technical product manager has confirmed that our Video Poker games use a direct model of decks of cards, which is how the article describes the Class 111 machine".

Hope this helps and have a great weekend!
Becky
 
Got this pm from Bodog today:


From the bodog casino manager:

"Our technical product manager has confirmed that our Video Poker games use a direct model of decks of cards, which is how the article describes the Class 111 machine".

Hope this helps and have a great weekend!
Becky

Great that you got a response. How many casino's did you inquire with and how many responded?
 
I read this thread with interest as a developer myself (not online gaming software!).

A point which I think binary128 maybe tried to make but didn't make really clear is that programming a fair game of video poker should be trivial to a good developer. I am thinking it would be less than 50 lines of code, and take no more than a few hours to program and write a test for it. Same for just about every card game at a casino, plus roulette, craps etc. With video poker the operator has the advantage over the player due to the paytable. If they want to make the game more profitable they can just change the paytable to suit.

Programming a deterministic game that has a pre-set RTP would be far more complicated and difficult to balance over time. Someone mentioned throwing away 3 of a kind to see if you are re-dealt that as a way of telling. But what about if the player does something hugely unexpected that makes the preset hand impossible to complete. Say the game has decided that it will deal a royal flush, so it deals 3 or 4 to a royal plus some low unsuited trash and expects the player to hold the suited royal cards. But instead the player discards the royal cards and keeps the others. What does it do then? It can't possibly deal a royal now. Maybe it spits out a four of a kind or straight flush if possible? Then later it has to rebalance that because it is now one short of the expected royal count. I know these types of machines do exist but to me it seems like a dumb way of developing a game that would just cost way more money in development and testing time. It would be better, quicker and cheaper to make a random game and just change the paytable to make the game more profitable. I can only assume that these sort of games are developed to "smooth" the payouts to players so that the operator does not have to pay out several big winners in a short space of time.

A question for binary128, jstrike and any other online gaming developer reading. How do you seed your random number generator? Of course I don't expect detailed specifics as this is the exploitable part of any online gambling game. I mean at a high level. Do you use hardware based generation, or is it all done in software? And have you ever considered publishing the source code to your shuffling and/or dealing algorithm (not the RNG) in the interests of transparency?
 
Im on the side of truly random myself..

But thats because i have hit 6 royals in the last 3 weeks alone for greater than £10k in total..

I think i have hit another 6 or so in the past, but over a much longer period of time..


M
 
I read this thread with interest as a developer myself (not online gaming software!).

A point which I think binary128 maybe tried to make but didn't make really clear is that programming a fair game of video poker should be trivial to a good developer. I am thinking it would be less than 50 lines of code, and take no more than a few hours to program and write a test for it. Same for just about every card game at a casino, plus roulette, craps etc. With video poker the operator has the advantage over the player due to the paytable. If they want to make the game more profitable they can just change the paytable to suit.

Programming a deterministic game that has a pre-set RTP would be far more complicated and difficult to balance over time. Someone mentioned throwing away 3 of a kind to see if you are re-dealt that as a way of telling. But what about if the player does something hugely unexpected that makes the preset hand impossible to complete. Say the game has decided that it will deal a royal flush, so it deals 3 or 4 to a royal plus some low unsuited trash and expects the player to hold the suited royal cards. But instead the player discards the royal cards and keeps the others. What does it do then? It can't possibly deal a royal now. Maybe it spits out a four of a kind or straight flush if possible? Then later it has to rebalance that because it is now one short of the expected royal count. I know these types of machines do exist but to me it seems like a dumb way of developing a game that would just cost way more money in development and testing time. It would be better, quicker and cheaper to make a random game and just change the paytable to make the game more profitable. I can only assume that these sort of games are developed to "smooth" the payouts to players so that the operator does not have to pay out several big winners in a short space of time.

A question for binary128, jstrike and any other online gaming developer reading. How do you seed your random number generator? Of course I don't expect detailed specifics as this is the exploitable part of any online gambling game. I mean at a high level. Do you use hardware based generation, or is it all done in software? And have you ever considered publishing the source code to your shuffling and/or dealing algorithm (not the RNG) in the interests of transparency?

You're right on about it being a lot harder to write a "deterministic" game than a random one. And the idea of the machine having to make up the difference for hands where it couldn't make the expected payout was something that went through my mind too, along with how you'd synchronize that across lots of machines without going into a race condition.

Highly technical: You're not quite right about VP taking only 50 lines of code...I mean, just parsing a poker hand takes about 60 lines (at least my version does). Actually dealing out hands randomly and then replacing the discards is trivial, the hard part is running all the input validation, account balancing and database i/o you need if you're taking input from a web facing application, recording a result, verifying that the player hasn't done anything with any other machine in the casino at the same time that would put them into a negative balance, checking whether the player's connected, making graceful disconnects, keeping it stateless in case someone does lose connection, and doing that with dozens of players at the same time on the same server while avoiding deadlock. If you just ran a single-threaded socket server in JVM it wouldn't be a problem, I guess, it's just that we allow players to sit at 6 tables at the same time, and some of those can be multiplayer blackjack tables too, and all of it reads/writes to the same db. So... doing things the hard way, our most basic Jacks or Better game is about 250 lines of backend code mostly dealing with transactions, connection state checks, action validation, parsing the paytable, gracefully handling rollbacks. And that doesn't include the bet acceptance code or the shuffling code or the poker hand parser.

Our RNG is seeded like this:
1. Take an md5 hash of the microtime, i.e. a 32-character hexadecimal number.
2. Use the current (old) seed to select a number between 0 and 24.
3. Use that number to substring a 32-bit (8 character) chunk the md5 hash.
4. Convert that substring to an unsigned integer, which is the new seed.

Basically in PHP it boils down to this:
PHP:
$s = (hexdec(substr(md5((double)microtime()*1000003),mt_rand(0,24),8)) & 0x7fffffff) * round(mt_rand(0,1)-.5);

So the seed itself is a function of the microtime, the last seed, and where the RNG was in the last period when the reseeding is triggered. The reseeding gets triggered when any of the distributed satellite servers asks for a new tranche of random numbers to refill its buffer. Each one keeps a running pool of anywhere from 10,000 to 100,000 integers in volatile memory. When that pool dips below length N, the satellite server requests a new tranche from the RNG, which reseeds and spits out a set of numbers based on the size of the satellite server's request. The first 32 bits of the new tranche are used by the satellite server to determine what level it's going to request its next refill at and how many numbers it'll request next time, so neither the size of the requests nor the refill size are constant, and both are determined by the central RNG's numbers themselves. After that, the rest of the numbers are put onto the bottom of the pool. During this process the games on the satellite are continuously pulling 32-bit numbers off the top of the pool. This is how we keep a continuous flow of random numbers to the player even though the RNG may be far away.

Finally, when we shuffle, we pull a 32-bit number at the top of the pool to create a local mersenne twister sequence, which is the basis for a Fisher-Yates shuffle where the initial array is a new (sorted) deck or 6-deck shoe. The local twister sequence is determined by what's at the top of the pool and is predictable if you know what's in the pool, it's just a way to scale the numbers...we could just as easily use any other evenly scaling algorithm to get a number between 1 and 52 from the pool and it would still be as random as what the pool itself was holding from the RNG, but an MT sequence happens to be an efficient way of doing it. We have no way to view the pool while it's running, it only exists as an array in RAM, but we log these numbers as they come off of it. So there's no actual randomness being generated by the satellite server. Each one's a slave to the central RNG, the numbers used for the decks are predestined from the moment it fills the pool, and all it's doing is showing the results. (Although who gets a lucky hand is obviously up to the order people are playing in, what seats they're in, and more of a philosophical question). Here's the FY shuffle we run:

PHP:
function _fy_shuffle(&$array) {
	$total = count($array);				
	if (RNG_POOL) {
		//pulls a 32-bit unsigned integer off the top of the pool.
		$seed = $this->_fetchSeedFromPool();
	}
	if (!$seed) {
		//if connection to the central RNG is lost and the pool is below the fill line, 
		//we use the game server to generate a local random seed based on the same algorithm that fills the pool.
		$seed = $this->_getFailoverSeed();
	}
	mt_srand($seed);
	for ($i = 0; $i<$total; $i++) {
		$j = @mt_rand(0, $i);
		$temp = $array[$i];
		$array[$i] = $array[$j];
		$array[$j] = $temp;
	}		
}

That gets done 3 times, cutting the deck once between each shuffle at a point chosen by the last number in the MT sequence. The deck or shoe is then inserted into the database and used as the basis for the next dealt hand (or kept running for multiple hands of blackjack).

The output has proved to be extremely random by measuring the results... for decks and shoes, we evaluate that two ways (1) how many decks end up with suited cards in the first 2, 3, 4, 5 or 6 cards at the top of the deck, versus the probability of that happening, and (2) how many times each card ended up as the first card in a deck. For example, out of 29,010 shuffles since we opened, there have been 57 single decks with exactly 5 suited cards at the top of them. The probability of that happening on a given deck is (12/51)*(11/50)*(10/49)*(9/48) = 0.1981%, which means over 29,010 shuffles it should happen about 57.46 times. We're right on target.

So there you have it... a complete explanation of how our RNG is seeded and how the decks are shuffled. I know I'm probably not supposed to put this "out there", but I don't see a point in keeping it a secret. As far as I know, it's unbreakable and the results are fair. If someone sees flaws in it, let me know. I'm always looking to improve the system.
 
LOL. OK. Alright. I give up. I surrender.

JStrike, in the category of "more words than you want to read", for which I personally had a Patent Pending, you win :D

zanzibar, JStrike is the one who has been hammering home, both in this thread and, if memory serves, in other threads, that making a "cheating" game would be a lot harder than making a "fair" game.

50 lines of code is a little lean, by the way. For reasons, Pai Gow Poker is the most challenging game in our current set of games (as far as server-side code is concerned). "Dealing the hands" in this game is, as you point out, relatively trivial. However, the code required to build the Dealer's two hands is currently running at well over 3,000 lines. The total processing code for this game is about 5,000 lines. (I wrote this code, I've been doing this since the days of
You do not have permission to view link Log in or register now.
, so I can say with confidence that I write pretty tight code.)

But I get your point. A "fair" game of Video Poker that just relies on the RNG to "deal the cards" is, I agree, a lot easier to build than "... a deterministic game that has a pre-set RTP ..."

Regarding understanding how a Class II Video Poker game can actually function, I found A Post From Simmo, in which is a link to an article in the Casino City Times, to be very helpful.

The closing argument of your third paragraph ("... to me it seems like a dumb way of developing a game ...") is what JStrike has been arguing for some time now.

Regarding how we seed our RNG: We use
You do not have permission to view link Log in or register now.
in Microsoft's Cryptographic Application Programming Interface. (aka MS CryptoAPI) We also use the CryptoAPI as part of our background cycling process.


And have you ever considered publishing the source code to your shuffling and/or dealing algorithm (not the RNG) in the interests of transparency?

I have never before considered it. Having just considered it, I would not publish it in the interests of transparency. I would, however, publish it in the interests of saving the life of any member of my immediate family. :p

I did make an earlier post in this thread which probably represents about as far as I would consider going in terms of disclosing our source code. To be accurate, I think that this is a significant distance.

Chris
 
Yeah the "50 lines" in hindsight sounds a bit lean. I was thinking basically just a game of jacks or better dealing, discarding and re-drawing, then deciding whether you had won. Not all the IO and timing stuff. I can see how Pai Gow would be significantly more complicated, but not something like roulette (or casino war!) for example.

Jstrike thanks for the very informative post. It was way more than I would have expected you to disclose. In fact I would go so far as to say that you probably should remove that line of RNG code from your post, as you are using a Mersenne Twister and therefore the results are reproducible (extremely difficult judging by the process you are using, but not impossible).

Its interesting to me that you guys both use a software based PRNG. Do you know if they are capable of shuffling a 52 card deck into all possible permutations? The way I thought I understood things was that using a PRNG with say a 32 but or 64 bit seed, you would still not be able to generate all possible permutations - i.e. a deck has something like 2^225 possible shuffles, while a 64 bit seed can only generate 2^64. I'm not sure this makes a big difference in practice as it is still a heck of a lot of combinations, its more of a computer science theory question.
 
zanzibar,

Pai Gow Poker is just amazingly hard. Much harder than Hold'em Poker, which is also a 7-card Poker game. One might think that Craps would be tough, given all of the different bets and all of the options associated with those bets, but it's not that tough really.

Re" "... as you are using a Mersenne Twister and therefore the results are reproducible ..." In essence, almost all PRNGs are reproducible. (Thus the critical importance of the seeding process.)

You do not have permission to view link Log in or register now.
states "Observing a sufficient number of iterates (624 in the case of MT19937) allows one to predict all future iterates ..."

There are a two complications with this, however.

The first is that these 624 iterates need to be consecutive. If the Casino application has some form of "background cycling" going on, or even if there is just more than one person in the Casino playing games, then the consecutive return is shot.

The second is that a Player in say, Craps, is not seeing the actual Twister output. They are seeing the scaled output. For example, the Twister output is a 32-bit integer between 0 and 2^32 - 1 (that is: 0 to 4294967295). So, any number between 0 and 715827881 inclusive is equal to a die value of 1, any number between 715827882 and 1431655763 inclusive is equal to a die value of 2, and like that. If the Player sees a die value of 2, they have almost no idea what the actual Twister output was.

In addition, Twister version mt19937ar introduced a much more aggressive initialization method with its init-by-array function. You can pass an array of up to 624 32-bit integers into this method. (I believe, but am not sure, that the introduction of this seed method transformed the algorithm such that it is suitable for cryptography.)

So, in general, the Twister is a solid product, "... it provides for fast generation of very high-quality pseudorandom numbers ...", and is universally accepted in testing labs for Casino applications. (Galewind also uses the Twister, we seed using the init-by-array method, with the 624 random 32-bit integers supplied by the cryptographically secure MS CryptoAPI.)

I also agree with JStrike that he can publish as much of his RNG code as he wants and it would still remain "un-crackable". (I could do the same, but however cranky JStrike can get, I'm older and crankier, and I just don't think it's anybody's damn business.)

Yeah, that deck shuffle thing is like that "How many people in a room of 50 share the same birthday?" thing - both answers are really surprising. (
You do not have permission to view link Log in or register now.
.)

A deck of cards has 52! (factorial) permutations ~= 10^68 ~= 2^225.

Again referencing that Wiki article above, you can see that the Twister algorithm has "a very long period of 2^19937." (I believe that this is equivalent to 4294967296!, but I think that if I put that calculation into my Windows calculator it would cause my laptop to explode.)

However, the short answer is: yes, the Twister algorithm more than satisfies a 52-card deck's theoretical shuffling requirements.

(I'm not sure how your statement "while a 64 bit seed can only generate 2^64" is relevant here?)

Chris
 
Programming a deterministic game that has a pre-set RTP would be far more complicated and difficult to balance over time.

That may be so but they are presently being used in Rancinos in New York, and many Indian Casinos. The cost for this programming and maintenance is probably well rewarded for the casino.
 
That may be so but they are presently being used in Rancinos in New York, and many Indian Casinos. The cost for this programming and maintenance is probably well rewarded for the casino.

I thought the whole point of the Class IIs was was to satisfy some kind of old anti-gambling law that some states had, where horse racing, poker and parimutuel games are okay and a track can take a cut from them, but house-banked games are not okay. I didn't think the point was to make the casinos more money or make the games less fair, but it's ironic how that's the end result.
 
That may be so but they are presently being used in Rancinos in New York, and many Indian Casinos. The cost for this programming and maintenance is probably well rewarded for the casino.

Agreed, but simply making a fair game with a crappy paytable would be equally lucrative. So I figure there must be some other reason for doing it, like making sure the payouts are distributed evenly so that they don't have to pay 10 royals in a day or something. Or do they display what looks like a standard paytable for a game like 9-6 JoB? If so that would be very sneaky.

Or maybe what jstrike is saying about legal issues explains it.

(I'm not sure how your statement "while a 64 bit seed can only generate 2^64" is relevant here?)

Sorry badly phrased. A PRNG cannot generate more combinations that the number of bits in its internal state. And because it is deterministic and based on the seed value, something like mt_rand in php only has 2^32 possible combinations (or 2^64 on a 64 bit machine?) for example. So it can't possibly generate all the combinations of a shuffled deck. So from what I can tell the shuffling algorithm function _fy_shuffle(&$array) of jstrike's can't shuffle into the majority of deck combinations because of the limitation of the number of bits used in its seed.

This explains it better than I can:
You do not have permission to view link Log in or register now.


Let me be clear I am NOT trying to infer you guys are doing anything wrong or dodgy. I think its great that you are being so open and honest about how your systems work.

Also here is an interesting old article about a group of guys who worked out how to reproduce the PRNG at a poker site because the dopes who programmed it were just using a unix timestamp as their seed.
You do not have permission to view link Log in or register now.
 
zanzibar,

Re: "Sorry badly phrased." I now understand.

Hmm. The Twister has a documented internal state of 19937 bits, and a period of 2^19937 - 1, so no problems there.

I was aware of the issue that using a single 32-bit random integer to seed the Twister resulted in a smaller range of possible "starting points" for the Twister output right after the seeding.

However, 2^32 = 4,294,967,296, or over 4 billion permutations. We are thus left to question: yes, it is an issue, but is it a problem? (How many shuffle permutations are actually realized at a B&M Casino? I suspect a great deal less than the theoretical maximum of 2^225.)

The introduction of the init-by-array method, which still uses 32-bit integers but 624 of them, "solves the problem". (To be exact, on this one I do not have quantitative documentation, only the statements published by the Twister's developers when this method was introduced back in 2002, and also by others in the field. But based on this I have proceeded with confidence.)

All of this is highlighted in the following statement from the Wikipedia link you referenced:

Thus, a generator that has 1024 bits of internal state but which is initialized with a 32-bit seed can still only produce 2^32 different permutations right after initialization.

It goes on to state:

It can produce more permutations if one exercises the generator a great many times before starting to use it for generating permutations, but this is a very inefficient way of increasing randomness:

"... very inefficient ..."? Agreed. We run our RNG as a Windows Service executable and, for reasons, the maximum practical output is about 3 million numbers per second ~= 300 billion a day ~= 2^40. So yeah, very inefficient indeed if the objective is to get from 2^32 to 2^225.

All of the other issues raised in the article (Modulo Bias, off-by-one error, et. al) are critically important to know, but once known are easily dealt with.



I remember first reading about your second reference link a long time. (Wow, over 10 years now.) Yeah, their use of the Randomize function with a seed based on the system clock. That was a really big deal when it broke.

I have a vague memory of something similar arising, also a long time ago, from an online gambling application that was using the Windows Randomize statement/Rnd function, also seeding with the system clock. Another major dust up, both because of the seeding issue, but also because the Windows Rnd function is just a really bad RNG.



Because all Galewind provides are single-Player games (well, Player and Dealer), we took the easy way out - we don't shuffle the deck. Why bother? We just randomly pick from the stack. We played around a little bit with using Durstenfeld's version of the Fisher–Yates shuffle, but finally decided, screw it, just collapse the deck. Not as fast (in the microsecond world), but still an in-place shuffle, and an absolute no-brainer.

JStrike is in a different position. I believe that with all of his multi-player games he needs to "shuffle the deck". He also needs to shuffle the deck because he publishes the resulting shuffle.

I realize that your statement:

So from what I can tell the shuffling algorithm function _fy_shuffle(&$array) of jstrike's can't shuffle into the majority of deck combinations because of the limitation of the number of bits used in its seed.

is primarily focused on what JStrike previously published. The investigation I performed in creating this "data dump" may assist JStrike in formulating his response.

I believe that this issue can be summarized as:

Thus, a generator that has 19937 bits of internal state but which is initialized with a 32-bit seed can still only produce 2^32 different permutations right after initialization.

A valuable question - Is there an init_by_array equivalent in PHP's standard Twister libraries?

And just to put things in perspective: 2^32 = 4,294,967,296, or over 4 billion permutations. Thats a lotta permutations.

Chris
 
do they display what looks like a standard paytable for a game like 9-6 JoB? If so that would be very sneaky.


Yes, they (fraudulently) display a 9/6 pay table. Of course if you hit a full house you'll get what the machine displays on the pay table. Class 11 games are also used at assorted casinos with no horse racing. I only read of a few stand alone casinos that use them. (usually run by Indian reservations)

I'm only concerned about Vegas, and A.City, which are confirmed class 111 games, but I would suggest that people throughout the states check with the jurisdictions gaming commissions for confirmation.

Quote:

Therefore, even though players think they are playing a high return 9/6 Jacks-or-better machine, the pay schedules you see on VLT can not be used to determine the return on the machine.
 
However, 2^32 = 4,294,967,296, or over 4 billion permutations. We are thus left to question: yes, it is an issue, but is it a problem? (How many shuffle permutations are actually realized at a B&M Casino? I suspect a great deal less than the theoretical maximum of 2^225.)

Very good point! As I said, I'm not trying to create a problem here because I don't think one exists. Its more an interesting mathematical / theoretical / philosophical discussion. I know I am repeating myself but I want to make it really clear to anyone reading this that I am not trying to harm your businesses.

The main thing I really wanted to know was how far gambling software developers are going to create "randomness". I wondered if anyone was using some kind of funky hardware interface that measures atom collisions or something fantastically nerdy like that.


Because all Galewind provides are single-Player games (well, Player and Dealer), we took the easy way out - we don't shuffle the deck. Why bother? We just randomly pick from the stack. We played around a little bit with using Durstenfeld's version of the Fisher–Yates shuffle, but finally decided, screw it, just collapse the deck. Not as fast (in the microsecond world), but still an in-place shuffle, and an absolute no-brainer.

JStrike is in a different position. I believe that with all of his multi-player games he needs to "shuffle the deck". He also needs to shuffle the deck because he publishes the resulting shuffle.

Yes I agree if I was doing the same thing I wouldn't bother with a simulated shuffle, but I can understand why JStrike needs to do it.


A valuable question - Is there an init_by_array equivalent in PHP's standard Twister libraries?

Not to my knowledge. PHP's rand() and mt_rand() functions are often cited as being "weak" from a cryptographic security standpoint (eg generating random cryptographic tokens etc). But I don't know how that plays out and its significance to a game of chance.


And just to put things in perspective: 2^32 = 4,294,967,296, or over 4 billion permutations. Thats a lotta permutations.

Agreed, but it is still only a tiny fraction of a single % of 52! or 2^225, which is this:

80,658,175,170,943,878,571,660,636,856,403,766,975,289,505,440,883,277,824,000,000,000,000

!!! That just goes to show how many ways a deck can be shuffled. Its safe to say that in the history of people playing with cards, online or offline, we have not even come close to dealing all the possible combinations.

I found a good page with some comparisons here:
You do not have permission to view link Log in or register now.


My favourite is this:
Imagine you could shuffle the deck 1000 times per second. Everyone on Earth (all 6 billion people) has their own deck of cards, and they're all shuffling them too, 1000 times each second. Now imagine everyone continues to do this for the next 10 billion years.

In all those shuffles you wouldn't have rearranged the cards even a fraction of the total number of possible ways!


Yes, they (fraudulently) display a 9/6 pay table. Of course if you hit a full house you'll get what the machine displays on the pay table. Class 11 games are also used at assorted casinos with no horse racing. I only read of a few stand alone casinos that use them. (usually run by Indian reservations)

Oh that is incredibly cheesy and I think that explains a whole lot more clearly the WHY. If people don't even know they are playing a game like that then I can see the attraction to the operator.
 

Users who are viewing this thread

Accredited Casinos

Read about our rating system and how it's done.
Back
Top