thecesspit
thecesspit
  • Threads: 53
  • Posts: 5936
Joined: Apr 19, 2010
November 29th, 2010 at 10:32:22 AM permalink
This came up in another thread, and I'd really like input from other people who've looked a simulating Video Poker systems.

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).
"Then you can admire the real gambler, who has neither eaten, slept, thought nor lived, he has so smarted under the scourge of his martingale, so suffered on the rack of his desire for a coup at trente-et-quarante" - Honore de Balzac, 1829
MathExtremist
MathExtremist
  • Threads: 88
  • Posts: 6526
Joined: Aug 31, 2010
November 29th, 2010 at 10:42:43 AM permalink
Follow-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.

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
"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
thecesspit
thecesspit
  • Threads: 53
  • Posts: 5936
Joined: Apr 19, 2010
November 29th, 2010 at 10:50:14 AM permalink
Quote: MathExtremist

Follow-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.
"Then you can admire the real gambler, who has neither eaten, slept, thought nor lived, he has so smarted under the scourge of his martingale, so suffered on the rack of his desire for a coup at trente-et-quarante" - Honore de Balzac, 1829
MathExtremist
MathExtremist
  • Threads: 88
  • Posts: 6526
Joined: Aug 31, 2010
November 29th, 2010 at 11:26:02 AM permalink
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.
"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
guido111
guido111
  • Threads: 10
  • Posts: 707
Joined: Sep 16, 2010
November 29th, 2010 at 11:27:26 AM permalink
Try 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.
Martin
Martin
  • Threads: 8
  • Posts: 149
Joined: Nov 20, 2010
November 29th, 2010 at 11:46:19 AM permalink
WinPoker is a great app. I've used it for many years (over 10) to perfect my playing skills at all different kinds of games and my wife actually learned how to play VP on it.

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.
thecesspit
thecesspit
  • Threads: 53
  • Posts: 5936
Joined: Apr 19, 2010
November 29th, 2010 at 12:18:09 PM permalink
Quote: MathExtremist

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.



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 :)
"Then you can admire the real gambler, who has neither eaten, slept, thought nor lived, he has so smarted under the scourge of his martingale, so suffered on the rack of his desire for a coup at trente-et-quarante" - Honore de Balzac, 1829
nope27
nope27
  • Threads: 5
  • Posts: 126
Joined: Sep 5, 2010
November 29th, 2010 at 2:09:23 PM permalink
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.
nope27
nope27
  • Threads: 5
  • Posts: 126
Joined: Sep 5, 2010
November 29th, 2010 at 2:16:55 PM permalink
Quote: guido111

Try 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.
MathExtremist
MathExtremist
  • Threads: 88
  • Posts: 6526
Joined: Aug 31, 2010
November 29th, 2010 at 7:14:28 PM permalink
Quote: nope27

Excel 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).
"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
  • Jump to: