There are some surprising results. I thought conventional wisdom was to hit a 16 if
dealer has a 7 or better, but this model suggests to only hit 16 if dealer has an 7 or
Ace. Maybe I need to play more hands...
2 Comments on this...
- More hands may help, but I think your infinite deck is a bigger concern.
- I only skimmed the code, but one major problem I think
you have is that you aren't ruling out the possibility
that the dealer has a Blackjack -- if the dealer has a
face up Ace, and the dealers down card has a value of 10,
all play stops, dealer wins, there is no
betting choice/action. That means
that when calculating wether or not to hit or stand, you
should completely rule out the possibility that the dealer
has 21 -- becuase if they do, the question is moot, and
shouldn't affect the probibilities the player should use
to determine their action.
Here is a decent site on Rules, and Odds
(edited: cleaned up formatting, and miss-choosen term)
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|