hwccdealer
hwccdealer
  • Threads: 11
  • Posts: 365
Joined: Jun 4, 2013
November 5th, 2013 at 7:36:37 PM permalink
As my name indicates, I deal casino games, but I have an interest in developing them as well. I have an idea for a game that's somewhere between Hold 'Em, Mississippi Stud, and Blackjack and involves a double community.

Here's where I reach a standstill - I figured up how I would do the game, and out of a 52-card deck, there are over 421 billion possible hands between the two communities.

I should back up and explain the idea - it's not entirely ironed out, but it boils down to this:
-The "community" gets six cards split into two groups, which I'll call Alpha and Bravo. So Alpha gets three cards and Bravo gets three cards, and never the twain shall meet. Each player gets two cards dealt the same way as the dealer's cards in Blackjack - one card face-up and one card in the hole, which the player can't look at. I then turn up the first card in Alpha and the first card in Bravo.
-Players place an Ante bet and then, once the cards are dealt and the first cards in Alpha and Bravo are turned up, they may bet heavy on Alpha or Bravo - not both. (So if their up-card is, say, an Ace, and Alpha has an Ace while Bravo has a 7, they can bet heavy on Alpha. I haven't run how much I would allow as a max bet, probably anywhere from 3-5x the Ante.) Or, if they're not yet confident, they can check.
-After the first round of betting, I turn up the second card in each community, at which point, players may bet a lower amount on either Alpha or Bravo or they may fold.
-Then I turn up the last card in the communities, and players then have a chance to place a "last chance" bet equal to, or less than, their Alpha or Bravo bet.
-After this, I flip over the hole cards and fill in the hands.
--If the hand they bet on is better than what they could have had by betting on the other community, they win according to a pay table (which probably pushes up to about a pair of 10s or so and loses below about a pair of 6s or 7s.)
--If the other hand is better, they lose.

Sample hand: Clark, Bruce, Peter, and David are all sitting down to play my game. Each bets 1 unit on the Ante.
Up-cards appear as follows:
-Clark gets the Jack of Diamonds
-Bruce gets the King of Spades
-Peter gets the 4 of Hearts
-David gets the 7 of Clubs
Board cards start off as follows:
-Alpha: Jack of Clubs
-Bravo: Queen of Spades
So at this point, Clark bets max on Alpha, Bruce bets max on Bravo, and Peter and David check.
Board continues:
-Alpha: 7 of Hearts
-Bravo: 10 of Spades
David then bets on Alpha and Peter folds.
Board finishes:
-Alpha appears as follows: Jc, 7h, 2h
-Bravo appears as follows: Qs, 10s, 4s
Clark and David make Last Chance bets. Bruce does not.
-Clark's hole card: 2 of diamonds
--Result: Two pair, Jacks and Deuces defeats Queen high; Clark gets paid
-Bruce's hole card: 7 of spades
--Result: Spades Flush defeats Queen High; Bruce gets paid
-David's hole card: 10 of hearts
--Result: Pair of 7s loses to pair of 10s; David loses

The point of all this is simple - I am looking for a way to figure up the 421-billion-plus results without driving myself crazy, and I don't know how to write computer code to do it. Do such programs exist, or am I stuck doing it all in Excel or something?
tringlomane
tringlomane
  • Threads: 8
  • Posts: 6281
Joined: Aug 25, 2012
November 5th, 2013 at 11:54:50 PM permalink
I would be learning how to code it on a computer personally.

And teliot would rip you a new one for offering a game like this. Multiple hole cards that the players can't look at? You have to keep them very close to the dealer at the minimum.
hwccdealer
hwccdealer
  • Threads: 11
  • Posts: 365
Joined: Jun 4, 2013
November 6th, 2013 at 7:28:36 AM permalink
Quote: tringlomane

I would be learning how to code it on a computer personally.

And teliot would rip you a new one for offering a game like this. Multiple hole cards that the players can't look at? You have to keep them very close to the dealer at the minimum.



A game like this would probably have to be under blackjack "don't touch the cards" rules. And this is one of a few different concepts I have; I used it as a sample for just how many possible hands there are.

Which means I may have to learn how to write code. Greeeeeeeat.
Paradigm
Paradigm
  • Threads: 42
  • Posts: 2226
Joined: Feb 24, 2011
November 6th, 2013 at 11:44:24 AM permalink
Can you avoid the "don't look at the hole card" issue by dealing out the hole card after the community cards are revealed....like the third hole card is dealt in 7 Card Stud, at the end of the hand after all the up cards (or in this game the two sets of community cards) are dealt. It wouldn't change the math as it still is an unknown card, just dealt at a different time in the hand.....right?
Buzzard
Buzzard
  • Threads: 90
  • Posts: 6814
Joined: Oct 28, 2012
November 6th, 2013 at 12:54:41 PM permalink
" If the hand they bet on is better than what they could have had by betting on the other community, they win according to a pay table (which probably pushes up to about a pair of 10s or so and loses below about a pair of 6s or 7s."

You do realize half the time the 5 card hand will not have a pair at all ?
Shed not for her the bitter tear Nor give the heart to vain regret Tis but the casket that lies here, The gem that filled it Sparkles yet
hwccdealer
hwccdealer
  • Threads: 11
  • Posts: 365
Joined: Jun 4, 2013
November 6th, 2013 at 3:33:29 PM permalink
Quote: Paradigm

Can you avoid the "don't look at the hole card" issue by dealing out the hole card after the community cards are revealed....like the third hole card is dealt in 7 Card Stud, at the end of the hand after all the up cards (or in this game the two sets of community cards) are dealt. It wouldn't change the math as it still is an unknown card, just dealt at a different time in the hand.....right?



In my casino, all cards in carnival games are dealt right at the beginning of the hand. There are probably other ways to deal with the "hole card" problem; this was just an example. What I want to avoid is having the 5th card as part of one of the two communities - the idea is to have the player get one card, the community to get cards 2, 3, and 4, and the last card to be separate from the communities. There are a lot of different ways to handle this. If they hand-shuffle like I saw a lot in Vegas, dealing out the 5th card at the end would work; if we do it like at my casino, it's a bit trickier.

These are fine details I would work out once I'm comfortable with the math.
hwccdealer
hwccdealer
  • Threads: 11
  • Posts: 365
Joined: Jun 4, 2013
November 6th, 2013 at 3:36:38 PM permalink
Quote: Buzzard

You do realize half the time the 5 card hand will not have a pair at all ?



If my math is correct, a little more than half, and yes, I am aware. That's also true in Let It Ride and Mississippi Stud.

I'm also aware that, if players get to pick which community they go with, they will win well over half the hands they actually play, and I don't want a player advantage.

And once I work out the math for something like this, I will be more comfortable giving exact cutoff points for wins, pushes, big wins, etc. The example I gave was very rough on purpose.
ThatDonGuy
ThatDonGuy
  • Threads: 117
  • Posts: 6218
Joined: Jun 22, 2011
November 6th, 2013 at 6:13:30 PM permalink
Quote: hwccdealer

And once I work out the math for something like this, I will be more comfortable giving exact cutoff points for wins, pushes, big wins, etc. The example I gave was very rough on purpose.


Exactly what "math" are you trying to work out?

If you are trying to calculate a basic strategy, you need to have all of the payouts in place first.

In any case, I would write a computer program to work out all of the possibilities (then again, my degree is in computer science, not mathematics (although I almost did get one in applied math) or statistics). It's not that hard to learn, and if you have a Windows computer, you can get a Visual Basic or Visual C# compiler from Microsoft for free (they're called Visual Basic Express and Visual C# Express).
hwccdealer
hwccdealer
  • Threads: 11
  • Posts: 365
Joined: Jun 4, 2013
November 7th, 2013 at 12:31:23 PM permalink
Quote: ThatDonGuy

Exactly what "math" are you trying to work out?

If you are trying to calculate a basic strategy, you need to have all of the payouts in place first.

In any case, I would write a computer program to work out all of the possibilities (then again, my degree is in computer science, not mathematics (although I almost did get one in applied math) or statistics). It's not that hard to learn, and if you have a Windows computer, you can get a Visual Basic or Visual C# compiler from Microsoft for free (they're called Visual Basic Express and Visual C# Express).



The first piece of math I would need is this - what's the probability of a tie? Once I have that worked out, wins and losses are identical.

I can do a simple 5-card Mississippi Stud game with no difficulty even by hand; for one thing, a lot of it is already online, and for another, I'm dealing with just shy of 2.6 million possible hands instead of 421+ billion. I could do it all by hand if I had to, but I'm looking for something that will speed things up because I'm very busy and developing casino games is more of a hobby until I can get through law school and have a little time and money to develop them.

Once things settle down in my life a little bit, I can probably look into one of those programs, although I have almost no programming experience and the one programming class I took in college was for the sole purpose of shutting my father up.
tringlomane
tringlomane
  • Threads: 8
  • Posts: 6281
Joined: Aug 25, 2012
November 7th, 2013 at 12:55:03 PM permalink
Quote: hwccdealer

The first piece of math I would need is this - what's the probability of a tie? Once I have that worked out, wins and losses are identical.



I thought you picked which board you wanted after you saw one card on each board? This will not make win/loss equal.
Stoney
Stoney
  • Threads: 2
  • Posts: 30
Joined: Sep 22, 2012
November 7th, 2013 at 1:26:24 PM permalink
I would think there would only be a tie if both communities were exactly the same (but no flushes). for instance, my cards were J-3. on one side, I would have a hand A-J-10-7-3, and the other is A-J-9-7-3.... this is not a tie. yes, they are both ace high hands, but just like in hold em', the 10 kicker wins. so, ties would rare enough that you might consider that as a side bet.


edit: think I made a mistake. 7 players, none tie the board, for set 1=set 2 should be (9/35)*(6/34)*(3/33)... I think. so that'd be 4.125%.... maybe. and this would be the best chance at a tie. if 1 player pairs the board, the chances drop.
ThatDonGuy
ThatDonGuy
  • Threads: 117
  • Posts: 6218
Joined: Jun 22, 2011
November 7th, 2013 at 6:38:13 PM permalink
Quote: hwccdealer

The first piece of math I would need is this - what's the probability of a tie? Once I have that worked out, wins and losses are identical.


Here's what I get for a tie:

With a 52 card deck:

There are 52 x 51 x 50 / 6 = 22,100 "Alpha" hands
For each Alpha hand, there are 49 x 48 x 47 / 6 = 18,424 "Bravo" hands

Of the 22,100 Alpha hands:

13 (ranks) x 4 (groups of 3 out of 4) = 52 are three-of-a-kind, which cannot be tied (as otherwise there would have to be, for example, six Aces in the deck).

13 (ranks) x 6 (groups of 2 out of 4) x 48 = 3744 are pairs; in order to tie, two of the Bravo cards must be the only other two of the paired Alpha rank (i.e. if the Alpha is the Ace of spades, Ace of clubs, and 3 of hearts, then the Bravo hand must have the Ace of diamonds and the Ace of hearts), and the third card must be one of the other 3 cards of the singleton (in this case, either the 3 of spades, 3 of clubs, or 3 of diamonds), so there are 3 tying Bravo hands for each Alpha.

52 x 48 x 44 / 6 = 18,304 are three different cards; each one has 3 different cards that match the high card, 3 that match the middle card, and 3 that match the low card, or 3 x 3 x 3 = 27 tying Bravo hands for each Alpha.

(Check: 52 triples + 3744 pairs + 18,304 mixed = 22,100 Alpha hands)

The probability of a tie is the sum of:
52 / 22,100 x 0 = 0
3744 / 22100 x 3 / 18424 = 11232 / 407170400
18304 / 22100 x 27 / 18424 = 494208 / 407170400
which is 505440 / 407170400 = 243 / 195755, or about 1 / 806.
socks
socks
  • Threads: 15
  • Posts: 364
Joined: Jul 13, 2011
November 10th, 2013 at 3:07:45 PM permalink
Quote: hwccdealer

The point of all this is simple - I am looking for a way to figure up the 421-billion-plus results without driving myself crazy, and I don't know how to write computer code to do it. Do such programs exist, or am I stuck doing it all in Excel or something?



Off the top of my head, 421B doesn't sound crazy for a program. I've been working on a program for a while to try and make this sort of this easier for non-programmer/mathematicians, but it's still a ways off, if it ever gets done.

If you decide to start from scratch, you'll probably want a good hand evaluator. See http://www.codingthewheel.com/archives/poker-hand-evaluator-roundup/#timmy_pokersim

I'm not the most experienced at game analysis, but when I think about a problem like this, I think about it in terms of information and decisions to be made at each step. From the player's perspective, s/he knows 3 cards and has 3 decisions. 52*51*50*3 possibilities(alpha bravo check). Then you have 49*48*3 turn possibilities(alpha bravo fold). Then you have 47*2 river possibilities (but only for 1/3 of the turn choices since folding doesn't get you here?) (bet check). Then there are 46 hole cards. If you can bet a range on the turn, then I thin there's 5 meaningful choices, min/max for A/B, and fold.

Being a programmer (not a mathematician), I tend to think about about things in terms of processes, not statistics, and I may be thinking about something wrong here, but this looks like trillions of results? Though from there, I think, if you keep the boards sorted, and exploit suit symmetries, you should be able to prune away much of the tree, but the code gets trickier. It may be clearer if you explain where 421B came from.
socks
socks
  • Threads: 15
  • Posts: 364
Joined: Jul 13, 2011
November 10th, 2013 at 3:22:31 PM permalink
Quote: hwccdealer

I can do a simple 5-card Mississippi Stud game with no difficulty even by hand; for one thing, a lot of it is already online, and for another, I'm dealing with just shy of 2.6 million possible hands instead of 421+ billion.



Also, the Wizard's Mississippi Stud analysis counts 156M combinations. https://wizardofodds.com/games/mississippi-stud/
tringlomane
tringlomane
  • Threads: 8
  • Posts: 6281
Joined: Aug 25, 2012
November 10th, 2013 at 4:03:02 PM permalink
Quote: socks

Also, the Wizard's Mississippi Stud analysis counts 156M combinations. https://wizardofodds.com/games/mississippi-stud/



Yeah, every decision point must be considered to analyze the game. It makes poker games a pain to analyze.
hwccdealer
hwccdealer
  • Threads: 11
  • Posts: 365
Joined: Jun 4, 2013
November 11th, 2013 at 3:42:17 AM permalink
Quote: tringlomane

I thought you picked which board you wanted after you saw one card on each board? This will not make win/loss equal.



I refer to the probability before a single card is turned up. Once more information is revealed, it changes everything, but I start off going totally blind. So when I make that statement, I treat the situation as if all cards are face-down, and at that point, the probability of a win or a loss is equal if played blind.

That, of course, changes once the first cards are turned up. If you have a 10 in your hand and Alpha turns up another 10 while Bravo turns up a 4, of course Alpha has a higher win probability. But if all cards are face-down, you don't know that.

So let me rephrase: If all cards are face-down, what is the probability of a tie? It sounds like some folks here have figured that up, and yes, some hand types make a tie impossible (any flush, any quads, and the probability of a tied full house is pretty slim.)
hwccdealer
hwccdealer
  • Threads: 11
  • Posts: 365
Joined: Jun 4, 2013
November 11th, 2013 at 3:47:33 AM permalink
Quote: socks

Also, the Wizard's Mississippi Stud analysis counts 156M combinations. https://wizardofodds.com/games/mississippi-stud/



This is why I double-check as much as my sleep-deprived brain can, and why I wanted to run things past people - when I figured up 421 billion possibilities, I didn't think of the order of the cards as being all that important within the communities, but now that I think of it, it absolutely changes everything, and 421 billion is actually too small. It's actually more like 30.3 trillion, given that, in the game I described, every card's position matters.
hwccdealer
hwccdealer
  • Threads: 11
  • Posts: 365
Joined: Jun 4, 2013
November 11th, 2013 at 2:21:47 PM permalink
Quote: socks

It may be clearer if you explain where 421B came from.



The 421 billion figure is actually erroneous, based on the following equation: (52!3!3!2!)/(44!8!) The idea was that the order of the cards within the two communities or the hand don't matter, which, for figuring up hands completely blindly, it doesn't, but for forming a solid basic strategy, it does.
socks
socks
  • Threads: 15
  • Posts: 364
Joined: Jul 13, 2011
November 12th, 2013 at 8:48:17 AM permalink
Quote: hwccdealer

The 421 billion figure is actually erroneous, based on the following equation: (52!3!3!2!)/(44!8!) The idea was that the order of the cards within the two communities or the hand don't matter, which, for figuring up hands completely blindly, it doesn't, but for forming a solid basic strategy, it does.



Does it? I mean, when counting combinations, maybe you include count them all, but when performing calculations, I 'm not sure it does.

Player: 5c, Alpha: 7d 9h, Bravo Tc 3h (bet max - alpha, 1st street)

will produce the same subtree going forward as

Player: 5c, Alpha: 7d 9h, Bravo 3h Tc (bet max - alpha, 1st street)

Right? the 47*2*46 (or so) calculations for river/hand2 can be done once and cached I think

For that matter, I believe

Player: 5d, Alpha: 7c 9s, Bravo Td 3s (bet max - alpha, 1st street)

also produces the same solution.
tringlomane
tringlomane
  • Threads: 8
  • Posts: 6281
Joined: Aug 25, 2012
November 12th, 2013 at 10:04:34 AM permalink
Quote: socks

Does it? I mean, when counting combinations, maybe you include count them all, but when performing calculations, I 'm not sure it does.

Player: 5c, Alpha: 7d 9h, Bravo Tc 3h (bet max - alpha, 1st street)

will produce the same subtree going forward as

Player: 5c, Alpha: 7d 9h, Bravo 3h Tc (bet max - alpha, 1st street)

Right? the 47*2*46 (or so) calculations for river/hand2 can be done once and cached I think

For that matter, I believe

Player: 5d, Alpha: 7c 9s, Bravo Td 3s (bet max - alpha, 1st street)

also produces the same solution.



As long as you account and weight the repetitive combinations correctly, yes, this is how you can speed up the calculation. This idea is partly how basic video poker games can be calculated in just seconds now.
teliot
teliot
  • Threads: 43
  • Posts: 2871
Joined: Oct 19, 2009
November 12th, 2013 at 11:35:46 AM permalink
Quote: socks

Off the top of my head, 421B doesn't sound crazy for a program.

Baccarat is 4998398275503360. My program takes less than 2 seconds to iterate through all the hands. There are tricks. Poker-style games tend to take longer, but anything under 1T is no problem.
Climate Casino: https://climatecasino.net/climate-casino/
hwccdealer
hwccdealer
  • Threads: 11
  • Posts: 365
Joined: Jun 4, 2013
November 12th, 2013 at 3:22:59 PM permalink
Quote: socks

Does it? I mean, when counting combinations, maybe you include count them all, but when performing calculations, I 'm not sure it does.

Player: 5c, Alpha: 7d 9h, Bravo Tc 3h (bet max - alpha, 1st street)

will produce the same subtree going forward as

Player: 5c, Alpha: 7d 9h, Bravo 3h Tc (bet max - alpha, 1st street)

Right? the 47*2*46 (or so) calculations for river/hand2 can be done once and cached I think

For that matter, I believe

Player: 5d, Alpha: 7c 9s, Bravo Td 3s (bet max - alpha, 1st street)

also produces the same solution.



For some combos, it does matter, and for some, it doesn't.

Player: 10d, Alpha: 7d 5h, Bravo: 10s 4c (bet max on Bravo after 1st street)

AND

Player: 4c, Alpha: 7d 5h, Bravo: 10s 10d (bet max on Bravo after 2nd street)

produce different outcomes.

It could all be done if I took the time to write code, but that's a problem for another day for me.
hwccdealer
hwccdealer
  • Threads: 11
  • Posts: 365
Joined: Jun 4, 2013
November 12th, 2013 at 3:24:23 PM permalink
Quote: teliot

Baccarat is 4998398275503360. My program takes less than 2 seconds to iterate through all the hands. There are tricks. Poker-style games tend to take longer, but anything under 1T is no problem.



If a program can do almost 5 quadrillion hands of anywhere from 4-6 cards in two seconds, 30.3 trillion hands of 8 cards should be pretty comparable.
  • Jump to: