Hey guys, for all the old timers who remember me working on this simulation, I've added all the simulation code back in and it seems to be working as advertised. It's still pretty much a hack, and I'm working on that. For example if you compile it you'll notice that there's a blank menubar across the top, I still need to flesh that out. Also, if you move or cover then uncover the window while the simulation is running, the menubar and the bottom form with the control buttons don't redraw until the simulation ends. If you supply a number on the command line, that many simulations of 100,000 hands each will run, otherwise it defaults to running 40 simulations. No other command line options are available yet, not even -h or --help, I'm working on that. By default it will echo the number of simulations back to the terminal window you launch it from. If you open the file in your favorite text editor, there's some helpful information at the top of the file on how to compile it using g++. It's on my todo list to ifdef the STL calls to eventually get this code to run using MIPSPro, or an older GNU for example on my Sun Blade 2500. I haven't gotten started on that yet.
The interesting thing to me is that my code matches Braun's results everywhere except the player's hands of ace 8 and ace 10, so either I'm wrong or Braun was wrong, but if I'm wrong I can't for the life of me figure out where. There are some other trivial differences, for the case of a player's pairs, I match Braun exactly everywhere except for the dealer's 10, where Braun got 145 and I get 144. Also for the case of a player's 10, 10 vs. every dealer upcard, Braun got 724, I think the right number is 723.
When the simulation ends, any difference between Braun's numbers and mine are highlighted in red, my numbers keep the white background. Google books has Braun's numbers online, if you search for "chart b.21 how many times you will get each hand" you can see them.
As I mentioned before, I want to tackle Braun's other simulations as well, I decided to do this one first because I thought it would be the easiest. I ran earlier versions of the code on my 600 MHz Octane2 and it was horribly slow. So far the biggest run I've done was 12,700 loops (of 100,000 hands each), and it took half a day on my 64 bit 3.6 GHz Xeon E5-1650, so I think that makes it a supercomputer application. Isn't any code that takes half a day to complete a supercomputer application?
Anyway, thanks to anyone who's bored enough to try this out!
One other thing, John if you compile this, I left the call to sprintf because I want older compilers to be able to use this, I increased the character string size by integer 1, please let me know if that still smashes the stack on your workstation, so thanks if you do try it!