Jacks Or Better - holding 3 to a straight flush

Discuss proper hold strategies and "advantage play" and ask questions about how to improve your play.
Ronnie
Forum Newbie
Posts: 8
Joined: Sat Jan 20, 2007 12:10 pm

Re: Jacks Or Better - holding 3 to a straight flush

Post by Ronnie »

Shadowman, you surely have simplified the process. I fully understand your breakdown here and I assume others will appreciate it as well.
One minor detail.
 
You wrote this formula:
 

SF(2*250)+FL(43*30)+ST(30*20)+3K(9*15)+2P(27*10)+HP(21*5) / 1081 = 2.6827
 

Removing the two-character hand IDs, I put your formula into a Visual Basic program as:
 

ER = (2*250)+(43*30)+(30*20)+(9*15)+(27*10)+(21*5) / 1081
 
The result? ER = 2795.097!
 

The explanation point does not mean factorial: it is simply an indication of my astonishment!
 
For a moment I had dreams of doing nothing with the rest of my life except playing VP.
 
After all that return of 2795.097 (much much greater than the 2.6827 which you calculated), if true, would mean that I could live a life of luxury as long as I played VP and, once in a while, drew my example hand or one similar to it.
 
Of course, as you can well imagine, reality quickly bit me.
 
I realized that, because of the order of operations rule, the last item (21*5) by itself was getting divided by the 1081! The other items were not being affected.
 
So I added the necessary parentheses and it all worked out fine and I can now forget about the life of luxury.
 

ER = ((2*250)+(43*30)+(30*20)+(9*15)+(27*10)+(21*5))/ 1081
 

The result? ER = 2.6827
 
Your calculations are, of course, for playing five credits. I have been calculating using one credit. But that would not change the overall determination of which strategy is better.
 
Of course I can simply divide the 2.6827 by five to get the single credit return or change the units in the formula to read 2*50, etc.
 


As for my progress .....
 
Right now I am trying to determine how my simulation logic could be so far off.
 
The first thing I am doing is making sure that every possible hand is being correctly evaluated by my program. For instance, if my program is ever inadvertently calling a full house a three-of-a-kind (neglecting the pair) then obviously things would be off.
 
I am not suggesting that is the case. In fact thus far it appears that all is well with hand evaluation.
 
But for obvious reasons, this is the first step that I need to take.
 
Next I will look at the cards that are being dealt in the re-draw. If I am using combinations where I should be using permutations, then that would make a big difference!
 
If I consider the next five cards drawn as a group and the cards are distributed serially then, if holding the 3 4 and 6, the King and the 9 would be replaced by the first two cards of those five cards in the group.
 
If i decided to go that route of using five cards and mistakingly used combinations rather than permutations and they were ordered ascendingly, then the highest cards in the deck sequence might never be re-drawn.
 
So maybe that is what I have been doing and, if so, that is where my mistake lies.
 
I think not but I will check it out.
 
Of course if I only considered the two cards re-drawn, and not used a five-card group, I could then use combinations with just two cards. In that case all combinations of those cards would be redrawable. (Did I just invent a word?)
 
I will also check my random number generator although, from all indications, it is sound and that is not the problem.
 
This is all very educational to me, and fun as well.
 
Your continuing input is much-appreciated.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

rascal
VP Veteran
Posts: 674
Joined: Tue Sep 12, 2006 12:25 am

Post by rascal »

Ronnie, using a five credit calculation instead of one credit calculation always gives you better results. In JOB, a 5 credit Royal has 4000 point payoff vs 250 point payoff for playing one credit.

Ronnie
Forum Newbie
Posts: 8
Joined: Sat Jan 20, 2007 12:10 pm

Post by Ronnie »

Good news!
 
Thanks to your help, Shadowman, I have solved my problem!
 
And, of course, you were absolutely right and I was ..... well, less than right!!!
 
Your most recent message, in which you spelled it all out mathematically, made me realize that it was absolutely the case where I was doing something wrong.
 
So it was back to the drawing board for me and, happily, it did not take long for me to realize the error of my ways.
 
It turned out to be so simple that I am almost embarrassed to admit what I did.
 
But I will gladly do so anyway since I feel that has been a great learning experience for me and also a great introduction to this board.
 
My error was a simple one, as I guess most errors are.
 
In my simulated redraws I inadvertently was never dealing either a 2H or a 5H!
 
Amazingly, apart from the cards already dealt (3H 4H 6H KS 9C) and the AH, those were the only cards being excluded!
 
Of course two of those cards that my program refused to allow were necessary (particularly the 5H) in order for a heart straight flush to occur!
 
The problem occurred because I mistakenly had my computer pick a random number from 6 to 52 when it created the redraw group of five instead of picking a number from 1 to 52.
 
Internally I ordered the cards in sequence from Ace to King, going hearts then diamonds then spades then clubs.
 
So my 52-card universe is: AH 2H 3H 4H 5H 6H 7H 8H 9H JH QH KH AD 2D 3D ..... AS 2S 3S ..... TC QC KC.
 
In choosing the five cards for the redraw, I had my program select a random number from 6 to 52 (me bad!), then check to see if that card was already used. If it was already used, I told the program to ignore that card. If it was not already used, I told my program to select it and then mark it as having been used.
 
By having 6 in the lower part of the range, I was excluding AH 2H 3H 4H 5H in my universe from possible selection!
 
The 3H and the 4H would have been rejected anyway because they were part of the initial deal. But the AH and 2H and 5H should have been eligible for selection!
 
The fix required the change of one character of code!
 
Specically, I changed the instruction:
 
      mov   frmnum,6
 
to
 
      mov   frmnum,1
 
I made the change, re-ran the program and got the expected results.
 
Going for the straight flush is preferable to holding the King!
 
My program now agrees!!!
 
Here's one thing really interesting about this.
 
Also a bit scary.
 
Had I arbitrarily used diamonds instead of hearts (in other words 3D 4D 6D) then my program, even in its flawed form, would have correctly chosen going for the straight flush over holding the King! That's because the 2D and 5D were not among the excluded cards!
 
I would then, of course, never posted my message here.
 
But, also, I would not have been unaware of a lurking problem which could have bitten me well into the future!
 
As things turned out, I am glad that this happened, even though it is a public embarrassment of sorts (though my full identity has not been stated here) because your posts have, I am sure, not only helped me but others as well.
 
So a big thank you, to you, Shadowman!
 
Ronnie
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Ronnie
Forum Newbie
Posts: 8
Joined: Sat Jan 20, 2007 12:10 pm

Post by Ronnie »

I realize what you say about using 5 credits versus 1.
 
However in my financial state I can only afford to play for 1 credit at a time so that's the reason I chose that.
 
Granted that the possibly Royal Flush would make a difference in many draws (using 5 versus 1) but not in this particular instance.

shadowman
Video Poker Master
Posts: 3587
Joined: Mon Oct 23, 2006 5:42 pm

Post by shadowman »

I realize what you say about using 5 credits versus 1.
 
However in my financial state I can only afford to play for 1 credit at a time so that's the reason I chose that.
 
Granted that the possibly Royal Flush would make a difference in many draws (using 5 versus 1) but not in this particular instance.
 
Congrats on getting your program working. If I had a nickel for every stupid mistake I've made I'd be a rich man ... as almost every programmer knows.
 
One comment on the playing 1 vs. 5. I also played short coin for several years before I finally understood the game well enough to feel confident at playing higher amounts. You are still in the early stages and patience is a good idea. I still play far below my bankroll even though I win money every year. Far too many people don't understand the potential for devastating losing streaks.
 
Finally, I want to commend you on your willingness to "be wrong" while searching for new understanding. We all learned a lot.

Post Reply