Jufo81
Jufo81
  • Threads: 6
  • Posts: 344
Joined: May 23, 2010
May 7th, 2011 at 1:14:14 PM permalink
Quote: loveTheOdds

I also know java. You could practically drop my above program straight into Java. Then create a Main to make use of it.

My code shows a slightly different calc then the link I sent. It is close, but slightly different. Not sure why.



I noticed that the QFIT calc doesn't mention whether you should add dealer's upcard to removed cards. For example if you remove two 5's, 6's and 7's from single deck (stand soft 17) the calc says a 47.22% bust chance for dealer 4, but it doesn't say whether you should also add that 4 to the list of removed cards. I dunno whether that's the difference or not.

Quote: loveTheOdds


The link you sent seems perfect for you. Nice find.



Yep, that link is a handy tool for Live BJ card counting opportunities (it's obviously more precise than any card counting system). But it isn't perfect: Doubling on soft hands is not given as an option and also the calc uses some kind of approximation to determine player's optimal choice. In other words it sometimes gives a wrong advice in very close-call situations. If I have some extra time this summer I may take it under project to write a similar calculator/simulator without these flaws.
MangoJ
MangoJ
  • Threads: 10
  • Posts: 905
Joined: Mar 12, 2011
May 7th, 2011 at 5:32:08 PM permalink
Quote: loveTheOdds

Specifically this one - http://www.qfit.com/CVDPC.htm



I would be careful with this calculator. First it does not distinguish between 21 and Blackjack. Luckily Blackjack probability is easy to calculate - you substract that probability for 21 to get the right numbers.
Second, those numbers are calculated before dealer has checked for a blackjack. Once the dealer has checked for a blackjack (and didn't found any) - probabilities are then very different after the check (you need to rescale the probabilities first).

But the real problem with this site: I doubt the numbers are correct. Why ? If you enter a single deck (4/4/.../16), you get the same numbers as WoO on appendix2b.
That means the dealers upcard is included into the deck. BUT: If you enter a degenerate deck (i.e. no aces but all other cards), you still get results for a dealers Ace upcard, which is impossible for this deck as there is no Ace present. AND if you just enter 2 cards (say, Ace and 9) you get a message "not enough cards" which is also wrong, as the only dealers hand is a soft 20 with enough cards.
loveTheOdds
loveTheOdds
  • Threads: 1
  • Posts: 30
Joined: Apr 27, 2011
May 7th, 2011 at 6:01:33 PM permalink
As for the Qfit,

I dropped some cards out of the deck, as if four hands had been played and put the cumbers in. QFit got the same numbers as I got. You are right, the top card should not be subtracted from the first page.

I tried this a few times. Seems OK.

I also think the remove aces, and you still get a positive chance in the ace column. But, remember this isn't the chance to get an ace. These are chances if you had an ace. So even looking there when the dealer doesn't have an ace visible is kind of misusing the chart.

If you need strategy, then knowing the black jack odds is important, as that is an instant lose, which is different then 21 which could be a push. And to explain the check for black jack, this means that the card hidden is not a ten value card, so that changes the odds if you know that. And this site as well as my program ignore that extra information, or assume the dealer hasn't checked for blackjack yet.

Any way, Qfit seems OK knowing the limitations of it.

I understand the odds of blackjack, which is why I don't play blackjack...

Keith
MangoJ
MangoJ
  • Threads: 10
  • Posts: 905
Joined: Mar 12, 2011
May 7th, 2011 at 6:22:34 PM permalink
Quote: loveTheOdds


I also think the remove aces, and you still get a positive chance in the ace column. But, remember this isn't the chance to get an ace. These are chances if you had an ace. So even looking there when the dealer doesn't have an ace visible is kind of misusing the chart.



I don't follow it. If you are interested in a single deck, you put in 4/4/.../16. For the numbers in the Ace column, the remaining deck is implicit a 3/4/.../16 distribution.
If you put in 0/4/.../16, for the Ace column there is no implicit remaining deck distribution. However the software comes up with some numbers for Ace up. If the software would do a full combinatorial analysis - there is no possible way to come up with any number other than zero (or maybe N/A). The fact it does come up with some numbers indicates that the calculation is somehow flawed.
There are other funny results for deck distributions, i.e. 0/2/0/0/2/1/1/1/1/1 raises a ASP error, while a minor change to 0/3/0/0/2/1/1/1/1/1 produces some output.

I'm progamming for more than 10 years, and I can tell that these errors at those non-degenerate conditions are highly suspicious of conceptional errors in the calculations. I personally wouldn't trust those results.
loveTheOdds
loveTheOdds
  • Threads: 1
  • Posts: 30
Joined: Apr 27, 2011
May 7th, 2011 at 6:58:03 PM permalink
So you are going to dismiss it simply because the programmer didn't put N/A for the cards that aren't possible? I will say it is not the best UI.

If you want to disprove it, show the numbers to be wrong. Look at the Ace for the up card when you know the dealer doesn't have an ace up card seems like purposefully trying to break it. I did test the program a few times and the numbers were right, just don't subtract the dealers up card. Which by looking at the ace position but having removed the final ace the dealer got means you did subtract the dealers up card.

The ASP error is interesting.

I wish the programmer included his code. Personally I don't trust other peoples calculations. I didn't trust the Wizards, until I duplicated them.

PS - I don't know this programmer. I have no vested interest in defending it. Just so far it seems OK to me. I haven't tried minimal deck left calcs, so maybe it fails there. I may try them, just for fun.
loveTheOdds
loveTheOdds
  • Threads: 1
  • Posts: 30
Joined: Apr 27, 2011
May 7th, 2011 at 7:07:31 PM permalink
OK, I tried -
Card, Left, Used
2-0 4
3-1 3
4-1 3
5-1 3
6-0 4
7-0 4
8-1 3
9-0 4
10-4 12
A-1 3

With a dealers up card of 8. My calc was 34.29% for bust. Qfit gave 23.57%

So that differs from my program. I think my program is fine, so it appears Qfit has a problem. Still wish the programmer included the source code.

So maybe it has problems with final decks, or some zero case error. Which may explain the ASP error.

Keith
Jufo81
Jufo81
  • Threads: 6
  • Posts: 344
Joined: May 23, 2010
May 8th, 2011 at 2:41:36 AM permalink
Hmm ok thanks for the QFIT warning. This is a bit surprising because Qfit / Casino Verite is highly regarded within the field for their high quality tools / analyzers. I guess I will make the BJ odds program myself anyway :D

Quote: MangoJ

I'm progamming for more than 10 years, and I can tell that these errors at those non-degenerate conditions are highly suspicious of conceptional errors in the calculations. I personally wouldn't trust those results.



I am confused. You said before in this thread: "I'm not an expert in programming". I would think that 10 years makes you pretty much expert?

Quote: loveTheOdds

I understand the odds of blackjack, which is why I don't play blackjack...



I am a bit curious why you were so keen to know the odds, I mean do you have some real use for the info or was it for fun / overall learning / programming exercise.
MangoJ
MangoJ
  • Threads: 10
  • Posts: 905
Joined: Mar 12, 2011
May 8th, 2011 at 4:24:43 AM permalink
Quote: loveTheOdds

So you are going to dismiss it simply because the programmer didn't put N/A for the cards that aren't possible?



It is not a matter of display. The problem is that the program produces some values which look fine, but obviously are wrong (as they are impossible to obtain with a proper calculation). Of course you could say - you know this specific value must be wrong and you could easily ignore them. But what about all other results ? How would you know other results are indeed correct, they could be subject to the same effect causing the wrong value ?

Bugs can be nasty, especially if they produce correct results most of the times (and thus are not found in the testing time). It just might be a non-initialized variable somewhere in the code (where the programmer implied that this variable is always read only after something is written to it). But it might as well be a flaw in the algorithm. There is no way to tell without source code.

I'm not saying Qfit's results are wrong. Using the standard single deck it produces the published WoO results. I simply would not trust them to the extend to risk my money on that results (i.e. for designing a betting system).

Quote: loveTheOdds


OK, I tried -
Card, Left, Used
2-0 4
3-1 3
4-1 3
5-1 3
6-0 4
7-0 4
8-1 3
9-0 4
10-4 12
A-1 3



For this configuration I get with my program (for hit soft 17):

A: 17=0.005952 18=0.065476 19=0.184524 20=0.059524 21=0.001190 BJ=0.500000 Bust=0.183333
3: 17=0.154762 18=0.202381 19=0.059524 20=0.017857 21=0.146429 BJ=0.000000 Bust=0.419048
4: 17=0.178571 18=0.065476 19=0.142857 20=0.071429 21=0.003571 BJ=0.000000 Bust=0.538095
5: 17=0.047619 18=0.148810 19=0.202381 20=0.071429 21=0.001190 BJ=0.000000 Bust=0.528571
8: 17=0.047619 18=0.505952 19=0.125000 20=0.011905 21=0.073810 BJ=0.000000 Bust=0.235714
T: 17=0.035714 18=0.166667 19=0.041667 20=0.380952 21=0.017857 BJ=0.125000 Bust=0.232143


Which is same as Qfits values. So those seems correct.

I'm just trying the other deck configuration (those with some zeros), and at the current time I get varying error messages. It seems someone is already working on the code, which is a good sign. I will check again in a few days.

Quote: Jufo81


I am confused. You said before in this thread: "I'm not an expert in programming". I would think that 10 years makes you pretty much expert?


I would not put me on expect level. I am from an scientific background, and have to rely on programming as just a tool. I never took a programming class, just trying what is working for my needs. I'm not helpless, but still very limited. I guess an expert is more focused on efficiency and scaling of algorithms.
Just because you know how to operate a engine lathe doesn't make you an engineer.
loveTheOdds
loveTheOdds
  • Threads: 1
  • Posts: 30
Joined: Apr 27, 2011
May 8th, 2011 at 9:23:19 AM permalink
Mango, thanks for running it through your program. It seems I might have a problem with my program. Probably the addition I made to account for reshuffling a deck midway through the hand/play. I hadn't tested it yet...

To your point, if they are working on Qfit, they should put up a notice. Especially if there is the possibility that it could produce erroneous results.

Keith
MangoJ
MangoJ
  • Threads: 10
  • Posts: 905
Joined: Mar 12, 2011
May 8th, 2011 at 10:48:16 AM permalink
Seems the QFit author must have been reading this thread, as ASP errors are repaired. Thank you !
loveTheOdds
loveTheOdds
  • Threads: 1
  • Posts: 30
Joined: Apr 27, 2011
May 8th, 2011 at 1:10:59 PM permalink
Well, if the Qfit author is looking, I hope s/he adds the N/A. It would be a simple change.
  • Jump to: