From: "Eric I." Date: 2008-01-07T05:34:58+09:00 Subject: Re: Studying Blackjack (#151) On Jan 6, 12:02 am, "Eric I." wrote: > Although very close, my results do differ slightly from yours.  For > example you determine that when an ace is the upcard, there's a 36.07% > chance of getting 21 exactly.  I get 36.35% (31.07% natural + 5.28% > "unnatural").  On the other hand we both get a 21.32% chance of > busting when the upcard is a 10 or facecard.  It'll be interesting to > see why that's the case when we post our code solutions. It took me a while, but after comparing Denis' code and my own, I figured out where the differences in results came from, and it was in how aces are handled when valuing a hand. I believe that Denis uses an incorrect algorithm. When valuing a hand, he first sums up the values of all the non-aces and then makes a second pass handling the aces. For each ace, if valuing it as 11 would *not* bust the hand, he values it at 11. Otherwise he values it at 1. But consider a three-card hand like ace, ace, 10. The first ace is counted as 11 since that wouldn't bust the hand. The second ace is counted as 1, since valuing it as 11 also would bust the hand. But the hand still busts due to the 10. If both aces were counted as 1, then the hand would not be a bust (so far, at least), and it would need for another hit. When I changed Denis' hand valuation logic on aces to my own, our results were identical. Eric