vpFREE2 Forums

LVRJ - Casino MonteLago eyes locals market

Elito wrote:

Interesting two full-page ad in today's 5/8/03 LVRJ.
The announcement included numbers, "How the other
local casinos satck up" (as regards 25-cent VP 100%
payback): Orleans - 307, ACD - 203, Suncoast - 164,
Fiesta H - 102, Sam's T - 78, GVR - 77, GC - 56,
Boulder S - 48, ACB - 37, Sunset S - 24, and Palace S
- 19. I wonder how accurate this count is. The ad
claims that the survey was done by an independent
research company called, Cinemascore. True or not,
this seems to be a manifestation of the power of the
Las Vegas locals' market when it comes to the overall
skill of the latter's VP playing prowess.

Several years ago, before Stations bought Santa Fe, I checked out a survey that Cinemascore did of the Santa Fe. The slot manager of a competing casino gave me a copy of the detailed survey. It was loaded with errors, all indicating that the casino had much more attractive video poker than it really did.

I suspect that Cinemascore's surveys are still good only for advertising by the casinos and worthless for players looking for good games.

Dan

···

--

Dan Paymar, author of the book, "Video Poker - Optimum Play"
Editor and Publisher of "Video Poker Times" newsletter
Web site at http://www.OptimumPlay.com

"Chance favors the prepared mind."
-- Louis Pasteur

I am playing around with Java programming and thought I would write a little
program to calculate EV given a starting hand. I know how to do the
calculation, but I and wondering if there are any shortcuts other than brute
force (i.e., going through every possible combination of 0-5 cards drawn)?
For example, with a pat hand you could skip most calculations. Just
wondering from those that have done this what they found to be the most
satisfactory algorithm.

I am playing around with Java programming and thought I would

write a little

program to calculate EV given a starting hand. I know how to do

the

calculation, but I and wondering if there are any shortcuts other

than brute

force (i.e., going through every possible combination of 0-5 cards

drawn)?

For example, with a pat hand you could skip most calculations.

Just

wondering from those that have done this what they found to be the

most

satisfactory algorithm.

Unfortunately, there's no real shortcut. Let's say you wanted to
calculate the EV of QJ suited in JOB; you would indeed have to
consider all of the 50x49x48 unique draws. Obviously you
could "prune" your calculations some; if the first two cards drawn
are NOT a pair, suited with the QJ, and not enabling a straight
draw, then the only consideration would be whether the last card is
one of the six remaining Q's or J's. The question is, whether this
would be worth it as it would require "intervention" in the brute-
force process. You'd have to code for every instance of "don't
bother looking any further" rather than just let the brute-force
method proceed on its own. For instance, you draw to 678 suited; if
the next card is an offsuit 2 or 3, then EVERY result is a loser
regardless of the fifth card drawn. But is it worth it to code this
in? I wouldn't think so.

Besides, weren't our little computer buddies specifically invented
to do the tedious and essentially mindless task of brute force
calculation? Your laptop won't doze off, but YOU might....

···

--- In vpFREE@yahoogroups.com, "Dick Kalagher" <dick@k...> wrote:

Thanks for your help. One other question. To calculate QJ suited, wouldn't
you have to consider the other three cards in the hand? Would it be
47x46x45?

Dick Kalagher

···

Unfortunately, there's no real shortcut. Let's say you wanted to
calculate the EV of QJ suited in JOB; you would indeed have to
consider all of the 50x49x48 unique draws. Obviously you
could "prune" your calculations some; if the first two cards drawn
are NOT a pair, suited with the QJ, and not enabling a straight
draw, then the only consideration would be whether the last card is
one of the six remaining Q's or J's. The question is, whether this
would be worth it as it would require "intervention" in the brute-
force process. You'd have to code for every instance of "don't
bother looking any further" rather than just let the brute-force
method proceed on its own. For instance, you draw to 678 suited; if
the next card is an offsuit 2 or 3, then EVERY result is a loser
regardless of the fifth card drawn. But is it worth it to code this
in? I wouldn't think so.

Besides, weren't our little computer buddies specifically invented
to do the tedious and essentially mindless task of brute force
calculation? Your laptop won't doze off, but YOU might....

I am playing around with Java programming and thought I would write

a little

program to calculate EV given a starting hand. I know how to do the
calculation, but I and wondering if there are any shortcuts other

than brute

force (i.e., going through every possible combination of 0-5 cards

drawn)?

For example, with a pat hand you could skip most calculations. Just
wondering from those that have done this what they found to be the

most

satisfactory algorithm.

Dick, I have a C++ program that does essentially what you want. If
you'd like the source send me a note. It would not be too difficult
to convert to Java.

Dick Mustain

···

--- In vpFREE@yahoogroups.com, "Dick Kalagher" <dick@k...> wrote:

I don't know how to say this without coming across as a
bit abrupt, so I'll just blurt it out. You don't know what you
are talking about. You've never actually written a program
to evaluate poker hands, have you? Perhaps you missed
the part where he asked "... from those that have done this..".

There are plenty of shortcuts, and the right shortcuts can
cut the CPU time tremendously. By "tremendously" I mean
several orders of magnitude, as in "thousands of times
faster". Perhaps millions of times faster, depending on
the extent to which the original method was "brute force."

Most of the shortcuts boil down to finding ways to exploit
symmetry. One kind of symmetry is the order of the drawn
cards. We don't really care what order the cards are
removed from the deck, so when drawing three cards the
order "Ks 9d 2c" is no different than "2c 9d Ks". The worst
possible form of "brute force" would look at all possible
orderings, and for the initial draw this would increase the
CPU time by a factor of 120. For the case of drawing
three cards from the remaining 47, ignoring the order
saves a factor of six. This reduces the total number of
cases from (47*46*45=97,290) to 16,215.

Let's step back and look at the brute force approach.
The brute force method amounts to "list each possible
draw, determine the final hands from the draw, and
tally the results." Let's also change the problem
slightly. Suppose that instead of evaluating a single
hand, you wanted to write a program to find the best
possible playing strategy. Then the brute force
approach breaks down like this:

  1) List each of the 2,598,960 starting hands.

  2) For each starting hand, there are 32 ways to
       play the hand. This breaks down as one way
       to stand pat, 5 ways to draw one card, 10 ways
       to draw two cards, 10 ways to draw three cards,
       5 ways to draw four cards, and one way to draw
       five cards. So, for each starting hand, we'll make
       32 lists of "results of the draw.

   3) The number of possibilities for each draw depends
       on the number of cards drawn from the 47 that were
       unused in the initial draw, as follows:

          draw one: 47 ways
          draw two: (47*46/2)= 1081 ways
          draw three: (47*46*45/(3*2)) = 16,215 ways
          draw four: (47*46*45*44/(4*3*2)) = 178,365 ways
          draw five: (47*46*45*44*43/(5*4*3*2)) = 1,533,939 ways

Combining the information from 2) and 3) shows that for
any one starting hand, brute force would require us to
evaluate a total of 2,589,231 final hands. So, to find an
optimal strategy, the brute force method would require
the program to evaluate 2,598,960 * 2,589,231 hands,
or 6,729,307,799,760 hands. Even with today's blazing
fast computeres, looking at 6.7 trillion hands takes too
long. I wrote a small C program to estimate CPU time
for simply doing a table lookup on this many items, and
based on that program, it would take approximately 4 days
to perform this many table lookups, when running on a
computer that is 3X as fast as my old 650MHz machine.

I know of several different programs that compute overall
EV for VP games, and none of them take anywhere near
this long. My own program does it in about 1 second,
which is about 3 million times faster than using brute force.
I believe most other programs are slower than this, but still
improve tremendously over the brute force approach.

Brute force is analogous to listing all possible outcomes
and counting them one by one. The trick to avoiding
brute force is to find ways to counts whole groups of
outcomes together, or more generally, to find ways to
"compute" the outcome in a way that is more direct than
counting. I'll try to outline a general approach to doing
this, without filling in the fine details.

Suppose we are dealt Qs Js 8d 4c 2h. We decide to
keep the Qs Js and want to compute the EV for drawing
three cards. Drawing three cards means there are
16,215 possible final hands. Computing the EV involves
finding the number of ways to draw a royal, a str-flush,
4-kind, etc. This breaks the problem down into several
smaller problems -- finding ways_to_draw(X) where X
is one of the final hands in the pay table.

You don't have to list all 16,215 possible draws and
look at each one, saying "this one is a flush, this one
is two pair, this one is garbage". As an example, let's
look at computing the number of ways to draw a high
pair when holding QJ and discarding three small cards.
To end up with a high pair, you can draw a card that
matches your Q or J, or you can draw a pair of aces
or a pair of kings. To correctly count the "high pair"
hands, we also need to be careful to avoid drawing
a higher hand. Here is a breakdown of the number
of ways to draw a high pair:

  1) To draw a "new" pair (aces or kings) there are
       two ways to select the rank of the new pair. Once
       the rank is selected, there are 6 ways to assign
       two different suits to the paired cards. To avoid
       another pair (or 3-kind) we then remove the Q's,
       J's, and the "unused" cards that match our pair.
        This leaves 37 cards for drawing the final card.
        So, there are 12*37=444 ways to draw a "new"
        pair.

  2) To end up with a pair of Q's or J's, there are six
       ways to draw a match, then we must draw two
       other cards of different ranks. Again, we remove
       the Q's and J's from the deck before drawing the
       "unmatched" cards, but this time there will be 41
       cards left. For this case, drawing two unmatched
       cards is complicated because we have to keep
       track of the discards. The 41 cards available are
       3 each of ranks (8,4,2) for the discards, and 4 each
       for the remaining 8 "untouched" ranks. There are
       three distinct ways to draw two unmatched cards.

              A) Both cards are "4 way" draws. There are
                   comb(8,2)=28 distinct ways to assign the
                   ranks, and 4 ways to assign suit to each
                   of the distinct ranks, for a total of 448 ways.

              B) Both cards are "3 way" draws. There are
                  comb(3,2)=3 ways to assign the ranks,
                  and 3 ways to assign suit to each of
                  the distinct ranks, for a total of 81 ways.

              C) One card is a "4 way" draw and one card
                   is a "3 way" draw. There are 3*8=24 ways
                   to assign the ranks, and 3*4=12 ways to
                   assign suits, for a total of 288 ways.

       Overall, this case has 817 ways to pair by catching
        a Q or J.

In total, there are 1261 ways to end up with a high pair
for this draw. Other "grouped" hands like 3-kind,
full house are computed in similar ways.

For suited draws, there are 11 remaining spades
to draw from, so there are comb(11,3)=165 ways
to draw a final hand that is suited. Of these, one
is the royal, two are straight-flushes, and the other
162 are ordinary flushes.

There are 4*4*4=64 ways to draw an ace-high
straight, but we have to exclude the royal, leaving
63 ways to draw an ace-high straight. Similarly,
there are 63 ways to draw a king-high straight.
However, there are only (4*4*3 - 1)=47 ways to
draw a queen-high straight. In all, there are
173 ways to draw a straight.

I wouldn't really call this a shortcut. It is simply
doing a direct computation rather than mechanically
dealing out each possible outcome.

···

On Friday 09 May 2003 12:58 pm, mkl54321 wrote:

--- In vpFREE@yahoogroups.com, "Dick Kalagher" <dick@k...> wrote:
> I am playing around with Java programming and thought I would

write a little

> program to calculate EV given a starting hand. I know how to do

the

> calculation, but I and wondering if there are any shortcuts other

than brute

> force (i.e., going through every possible combination of 0-5 cards

drawn)?

> For example, with a pat hand you could skip most calculations.

Just

> wondering from those that have done this what they found to be the

most

> satisfactory algorithm.

Unfortunately, there's no real shortcut.

Steve, I agree with most everything you said, however, it does not
really take all that long to "brute force" a single hand. I think my
code runs in less than a second on my 1 GHz laptop. Don't know how
much Java overhead would add.

Dick

···

--- In vpFREE@yahoogroups.com, Steve Jacobs <jacobs@x> wrote:

clipped lot's of good stuff on VP analysis

> Unfortunately, there's no real shortcut.

I don't know how to say this without coming across as a
bit abrupt, so I'll just blurt it out. You don't know what you
are talking about. You've never actually written a program
to evaluate poker hands, have you? Perhaps you missed
the part where he asked "... from those that have done this..".

Actually, I've written FIVE of them, two in Basic, one in Cobol, one
in assembly language, and one in C. The most recent one was written
over ten years ago. So I'm sorry, but I DO know what I'm talking
about. The consideration of not regarding different-ordered draws of
the same cards as unique is so obvious, I never considered it
a "shortcut". The only other "shortcuts" would involve telling the
program to consider all draws at certain points as equal, for
instance drawing to a 3SFDI in JOB; if for instance the draw is to
468 of clubs then all first cards that are not a club, a
4,5,6,7,8,J,Q,K, or A render the fifth card moot. So allowing the
program to realize this situation when it occurs, presuming it was
using the "brute force" method, would spare it the "trouble" of
evaluating that many equivalent (and losing) results. When I wrote
my programs, the fastest thing around was a 286. I HAD to code in
evaluations of certain draws--pruning the search tree as it were--so
that the already painfully slow process didn't take an eternity. My
point about there being no real shortcuts in the present--and I see
once again that I should have SPELLED OUT what I was saying in VERY
SHORT WORDS, making my point CRYSTAL CLEAR--is that the processor
speeds available make it easier to write and run a "brute force"
evaluation program rather than a "smart" program that prunes its own
logic trees, simply because the time spent in doing the extra coding
won't be repaid in the faster running of the program. The more
sophisticated program WILL run faster---but the difference will be
measured in seconds, not hours as was in the days of the 286. If you
are someone who writes code for a living, you may be appalled at the
inelegance and inefficiency of the brute force algorithm--but it
WILL work, and work adequately. To make an analogy, you can toast a
marshmallow over a campfire, or with a flamethrower; the fact that
the flamethrower is undoubtedly more efficient at the task doesn't
mean it's the best choice for the job.

I should have defined my terms better in the original question. For any
given dealt hand, there are 32 possible new hands from drawing. I want to
calculate the EV of each of the 32 hands. By "brute force" I meant taking
each "new" hand and determining it's value (i.e. if it is a RF, SF,...high
pair, nothing). You would have to evaluate 2,589,231 hands, but you could
write an algorithm to do this without having to go through the logic you
sited in your example of the hand holding QJ suited. My guess is that your
logic would get very complex if you did a similar analysis for every
possible condition. Also, you would be in danger of making some mistakes.
For example, in your example hand, holding just the Q or just the J would at
first appear to be equivalent. But there is one less flush with holding the
J. It took me a few minutes to figure out why. (You can't make a SF
holding the Q.)But the "brute force" algorithm would just pick this up
without doing any elegant thinking.

I took your example hand and entered it in Winpoker. The calculation of the
32 hands EVs appears instantaneous on my machine (2.4 GHz P4).

Steve, I have been following your posts for many years going back to the old
rec.gambling, and have always enjoyed them and learned from them. Have you
done anything more with your research on strategies other than maximizing
EV?

···

----- Original Message -----
From: "Steve Jacobs"

Then the brute force
approach breaks down like this:

  1) List each of the 2,598,960 starting hands.

  2) For each starting hand, there are 32 ways to
       play the hand. This breaks down as one way
       to stand pat, 5 ways to draw one card, 10 ways
       to draw two cards, 10 ways to draw three cards,
       5 ways to draw four cards, and one way to draw
       five cards. So, for each starting hand, we'll make
       32 lists of "results of the draw.

   3) The number of possibilities for each draw depends
       on the number of cards drawn from the 47 that were
       unused in the initial draw, as follows:

          draw one: 47 ways
          draw two: (47*46/2)= 1081 ways
          draw three: (47*46*45/(3*2)) = 16,215 ways
          draw four: (47*46*45*44/(4*3*2)) = 178,365 ways
          draw five: (47*46*45*44*43/(5*4*3*2)) = 1,533,939 ways

Combining the information from 2) and 3) shows that for
any one starting hand, brute force would require us to
evaluate a total of 2,589,231 final hands. So, to find an
optimal strategy, the brute force method would require
the program to evaluate 2,598,960 * 2,589,231 hands,
or 6,729,307,799,760 hands.

But the "brute force" algorithm would just pick this up
without doing any elegant thinking.

That pretty much summarizes the tradeoff -- a simple algorithm that is
slow, or a more complex algorithm that is faster.

I took your example hand and entered it in Winpoker. The calculation of
the 32 hands EVs appears instantaneous on my machine (2.4 GHz P4).

No doubt. I'm also quite certain, without even having seen the program, that
the algorithms used in Winpoker go well beyond "brute force."

Steve, I have been following your posts for many years going back to the
old rec.gambling, and have always enjoyed them and learned from them. Have
you done anything more with your research on strategies other than
maximizing EV?

I still spend a lot of time thinking about alternate strategies. One of the
areas that I'm working on is mathematical methods to transform a problem
from "maximize metric M on game G" into a problem of "maximize EV on
game H".

As an example, one of my favorite alternative metrics is one that I call
"min-cost." Mathematically, min-cost is equivalent to playing a game
where the payoffs from winning bets are paid with a different currency
than is used to place the wagers. For example, imagine a VP machine
where you pump in quarters and the payoffs are returned in Canadian
quarters, using a pay schedule that gives something close to "fair
value." The min-cost strategy is equivalent to playing the game in such
a way that you maximize your effective exchange rate, producing the
maximum number of Canadian quarters (from wins) in exchange for the
number of U.S. quarters consumed by losses.

In general, the min-cost (or max-exchange-rate) strategy is different
than the max-EV strategy. However, you can find the min-cost
strategy by iterating over the following steps:

   1) Assume the equivalent value of the payout currency is X times
        as much as the "coin in" currency. X might be greater than one
        or less than one, depending on the exchange rate.

   2) Pick a value for X. Initially, a value of X=1 is fine.

   3) Compute the max-EV strategy when using X as the exchange rate.

   4) If the EV shows the game is exactly breakeven, then stop. The strategy
       for this value of X is the min-cost strategy.

   5) If the EV shows the game is favorable to the player, decrease X and
       return to step 3. If the EV shows the game favors the house, increase
       X and return to step 3.

I've been able to prove that this method works for finding min-cost
strategies, but I still don't completely understand all of the implications.
The min-cost strategy is equivalent to a strategy for a different game --
one that gives a breakeven result when maximizing EV based on
"inflated" (or deflated) payoffs.

Supposed your style of play is to walk into the casino with $100, buy
exactly $100 worth of coins, and play those coins until the original
$100 is gone (meaning that when you "push" by winning back your
original bet, you replay that bet until it wins or loses). When that $100
is gone, you take whatever coins are in the tray and cash out. Now,
assuming your goal is to maximize the average amount of cash after
cashing out, the min-cost strategy will perform better than if you play
the normal max-EV strategy.

Which proves once again that expectation isn't everything :slight_smile:

···

On Sunday 11 May 2003 05:40 pm, Dick Kalagher wrote: