I've written a piece of code that simulates the results of a Video Poker machine. It uses the pay table and probabilities from the Wizards Video Poker pages (for example : https://wizardofodds.com/videopoker/tables/jacksorbetter.html#fpjb ). I then have a VP object that will return a random result when called. The result frequency is dependent on the probability in that table (so 2476 from 100,000,000 hands will be Royal Flushes) etc.
This, for me, is the same as :
Deal a set of cards.
Look up the perfect strategy for holds for those cards.
Make those holds.
Redraw.
Work out result.
Return the result.
Nope27 says this is not the same. What do others think?
(i choose the former approach as it saves a lot of time and effort coding. I'm not sure how to go about the second approach, but haven't spent much time looking at it, especially assessing the current hand, any clues would be appreciated).
If you know and are using the exact final-hand probabilities, the methods are equivalent. However, you have introduced rounding errors: the probability of a Royal Flush is not 2476 in 100000000. It is 493461180 in 1993323051720.
Moreover, that probability is only accurate if you play with a fixed strategy. Since the whole point of your test is to simulate other strategies where you don't know the exact final-hand probabilities, you only have two choices:
1) Create the exact final-hand probabilities for the non-optimal strategies you want to examine, or
2) Create a generic strategy-playing engine and a deal/draw/eval engine.
I'd go with #2 if you can make it run quickly. Start here for tips on that:
http://www.dagblastit.com/vidpoker_story.html
Quote: MathExtremistFollow-on from my last reply:
If you know and are using the exact final-hand probabilities, the methods are equivalent. However, you have introduced rounding errors: the probability of a Royal Flush is not 2476 in 100000000. It is 493461180 in 1993323051720.
Yep, I have introduced a rounding error. It's accurate enough for me for the initial pass, but I do intend now to update the tables to use a full probability. It's accurate to about 0.01% of the EV of the machine.
Quote:
Moreover, that probability is only accurate if you play with a fixed strategy. Since the whole point of your test is to simulate other strategies where you don't know the exact final-hand probabilities, you only have two choices:
1) Create the exact final-hand probabilities for the non-optimal strategies you want to examine, or
2) Create a generic strategy-playing engine and a deal/draw/eval engine.
I'd go with #2 if you can make it run quickly. Start here for tips on that:
http://www.dagblastit.com/vidpoker_story.html
#1 sadly doesn't work anyways for some systems which make different plays at different bank roll levels. Thanks for the link.
Quote: thecesspit#1 sadly doesn't work anyways for some systems which make different plays at different bank roll levels. Thanks for the link.
It would if you had an array of distributions each mapped to a bankroll level, but I still think that's the wrong way to do it.
http://www.zamzone.com/
https://wizardofodds.com/videopoker/tables/jacksorbetter.html
at the bottom of the page
The Wizard: "The cost of this software is $30 and the web page has a stripped down version for free. For anyone serious about playing video poker properly I give WinPoker an A."
I know you can change pay tables, make your own games and run simulations in it. I have not used it in years, but if the Wizard gives it an "A" and it is only $30, why torture yourself with programming if it has already been done.
It was created by Bob Dancer and as you may know already he is probably the King of Video Poker.
I highly recommend it for anyone who wishes to learn the game in that it has several modes of operation including "warn" which lets you know when you might be screwing up and "auto-hold" that, obviously, holds the cards for you.
On that note I was out in West (by-God) Va a month ago at the Hollywood casino at the Charlestown racetrack. They have some awful video poker but one of the features is that it automatically holds the "by the book" cards for you. Basically all you have to do is press the deal/draw button. No thinking. I didn't like it but that doesn't make it bad - just different.
Quote: MathExtremistIt would if you had an array of distributions each mapped to a bankroll level, but I still think that's the wrong way to do it.
Yeah, I definitely don't want to go down that route.
I realized, as long as any rounding error doesn't increase the probability of a top paying hand, then I've effectively coded for player error :)
Quote: MathExtremist
2) Create a generic strategy-playing engine and a deal/draw/eval engine.
I'd go with #2 if you can make it run quickly. Start here for tips on that:
http://www.dagblastit.com/vidpoker_story.html
https://wizardofodds.com/videopoker/methodology.html
The Wizard has his own page and some code also.
Quote: guido111Try WinPoker6
http://www.zamzone.com/
https://wizardofodds.com/videopoker/tables/jacksorbetter.html
at the bottom of the page
The Wizard: "The cost of this software is $30 and the web page has a stripped down version for free. For anyone serious about playing video poker properly I give WinPoker an A."
I know you can change pay tables, make your own games and run simulations in it. I have not used it in years, but if the Wizard gives it an "A" and it is only $30, why torture yourself with programming if it has already been done.
WinPoker6 has some nice features, but is not a true simulator as is WinCraps for craps.
You can run fast simulations on any VP game and pay table but only 1 session at a time.
It is a nice software for the price.
Excel does much better for running Monte Carlo simulations and almost any one can program VBA with little trouble.
Quote: nope27Excel does much better for running Monte Carlo simulations and almost any one can program VBA with little trouble.
Yeah, but it's slow and you wouldn't want to write a poker hand-evaluator in it. I do virtually all of my simulation in C/C# these days (which is not much - mostly I write iterators and produce full solutions).