Hi everyone, this is my first post here, so if this isn't the right place for it, I apologize and am happy to move it.
I'm writing my own simulator to calculate BS by randomizing player decisions and storing the results, then calculating the EV of each decision. However, I'm not sure if the structure I'm using to store results is correct.
My results are going into one of two data structures:
1) A map of scenarios that [hit/double/split] leads to, and the number of times each route gets mapped. The scenarios are strings representing the player hand and dealer upcard i.e. "s18_A" represents any soft 18 against an ace (soft and splitable hands are stored separately, but otherwise hand composition is ignored).
dictionary<string, dictionary<action, dictionary<string, int>>>
2) A dictionary of outcome scenarios and results for any final hand [stand/double/bust] (excluding player/dealer BJ, and surrender which is calculated seperately). These scenarios combine hard, soft, and splitable hands since once they are final, it shouldn't matter. The ResultValue is a custom object that I can calculate the EV of the result.
dictionary<string, ResultValue>
With me so far? Please let me know if I'm on the wrong path.
Using this, I'm able to recursively map the hit/double/split paths and compare the EV of each decision to put together basic strategy. These are the results of a 500 million round sim (3:2 6D 1pen H17 DAS nRSA SP4 LS):
Upcard 2 3 4 5 6 7 8 9 10 A 4 Hit Hit Hit Hit Hit Hit Hit Hit Hit Hit 5 Hit Hit Hit Hit Hit Hit Hit Hit Hit Hit 6 Hit Hit Hit Hit Hit Hit Hit Hit Hit Hit 7 Hit Hit Hit Hit Hit Hit Hit Hit Hit Hit 8 Hit Hit Hit Hit Hit Hit Hit Hit Hit Hit 9 Hit Double Double Double Double Hit Hit Hit Hit Hit 10 Double Double Double Double Double Double Double Double Hit Hit 11 Double Double Double Double Double Double Double Double Double Double 12 Hit Hit Stand Stand Stand Hit Hit Hit Hit Hit 13 Stand Stand Stand Stand Stand Hit Hit Hit Hit Hit 14 Stand Stand Stand Stand Stand Hit Hit Hit Hit Hit 15 Stand Stand Stand Stand Stand Hit Hit Hit Surrender Surrender 16 Stand Stand Stand Stand Stand Hit Hit Surrender Surrender Surrender 17 Stand Stand Stand Stand Stand Stand Stand Stand Stand Surrender 18 Stand Stand Stand Stand Stand Stand Stand Stand Stand Stand 19 Stand Stand Stand Stand Stand Stand Stand Stand Stand Stand 20 Stand Stand Stand Stand Stand Stand Stand Stand Stand Stand 21 Stand Stand Stand Stand Stand Stand Stand Stand Stand Stand s13 Hit Hit Hit Double Double Hit Hit Hit Hit Hit s14 Hit Hit Hit Double Double Hit Hit Hit Hit Hit s15 Hit Hit Double Double Double Hit Hit Hit Hit Hit s16 Hit Hit Double Double Double Hit Hit Hit Hit Hit s17 Hit Double Double Double Double Hit Hit Hit Hit Hit s18 Double Double Double Double Double Stand Stand Hit Hit Hit s19 Stand Stand Stand Stand Double Stand Stand Stand Stand Stand s20 Stand Stand Stand Stand Stand Stand Stand Stand Stand Stand s21 Stand Stand Stand Stand Stand Stand Stand Stand Stand Stand tA Split Split Split Split Split Split Split Split Split Split t2 Hit Split Split Split Split Hit Hit Hit Hit Hit t3 Hit Split Split Split Split Hit Hit Hit Hit Hit t4 Hit Hit Hit Hit Split Hit Hit Hit Hit Hit t5 Double Double Double Double Double Double Double Double Hit Hit t6 Split Split Split Split Split Hit Hit Hit Hit Hit t7 Split Split Split Split Split Split Hit Hit Hit Hit t8 Split Split Split Split Split Split Split Split Split Surrender t9 Split Split Split Split Split Stand Split Split Stand Stand t10 Stand Stand Stand Stand Stand Stand Stand Stand Stand Stand
The red values are where my strategy differs from BJA's H17 BS. I suspect the errors might be caused by the way I am weighting the EV of splits. To do this, I'm summing the proportional EV of every possible outcome for a split hand EXCEPT for resplits (because that would cause an infinite loop). Then I'm multiplying the summed EV for an individual split hand by the average number of split hands it would result in (2 + probability of resplit)
Please let me know if there are issues with my logic or anything I might not have considered. I appreciate the help!
Bookmarks