chad612
chad612
  • Threads: 1
  • Posts: 2
Joined: Jul 1, 2011
July 1st, 2011 at 7:49:02 AM permalink
I am trying to calculate the true odds of a new game somewhat similar to video poker. Is there a formula or some software that can do this?
I have looked at all the video poker tables and cant figure out how they came to those conclusions. Please help
This is a new game that isn't in casinos. I guess my question is....How do you figure true odds in a 52 deck video card game that you get a set amount
of cards originally and then have a chance to improve on your hand (like video poker) but you dont get the same amount of cards and the card value's are different than video poker.
miplet
miplet
  • Threads: 5
  • Posts: 2142
Joined: Dec 1, 2009
July 1st, 2011 at 7:58:10 AM permalink
Is this a game in a casino already? If it is, describe how it's played.
“Man Babes” #AxelFabulous
DJTeddyBear
DJTeddyBear
  • Threads: 210
  • Posts: 11060
Joined: Nov 2, 2009
July 1st, 2011 at 7:58:20 AM permalink
The more complex the game is, the harder it is to fit it into a formula.

Sometimes, it's easier to write a program that cycles thru every possible outcome, and evaluates each one, tallying the results. This is particularly true in a game that has wild cards.
I invented a few casino games. Info: http://www.DaveMillerGaming.com/ ————————————————————————————————————— Superstitions are silly, childish, irrational rituals, born out of fear of the unknown. But how much does it cost to knock on wood? 😁
pacomartin
pacomartin
  • Threads: 649
  • Posts: 7895
Joined: Jan 14, 2010
July 1st, 2011 at 9:02:20 AM permalink
Quote: DJTeddyBear

Sometimes, it's easier to write a program that cycles thru every possible outcome, and evaluates each one, tallying the results. This is particularly true in a game that has wild cards.



Essentially, all odds for all games are calculated by cycling through every possible outcome and evaluating the results. However, the simplest games can be condensed to formulas.

As an experiment, I have written spreadsheets that give me some of the probabilities in the Wizard's Appendix 9 of his Blackjack probabilities. Try some of the simplest cases which still involve hundreds of possible outcomes. The spreadsheet will help you write the computer program.
s2dbaker
s2dbaker
  • Threads: 51
  • Posts: 3259
Joined: Jun 10, 2010
July 1st, 2011 at 9:25:59 AM permalink
Quote: chad612

I am trying to calculate the true odds of a new game somewhat similar to video poker. Is there a formula or some software that can do this?
I have looked at all the video poker tables and cant figure out how they came to those conclusions. Please help

similar to video poker... video bridge? We will require more information. There are lots of derivatives of video poker out there and the Wizard has covered the strategies for untold numbers of them. If you are looking for a calculator or a spreadsheet formula, you may be on your own. I've developed software in SQL that will evaluate hands but I have to modify it each time I add a wild card or some other twist. I have also stored a base table of all 5 card combinations from a 52 card deck and each of those combination's poker result. It matches other posted outcomes so i'm certain of its validity. I use it now, instead of calculating each hand on the fly. It's slightly fasway that way.
Someday, joor goin' to see the name of Googie Gomez in lights and joor goin' to say to joorself, "Was that her?" and then joor goin' to answer to joorself, "That was her!" But you know somethin' mister? I was always her yuss nobody knows it! - Googie Gomez
chad612
chad612
  • Threads: 1
  • Posts: 2
Joined: Jul 1, 2011
July 1st, 2011 at 3:30:28 PM permalink
This is a new game that isn't in casinos. I guess my question is....How do you figure true odds in a 52 deck video card game that you get a set amount
of cards originally and then have a chance to improve on your hand (like video poker) but you dont get the same amount of cards and the card value's are different than video poker.
CrystalMath
CrystalMath
  • Threads: 8
  • Posts: 1911
Joined: May 10, 2011
July 1st, 2011 at 3:34:37 PM permalink
Quote: chad612

This is a new game that isn't in casinos. I guess my question is....How do you figure true odds in a 52 deck video card game that you get a set amount
of cards originally and then have a chance to improve on your hand (like video poker) but you dont get the same amount of cards and the card value's are different than video poker.



Easy, hire a mathematician.
I heart Crystal Math.
MathExtremist
MathExtremist
  • Threads: 88
  • Posts: 6526
Joined: Aug 31, 2010
July 1st, 2011 at 3:47:11 PM permalink
Quote: chad612

This is a new game that isn't in casinos. I guess my question is....How do you figure true odds in a 52 deck video card game that you get a set amount
of cards originally and then have a chance to improve on your hand (like video poker) but you dont get the same amount of cards and the card value's are different than video poker.


Unless "chance to improve on your hand" means something other than a single deal/draw, you can just take a VP analyzer, rip out the existing paytable and hand evaluator, and put in new ones. It'll be a good software project.
"In my own case, when it seemed to me after a long illness that death was close at hand, I found no little solace in playing constantly at dice." -- Girolamo Cardano, 1563
s2dbaker
s2dbaker
  • Threads: 51
  • Posts: 3259
Joined: Jun 10, 2010
July 1st, 2011 at 4:38:12 PM permalink
Quote: MathExtremist

Unless "chance to improve on your hand" means something other than a single deal/draw, you can just take a VP analyzer, rip out the existing paytable and hand evaluator, and put in new ones. It'll be a good software project.

Meh, I just program my own from scratch.
Someday, joor goin' to see the name of Googie Gomez in lights and joor goin' to say to joorself, "Was that her?" and then joor goin' to answer to joorself, "That was her!" But you know somethin' mister? I was always her yuss nobody knows it! - Googie Gomez
MathExtremist
MathExtremist
  • Threads: 88
  • Posts: 6526
Joined: Aug 31, 2010
July 1st, 2011 at 4:56:12 PM permalink
Quote: s2dbaker

Meh, I just program my own from scratch.


When you already have abstractions for cards, decks, shuffling and dealing, there's no point in rewriting them. It sounds like the differences here are that hands aren't based on poker rankings, so you'd need a different hand evaluator. Okay, that's not too hard. Then either brute-force it or use some of the coding tricks to trim the search tree. Of course, I may not be understanding the rules properly.
"In my own case, when it seemed to me after a long illness that death was close at hand, I found no little solace in playing constantly at dice." -- Girolamo Cardano, 1563
ThatDonGuy
ThatDonGuy
  • Threads: 122
  • Posts: 6678
Joined: Jun 22, 2011
July 5th, 2011 at 7:21:48 AM permalink
The problem with calculating the "true odds" of a game like Video Poker is, you have to know what strategy you are using. There are 2,598,960 different ways to deal five cards (if the order is not important, which, unless there's something like a jackpot for getting, say, a royal flush in A-K-Q-J-10 order, it isn't), and for each one, there is a "best" set of cards to hold. You can't really go through each of the 32 possible ways of holding cards for each of the 2,598,960 deals (since, for example, for each of the 10 ways to hold onto two of the cards and draw the other three, there are 16,215 ways to draw three new cards from the remaining 47 in the deck).

The way I calculate strategy (and the resulting odds) in VP is, I take about 100 different hands (examples: (a) three of a kind (discard the other two cards); (b) three to a flush with two of the cards Jack or higher (again, discard the other two); (c) an Ace with the other cards 10 or lower, and no three cards the same suit (discard the four non-Ace cards)), go through all of the possible draws for each hand, and determine which ones have the best average paybacks. This does have some flaws in it - most noticeably, it does not take into account "penalty cards" (for example, in (b), what if one of the two non-suited cards makes a pair with one of the suited cards?).

As for calculating the odds, there are some games where it's just not feasible to go through every possible play, so what is done is, millions of games are played (I believe this is usually called a "Monte Carlo simulation") to see what results come up.
s2dbaker
s2dbaker
  • Threads: 51
  • Posts: 3259
Joined: Jun 10, 2010
July 5th, 2011 at 7:48:50 AM permalink
I started analyzing Monte Carlo simulations vs. Brute Force and was a little discouraged. In another thread, someone suggested that you could get a rough estimate of Pi by throwing darts at a dartboard. So I simulated that. It took ten-million darts just to "nail down" pardon the pun, 3.142 with any consistency. My method was store random x,y coordinates into a table where x and y can each have a value from 0 to 1. Then count the number of y positions that fall under the cosine of x as a fraction of the total number of "darts" thrown and then multiply by 4. It takes a whole lotta darts to make a pie.
Someday, joor goin' to see the name of Googie Gomez in lights and joor goin' to say to joorself, "Was that her?" and then joor goin' to answer to joorself, "That was her!" But you know somethin' mister? I was always her yuss nobody knows it! - Googie Gomez
s2dbaker
s2dbaker
  • Threads: 51
  • Posts: 3259
Joined: Jun 10, 2010
July 5th, 2011 at 7:51:36 AM permalink
The second part of that experiment was to evenly distribute the darts across and down and then take the same ratio. The even distribution was much more accurate.
Someday, joor goin' to see the name of Googie Gomez in lights and joor goin' to say to joorself, "Was that her?" and then joor goin' to answer to joorself, "That was her!" But you know somethin' mister? I was always her yuss nobody knows it! - Googie Gomez
CrystalMath
CrystalMath
  • Threads: 8
  • Posts: 1911
Joined: May 10, 2011
July 5th, 2011 at 7:57:43 AM permalink
I only do poker games Brute Force. That is, go through all 2,598,960 possible ways to deal the first 5 cards and determine which of the 32 ways to hold/discard is the best by calculating every possible hand that these can draw to. This explanation is overly simplistic, but that is essentially what is done.
I heart Crystal Math.
s2dbaker
s2dbaker
  • Threads: 51
  • Posts: 3259
Joined: Jun 10, 2010
July 5th, 2011 at 8:02:50 AM permalink
Quote: CrystalMath

I only do poker games Brute Force. That is, go through all 2,598,960 possible ways to deal the first 5 cards and determine which of the 32 ways to hold/discard is the best by calculating every possible hand that these can draw to. This explanation is overly simplistic, but that is essentially what is done.

for five cards, I have a table for that, but it's currently set up for my Cameltoe Poker game.
Someday, joor goin' to see the name of Googie Gomez in lights and joor goin' to say to joorself, "Was that her?" and then joor goin' to answer to joorself, "That was her!" But you know somethin' mister? I was always her yuss nobody knows it! - Googie Gomez
ThatDonGuy
ThatDonGuy
  • Threads: 122
  • Posts: 6678
Joined: Jun 22, 2011
July 5th, 2011 at 8:40:55 AM permalink
Quote: CrystalMath

I only do poker games Brute Force. That is, go through all 2,598,960 possible ways to deal the first 5 cards and determine which of the 32 ways to hold/discard is the best by calculating every possible hand that these can draw to. This explanation is overly simplistic, but that is essentially what is done.


The problem with this method is, for each of the 2,598,960 deals, there are 2,598,960 different ways to draw 0-5 cards, or a total of 6,754,593,081,600 deals you have to check. Okay, if you ignore the suit of the first card, that reduces the number by 75%, and if you can manage 10 million deals per second (which is pushing it with a single computer), you will have a result in about two days, but "determining the true odds" and "converting the strategy into something practical the player can use when sitting in front of a machine" are two different things.
CrystalMath
CrystalMath
  • Threads: 8
  • Posts: 1911
Joined: May 10, 2011
July 5th, 2011 at 9:21:58 AM permalink
Quote: ThatDonGuy

The problem with this method is, for each of the 2,598,960 deals, there are 2,598,960 different ways to draw 0-5 cards, or a total of 6,754,593,081,600 deals you have to check. Okay, if you ignore the suit of the first card, that reduces the number by 75%, and if you can manage 10 million deals per second (which is pushing it with a single computer), you will have a result in about two days, but "determining the true odds" and "converting the strategy into something practical the player can use when sitting in front of a machine" are two different things.



Without delving into my methods, once a game is programmed, it takes about 30 seconds to calculate the return using 100% optimal strategy. You are correct, however, that it isn't so easy to convert the strategy into something useful to a player. In my program, I've also built in the ability to output every hand, the hold strategy, and the expected return for that hand. From there, I only look at hands with unique expected returns.
I heart Crystal Math.
buzzpaff
buzzpaff
  • Threads: 112
  • Posts: 5328
Joined: Mar 8, 2011
July 5th, 2011 at 9:47:15 AM permalink
Just took me 15 minutes with pen and paper to just figure out the 32 ways to hold/discard.

Not told unexpected as Abbott and Costello almost had me convinced that 7 X 13 = 28 LOL
MangoJ
MangoJ
  • Threads: 10
  • Posts: 905
Joined: Mar 12, 2011
July 5th, 2011 at 10:33:49 AM permalink
Quote: s2dbaker

I started analyzing Monte Carlo simulations vs. Brute Force and was a little discouraged. In another thread, someone suggested that you could get a rough estimate of Pi by throwing darts at a dartboard. So I simulated that. It took ten-million darts just to "nail down" pardon the pun, 3.142 with any consistency. My method was store random x,y coordinates into a table where x and y can each have a value from 0 to 1. Then count the number of y positions that fall under the cosine of x as a fraction of the total number of "darts" thrown and then multiply by 4. It takes a whole lotta darts to make a pie.



The test of y < cos(x) does not give you anything near pi/4. You would want to test for y < sqrt(1 - x^2), or A LOT faster x^2 + y^2 < 1.
buzzpaff
buzzpaff
  • Threads: 112
  • Posts: 5328
Joined: Mar 8, 2011
July 5th, 2011 at 10:35:28 AM permalink
If we were at a poker table, I would remind you " speak English only"
s2dbaker
s2dbaker
  • Threads: 51
  • Posts: 3259
Joined: Jun 10, 2010
July 5th, 2011 at 10:44:45 AM permalink
Quote: MangoJ

The test of y < cos(x) does not give you anything near pi/4. You would want to test for y < sqrt(1 - x^2), or A LOT faster x^2 + y^2 < 1.

stoopid hypotenuse!
Someday, joor goin' to see the name of Googie Gomez in lights and joor goin' to say to joorself, "Was that her?" and then joor goin' to answer to joorself, "That was her!" But you know somethin' mister? I was always her yuss nobody knows it! - Googie Gomez
ThatDonGuy
ThatDonGuy
  • Threads: 122
  • Posts: 6678
Joined: Jun 22, 2011
July 6th, 2011 at 3:05:19 PM permalink
Quote: ThatDonGuy

The problem with this method is, for each of the 2,598,960 deals, there are 2,598,960 different ways to draw 0-5 cards, or a total of 6,754,593,081,600 deals you have to check.


Actually, you don't have to check 2,598,960 deals (or even 1/4 of those) - if I crunched this right, there are only about 150,000 "distinct" five-card deals (for example, As Ah Ac 2s 2d is not distinct from Ac Ah Ad 2c 2s; both are aces over 2s full houses, with one card in the pair having the same suit as one card in the three of a kind but the other is not). Still, if you have to check the 2.6 million ways to draw to each of these, that's about 390 billion possibilities.
ThatDonGuy
ThatDonGuy
  • Threads: 122
  • Posts: 6678
Joined: Jun 22, 2011
July 8th, 2011 at 8:09:41 AM permalink
Quote: ThatDonGuy

Still, if you have to check the 2.6 million ways to draw to each of these, that's about 390 billion possibilities.


So, of course, you don't - you do something like "pre-count" the number of possible Royals, Straight Flushes, 4-of-a-Kinds, etc. for any particular 4 cards (i.e. for any 4 cards, how many of the 48 possible "fifth cards" result in a Royal, how many in a SF, and so on), so, for each 5-card hand, rather than looping through all 5 x 47 results of holding four cards, you simply get the pre-counted results for each of the five 4-card sets (and then remember to subtract the result of the original 5-card hand, since the 4-card results include the one that includes the card you discarded); repeat for the 10 3-card sets, the 10 2-card sets, the 5 1-card sets, and the one "draw five cards" set.
CrystalMath
CrystalMath
  • Threads: 8
  • Posts: 1911
Joined: May 10, 2011
July 8th, 2011 at 9:47:53 AM permalink
Quote: ThatDonGuy

So, of course, you don't - you do something like "pre-count" the number of possible Royals, Straight Flushes, 4-of-a-Kinds, etc. for any particular 4 cards (i.e. for any 4 cards, how many of the 48 possible "fifth cards" result in a Royal, how many in a SF, and so on), so, for each 5-card hand, rather than looping through all 5 x 47 results of holding four cards, you simply get the pre-counted results for each of the five 4-card sets (and then remember to subtract the result of the original 5-card hand, since the 4-card results include the one that includes the card you discarded); repeat for the 10 3-card sets, the 10 2-card sets, the 5 1-card sets, and the one "draw five cards" set.



Exactly
I heart Crystal Math.
s2dbaker
s2dbaker
  • Threads: 51
  • Posts: 3259
Joined: Jun 10, 2010
July 8th, 2011 at 9:52:47 AM permalink
Quote: ThatDonGuy

Actually, you don't have to check 2,598,960 deals (or even 1/4 of those) - if I crunched this right, there are only about 150,000 "distinct" five-card deals (for example, As Ah Ac 2s 2d is not distinct from Ac Ah Ad 2c 2s; both are aces over 2s full houses, with one card in the pair having the same suit as one card in the three of a kind but the other is not). Still, if you have to check the 2.6 million ways to draw to each of these, that's about 390 billion possibilities.

4600+ discernable hand strengths. Even less with 7 cards. But you still have to know how many of each possible combination there is.
Someday, joor goin' to see the name of Googie Gomez in lights and joor goin' to say to joorself, "Was that her?" and then joor goin' to answer to joorself, "That was her!" But you know somethin' mister? I was always her yuss nobody knows it! - Googie Gomez
  • Jump to: