BJ PowerSim Instructions

Embed Size (px)

Citation preview

BJ PowerSim User's Instructions copyright 2011 ET Fan 3/1/11Introduction "With the continuing rapid growth in the number of scientists and engineers, and the rise of fantastic new scientific tools, the interest in the possibility of winning gambling systems is increasing" E. O. Thorp Beat The Dealer '66 edition It's as true today as when Dr. Thorp penned it forty years ago. Investigators tirelessly pursue new strategies to try to improve their odds of winning at blackjack. For example: 1) When JA had a question about the advantage associated with a zero count four decks into a six deck shoe versus the ev at the top of a two decker, he asked Ken Fuchs to whip up a custom version of his blackjack simulator to crank out the answer. 2) When Stanford Wong wanted to know how much the casinos were giving away by handing out coupons that could be parlayed as an ace, he just inserted a few new lines into his sim program. He "patched the source" so the player got an ace every hand. 3) Later, when yours truly was studying ace location techniques, I found I couldn't use Wong's figures. It turns out that a coupon is different from taking an ace from the shoe, since that ace would no longer be available for the rest of the hand. No problem! I simply rigged my own home-brewed simulator to swap an ace from the shoe to player number one - hand after hand. The story is always the same. To do serious gaming research you need to do your own programming. "Have source code will travel," has always been my motto. Now, not everyone is cut out to be a programmer. But an open source simulator is a big plus even for nonprogrammers. It adds a level of Trust to know dozens of people are pouring over the code, so there's a high probability the code is reliable (any mistakes will be found and corrected quickly) and honest (it does what it claims to do). And no where is Trust with a capital "T" more important than in a blackjack simulator. So what if a programmer made the source code to a top notch simulator program available to the general public? One that's useful "right out of the box" to nonprogrammers, yet easily verifiable and modifiable to programmers? And what if he wrote it in XBasic, a fast, free, easy-to-read, greatly-respected compiler freely available on the internet? Would this be TOO MUCH COMPUTER POWER in the hands of the squalid masses?? We're about to find out! Blackjack PowerSim is an open source blackjack SIMulator program with an emphasis on SIMPlicity and readability. The concept is to provide a serious research tool, and a fast free sim program together in one package. This is for card counters who have already read a book or two, and are interested in doing simulations for original research, or to confirm some of the numbers they've seen. You won't find any eye-popping graphics here, nor any rare, exotic features. That would defeat the purpose by muddying the source with ugly "spaghetti code." If you want an exotic option, ask someone on www.blackjackforumonline.com to program it for you, or program it yourself! That's the precept driving PowerSim - to encourage independent research and eliminate the need to "reinvent the wheel" before you get to first base (to mix metaphors). Right out of the box, BJ PowerSim provides fast simulation of many different rule variations and counting strategies. But to a BASIC programmer, BJ PowerSim is in a class by itself. The hard part is done. The program logic follows the flow dictated by the dealer in your typical casino. Code simplifying tricks (like settling busts and naturals after a round is finished, instead of right away when they occur) have been avoided. This will ease the task of maintaining the source through the many revisions envisioned for the future. Blackjack PowerSim is also a great "argument stopper." When someone claims that card counting is just a bunch of hooey, show him some PowerSim sim results. Then, if he sings the old song "It's just not the same as in a real casino" -- show him the source code, and tell him to make a list of the logic errors. (Don't do this if he owes you money -- he may decide to skip town.) The time for excuses is over! Anyone who's ever taken a remedial computing course has programmed a few lines in BASIC. Want to test that supernatural progression you've been pondering, or that new rule at the Trop where the 8 of clubs is wild? With PowerSim, the possibilities are endless! COMPUTER POWER TO THE PEOPLE!!!Gambling Warning Gambling is dangerous. Most people who gamble regularly would be better off if they'd never set foot in a casino. Sometimes people realize this, but sadly that realization comes too late. They become hooked and unable to cope with withdrawal from the hypnotic spinning lights and soothing green felt. This software is for those few individuals with the discipline and attitude required to learn advantage play so as to beat the casinos at their own game. This requires many hours of practice, the ability to think outside the box, and a capacity to delay gratification -- things incompatible with a typical gambler mentality. Some heartfelt words of warning: If you have any doubt about your ability to do what it takes -- stay away from casinos. Even if you put in the long hours, dutifully calculate your mathematical edge, and cultivate a healthy respect for Risk Of Ruin, there's a good chance you'll still lose. You may be cheated. That's right -- the casinos so revile your ability to turn the tables around on 'em, that they'll stoop to sleight of hand, shorting shoes, or even shorting the payoffs when your back is turned. You don't want to think ill of your fellow man. Naturally, most casino personnel are as honest as the day is long. You may play for months without meeting a cheat. But it only takes an occassional bad apple to turn all the simulations and probability charts into confetti. And forget about legal recourse. You are an enemy on hostile turf, and it'll be your word against theirs. They really don't appreciate your dedication and prowess. Be careful out there. Watch your back, and watch your wallet.Quick Start Installation: These are the instructions to install this beta version of Blackjack PowerSim for Windows on your computer, so you can start using PowerSim immediately. "Beta" means it hasn't been tested on a wide variety of machines with different versions of Windows, different memory configurations, etc. We're reasonably sure the program won't harm your computer, and that simulation results are accurate, but there are no warranties. You're downloading and running this software at your own risk. We solicit your help in finding bugs, and suggesting improvements. If you're a programmer, and want to take a crack at modifying BJ PowerSim for an unusual rule or strategy, you will also want to install the XBasic programming environment. This will be covered later. Even inexperienced programmers may find hacking (in the good sense of the word) BJ PowerSim to be a positive learning experience. You must have the ability to extract zip files to install BJ PowerSim. This comes built in to Windows XP, and most other computers have WinZip installed. Simply download PowerSim v 6.zip to your desktop, double click on it, and extract it to your desktop. If you're using WinZip, make sure the All files: box is checked before you extract. This will create a folder named "PowerSim v 6" on your desktop. Once you have the PowerSim v 6 folder, you can move PowerSim v 6.zip to your My Programs folder, or any place on your computer for safe keeping. Now you're ready to roll. If you never operated a computer before Windows appeared on the scene, BJ PowerSim may require a little adjustment. It has a DOS-like line at a time interface. But hang in there! Many people find this approach easier to use for this type of program. Note: If you're upgrading PowerSim from a previous version, you will want to keep your old PowerSim v x folder if you have any important .SCO files. Version 6 of PowerSim and ScoCalc use a new .BIN file format to support simulations over the old 2 billion round limit. However, you can still use old .SIM or .STR files going back to version 2. If you install XBasic over a previous installation, XBInstall will write over the old PowerSim files in the C:\XB\demo folder. If you wish to save the old files, you should rename C:\XB\demo to something like C:\XB\oldDemo, and then completely reinstall XBasic as described below, starting with running xbasic-6.2.3.exe.Running Blackjack PowerSim: To start PowerSim, please double click on the PowerSim folder you now have on your desktop, then double click on the PowerSim.exe icon inside. You will be presented with a screen like this:(screen shot:) ***** Welcome to Blackjack PowerSim ***** The eminently hackable, patchable, open source blackjack simulatorInput a seed (0 - 4,294,967,295, default = timer)[One or two .sim files I've included]Name of .SIM simulation file 1stsim I pressed [Enter] in response to the "Input a seed" cue, so PowerSim picked a seed based on the timer. A .SIM file is a file type I created to store the input and output parameters of your simulations. Since this is your first simulation, enter any name of your choice and press [Enter]. I chose "1stsim" for my first simulation file. Since this is a new .SIM filename, BJ PowerSim will respond with the message:Creating a new .SIM simulation file! If you had entered the name of a .SIM file that already exists, PowerSim would use the input parameters from that file. Next, you will see a range of options -- one line at a time -- that should look something like this:Number of decks (default=6) 4# players (4) 6Shuffle point (1 - 208, default = 156) Maximum rounds per shoe (INFINITY) # burn cards per shoe (1)# rounds per dealer (INFINITY) Last card dealt hole card or upcard (H/u)European No Hole Card (N/y) Split to a maximum of how many hands (2-10 default=4) Double after splits on non-aces (Y/n) Resplit aces (N/y) Extra hits allowed on split aces (N/y) Double on hard 10 or 11 only (N/y) Doubling allowed on split aces (N/y) Dealer hits soft 17 (N/y) Surrender offered (N/y) Dealer picks up hands from Last player to first, or first to last (L/f) Count tag -- integer -256 to +255 -- for ace (default = hilo system) ** HiLo tags enabled **generic with ES.str generic.str 2dH17DAS.str KO Preferred 6d.str Red7shoeH17DASI18.str.STR strategy file for player 1 (generic).STR strategy file for player 2 (generic.str).STR strategy file for player 3 (generic.str).STR strategy file for player 4 (generic.str).STR strategy file for player 5 (generic.str).STR strategy file for player 6 (generic.str)Will Player 1 use indices? (Y/n) n Will Player 2 use indices? (Y/n) Will Player 3 use indices? (Y/n) n Will Player 4 use indices? (Y/n) Will Player 5 use indices? (Y/n) n Will Player 6 use indices? (Y/n) Display individual hands (N/y) Display shoe and discards before shuffling (N/y) Name of .BIN file 1stsimHow many rounds to auto-play (1 - 9,223,372,036,854,775,807) 1000000Launching Simulation At: 1/1/2007 1:23:45 Round 1000000 was completed at: 1/1/2007 1:23:57A maximum of 189 cards were dealt from the shoe.Shoe check: 16 16 16 16 16 16 16 16 16 64Bin data is being stored in 1stsim.binPress [Enter] to close In each case, the defaults are shown in parentheses after the prompt. For example, if you just press [Enter] after the # players prompt, you will get 4 players per round for that sim. For a prompt like: Dealer hits soft 17 (N/y), if you key in anything other than a lower case "y" (without the quotes), the dealer will Not hit soft 17 -- in other words, you will be simulating S17 (Stand on Soft 17). On the other hand, if (and only if) you press y [Enter], the dealer will hit soft 17. [Note: the above display is for the latest version 6. Some of the defaults have changed from earlier versions, but .SIM files from versions 2 through 5 are still compatible.] For another example, if you press anything other than a lower case "u" in response to: "Last card dealt hole card or upcard (H/u)," the Hole card will be the last card dealt on each round -- which is the normal procedure in most casinos. The fact that the "H" comes first, and is capitalized, is your cue that the program will default to Holecard for this option when you press anything other than the alternate option: u [Enter]. If you make a mistake at any time, you can use the backspace key before you press [Enter], or you can press Ctrl+Break if you wish, to abort the program and start over. You can even use Ctrl+Break after the simulation is running, but it's better to hit Space, followed by n, in response to the Resume (Y/n) query. If you just abort with Ctrl+Break, your partial sim results will not be stored. Note that clicking on the upper right hand corner of the Console box does not close the window, as it does with most programs. That's because XBasic was developed on a Unix work station running under something called XWindows. This was the mid eighties, lads and lasses, before MS Windows even existed. The conventions to which we've grown accustomed are not carved in stone. If you look closely at the PowerSim screen I copied above, you will see that I chose the defaults in most cases, but I entered 4, for the number of decks and 6 for number of players, plus I have some of the players using indices, and some just playing basic strategy. So for the simulation above, we will have 4 decks with 6 players, shuffle point at 156 cards (ie. 3 decks are dealt), 1 burn card at the start of each shoe, last card dealt is the holecard, no European No Hole Card rule, SP3 (split up to 3 times to 4 hands maximum), DAS, No RSA, one card to each split ace, DOA, no doubling on split aces, S17, No LS, dealer picks up the hands in the usual way -- from third base to first base, and the players will use the HiLo tags with the basic strategy and indices in generic.str. (Later, I will show you how to create your own .STR strategy files with any text editor). Players #2, #4, and #6 will use indices. It's also possible to have a player flat bet, whether or not he uses indices, but that is handled after the sim is completed, by ScoCalc, the Score Calculator. I will explain that when we get there. You may have noticed that I mushed past the two prompts with (INFINITY) as defaults. Those are simple, but I'll explain them later. Don't worry about them for now. The .BIN file in the prompt above, is the file that holds the results of your sim in the form of "bins," so ScoCalc can calculate win rate, average bet, variance, risk of ruin (ROR) and SCORE (a statistical term related to your hourly win rate) for whatever bet schedule and bankroll you choose. I elected to use the same name for my .BIN file as I used for my .SIM file. That helps keep me from mixing up my files. Later, if I want to use the same .SIM parameters for another sim, I can append numbers to the .BIN file names, such as 1stsim2, 1stsim3 etc. PowerSim always stores the name of the last .BIN file you use, so ScoCalc will default to your last simulation (though you always have the option to pick any .BIN file). For this first sim, you might want to chose a small number of rounds to get some results quickly. I chose 1000000 (one million rounds) which should take about 10 to 15 seconds on a 1 ghz computer. This represents about 10 years of very active play (so the results should be significant, if not extremely accurate), but you can chose 10 or 20 million, if you don't mind waiting a little longer. In fact, you can choose anything up to some 9 quintillion rounds! As a practical matter, on a modern PC you can generally do 10 billion rounds overnight while you sleep. While the sim is running, if you tap the Space bar, the program will halt with a display such as:Round 567412 was completed at: 1/1/2007 1:23:53A maximum of 188 cards were dealt from the shoe.Shoe check: 16 16 16 16 16 16 16 16 16 64Resume (Y/n) If you just press [Enter] your sim will resume, but if you press n [Enter] you will get this message:Bin data is being stored in 1stsim.binPress [Enter] to close You get this message any time a sim is completed. I hope you were patient enough to wait the whole 10 seconds to complete the sim. Now it's time to see some results! Press [Enter] to close the PowerSim window. (Once more, you cannot close this window by clicking on the upper right corner X-box as you can with most Windows programs. Clicking the upper right corner will simply minimize the window to your taskbar. The correct way to close this window is by hitting the [Enter] key.) Now double click on the ScoCalc.exe icon. Press [Enter] at the prompt to choose the default 1stsim.bin. (the last .BIN file you used). You will see:There are 6 players.Which will flat bet? (Default = none) 36 Enter the number(s) of the player(s) you'd like to flat bet for this analysis. I elected to have players 3 and 6 flat bet. Unless you chose to have all 6 players flat bet, you will now be prompted to enter your bets for each possible TC from -20 to +20. The Default is $1, and changes as soon as you enter a bet, to the last bet entered. A good ramp to try for this sim, is $10 for TC = 0 and below, then up in increments of $35 for each TC to a maximum of $200. $35, $70, $105, $140, $175, and $200 for TC = 6 and above. To enter this, in response to bet at -20 (/ for opt*, or Default = 1) press 10, followed by [Enter] 21 times, then 35 [Enter] 70 [Enter] 105 [Enter] 140 [Enter] 175 [ Enter] and 200 followed by 15 more [Enter]s . You will see:bet at -20 (/ for opt*, or Default = 1) 10bet at -19 (/ for opt*, or Default = 10) bet at -18 (/ for opt*, or Default = 10) bet at -17 (/ for opt*, or Default = 10) bet at -16 (/ for opt*, or Default = 10) bet at -15 (/ for opt*, or Default = 10) bet at -14 (/ for opt*, or Default = 10) bet at -13 (/ for opt*, or Default = 10) bet at -12 (/ for opt*, or Default = 10) bet at -11 (/ for opt*, or Default = 10) bet at -10 (/ for opt*, or Default = 10) bet at -9 (/ for opt*, or Default = 10) bet at -8 (/ for opt*, or Default = 10) bet at -7 (/ for opt*, or Default = 10) bet at -6 (/ for opt*, or Default = 10) bet at -5 (/ for opt*, or Default = 10) bet at -4 (/ for opt*, or Default = 10) bet at -3 (/ for opt*, or Default = 10) bet at -2 (/ for opt*, or Default = 10) bet at -1 (/ for opt*, or Default = 10) bet at 0 (/ for opt*, or Default = 10) bet at 1 (/ for opt*, or Default = 10) 35bet at 2 (/ for opt*, or Default = 35) 70bet at 3 (/ for opt*, or Default = 70) 105bet at 4 (/ for opt*, or Default = 105) 140bet at 5 (/ for opt*, or Default = 140) 175bet at 6 (/ for opt*, or Default = 175) 200bet at 7 (/ for opt*, or Default = 200) bet at 8 (/ for opt*, or Default = 200) bet at 9 (/ for opt*, or Default = 200) bet at 10 (/ for opt*, or Default = 200) bet at 11 (/ for opt*, or Default = 200) bet at 12 (/ for opt*, or Default = 200) bet at 13 (/ for opt*, or Default = 200) bet at 14 (/ for opt*, or Default = 200) bet at 15 (/ for opt*, or Default = 200) bet at 16 (/ for opt*, or Default = 200) bet at 17 (/ for opt*, or Default = 200) bet at 18 (/ for opt*, or Default = 200) bet at 19 (/ for opt*, or Default = 200) bet at 20 (/ for opt*, or Default = 200) 1000000 rounds were stored in bin0.bin Bankroll? (default = $10,000) If you press [Enter] just one more time, you are accepting the $10K bankroll default. (Naturally you have the ability to enter whatever bankroll you desire at this prompt.) For the 4d game outlined above, with 6 players, you will see the results for each player, numbered from 1 to 6. For Player 2, you should see something like this:2: $.46601/$31.302 = 1.488751% var = 4009.8 SCORE = 54.1585 ROR = .097847........Store these results to 1stsim.sim [Y/n](screen shot: ) [Note: To copy selected text from the console to the Windows clipboard, use Ctrl+Insert. (Again, this is different from the usual Windows convention.) Then you can Paste as you normally would (Control+V, Edit/Paste, or right click/Paste) to a Word or Notepad file. Or just press [Enter] and ScoCalc will store your results to the appropriate .SIM file.] Here's how to interpret the results: The first number you see is the player number followed by a colon. Then we have the win rate, in dollars per round. For example, in the screen shot above, we see that Player 2 had a win rate of $.46601, or just over 46 cents per round. This is divided by the Average Initial Bet (in this case $31.302 for Player 2) to give the percentage win rate of 1.488751%. The percentage win rate is followed by the variance in dollars squared per round. SCORE (DI squared) is then given, which can be calculated by the formula SCORE = 1,000,000 x (Win rate)^2 / variance. Note that SCORE is a function of the bet ramp you input and the quality of the game. Bankroll is not a factor. Finally, the ROR is output for whatever bankroll you input. The ROR represents the percentage of times you will go broke, if you play forever with the betting schedule you entered for this sim. (You don't have to play forever to feel safe. For example, if your ROR is 5% and you double your bankroll, your ROR will then be 0.05^2 = 0.25%, or one chance in 400 down from one chance in 20.) These are convenient units for expectation and variance because they are additive. In other words, if the expectation for one round is $0.50, the expectation for a hundred rounds is 100 x $0.50 = $50. Similarly, if the variance for one round is $$4,000, the variance for a thousand rounds is 1,000 x $$4,000 = $$4,000,000. The standard deviation, for a given number of rounds, is defined as the square root of the variance. Standard deviation is usually given in actual result units (such as the dollars and cents used here), just like the expectation, though in the blackjack world, it's not uncommon to refer to s.d. in terms of percent. If you want the percentage s.d., you divide the dollar s.d. by the average bet and multiply by 100%. A pocket calculator is helpful. For example, the s.d per round for Player 3 (a flat bettor) is SqRt($$132.783) = $11.52 . The percentage s.d. is ($11.52/$10) x 100% = 115.2% Any 1 million round sim you did will differ from mine considerably. In fact, as you can see, the individual players' results differed quite a bit in this one million round sim. Even players 2 and 4 were different, though they both used indices, and they both employed a bet ramp. This statistical flux tends to even out as you do longer and longer sims. Now it's time to open up your .SIM file to view your permanent simulation report! If you have not already done so, press [Enter] to save your results to 1stsim.sim. This will bring up the line:Enter another ramp? [Y/n] Press n [Enter] to close the ScoCalc program. Now let's open your .SIM file with Word for Windows or WordPad -- preferably WordPad. Here's how to get Windows to automatically open all your .SIM files with WordPad: First select a .SIM file (such as 1stsim.sim) with your left mouse button, then hold down the shift key while right clicking on it. Choose Open With... from the drop down menu. (With Windows XP, at this point you get a dialogue box. Choose the option to "Select the program from a list" and click OK.) Now, make sure there's a check in the box labeled "Always use this program ..." Then scroll down and select WordPad from the list and click OK. From now on, you can just double click on any .SIM file, and it will open in WordPad. You will see all the parameters you input, including number of decks, players, all the rules and even the tags for each individual card rank. Then there is a ****** separator line followed by raw data from your PowerSim simulation. This includes the name of the .BIN file, the seed used by the random number generator, the number of rounds and the time they were completed, the maximum number of cards dealt from any shoe in the sim, and finally, a complete list of the frequencies, win rates, and variances for each player at every True Count. You may or may not find the raw data very enlightening. But you should certainly be interested in the data below the next separator line. This is the data you ordered ScoCalc to copy for you. You can run ScoCalc as many times as you like with a given .BIN file, and you can run PowerSim as many times as you like with any .SIM file. The programs will continue to append data to the appropriate .SIM file. Each .BIN file "knows" what .SIM file created it, so data automatically goes to the right file. You can even edit input parameters in a .SIM file with WordPad. Say you were checking out a sim by letting PowerSim display the Hands after each round and the Shoe before each shuffle. Instead of inputting all those parameters again one line at a time (a boring, error prone process), you can just go in with WordPad and change the 1s after "Display hands:" and "Display shoes:" to 0s. (A one (1) generally means "yes" in the sim parameters, and a zero (0) means "no.") Then you just save the .SIM file, and use it for your next PowerSim simulation! In general, though, it's a good idea to keep separate .SIM files for really different sim parameters. You can always copy an old .SIM file, rename it, delete any old results after the ***** separator, and then use it as a template for a new sim.Optimal Bets and SCOREs: You can also have ScoCalc calculate precise optimal bets for you, in a given range of true counts. Just use the backslash key "/" for the bets you want optimized. In this case, you will be asked to enter a Risk Of Ruin, and the "hard bets" you enter will be scaled to match your chosen bankroll and ROR. You can also enter a zero (0) for any subset of true counts, to simulate "Wonging," or other bets at negative or positive counts to simulate cover betting strategies. Optimal bets are simply the bets that will give you the best possible SCORE for a given maximum to minimum bet ratio (excluding any zero non-bets), also known as a "bet spread." Here are two examples. These are based on a 2 billion round sim done with 4 players, 6 decks, cut card at 260 (5/6), one burn card, DAS (double after split) and S17 (dealer stands on soft 17). I've included the .SIM file for your inspection, which is named 6d2B.sim. PowerSim results were stored to 6d2B.bin.Example 1:.BIN file? [Default = 6d2B] 6d2BThere are 4 players.Which will flat bet? [Default = none] 1bet at -20 (/ for opt*, or Default = 1) bet at -19 (/ for opt*, or Default = 1) bet at -18 (/ for opt*, or Default = 1) bet at -17 (/ for opt*, or Default = 1) bet at -16 (/ for opt*, or Default = 1) /bet at -15 (/ for opt*, or Default = opt*) bet at -14 (/ for opt*, or Default = opt*) bet at -13 (/ for opt*, or Default = opt*) bet at -12 (/ for opt*, or Default = opt*) bet at -11 (/ for opt*, or Default = opt*) bet at -10 (/ for opt*, or Default = opt*) bet at -9 (/ for opt*, or Default = opt*) bet at -8 (/ for opt*, or Default = opt*) bet at -7 (/ for opt*, or Default = opt*) bet at -6 (/ for opt*, or Default = opt*) bet at -5 (/ for opt*, or Default = opt*) bet at -4 (/ for opt*, or Default = opt*) bet at -3 (/ for opt*, or Default = opt*) bet at -2 (/ for opt*, or Default = opt*) bet at -1 (/ for opt*, or Default = opt*) bet at 0 (/ for opt*, or Default = opt*) bet at 1 (/ for opt*, or Default = opt*) bet at 2 (/ for opt*, or Default = opt*) bet at 3 (/ for opt*, or Default = opt*) bet at 4 (/ for opt*, or Default = opt*) bet at 5 (/ for opt*, or Default = opt*) bet at 6 (/ for opt*, or Default = opt*) bet at 7 (/ for opt*, or Default = opt*) bet at 8 (/ for opt*, or Default = opt*) bet at 9 (/ for opt*, or Default = opt*) bet at 10 (/ for opt*, or Default = opt*) bet at 11 (/ for opt*, or Default = opt*) bet at 12 (/ for opt*, or Default = opt*) bet at 13 (/ for opt*, or Default = opt*) bet at 14 (/ for opt*, or Default = opt*) bet at 15 (/ for opt*, or Default = opt*) 16bet at 16 (/ for opt*, or Default = 16) bet at 17 (/ for opt*, or Default = 16) bet at 18 (/ for opt*, or Default = 16) bet at 19 (/ for opt*, or Default = 16) bet at 20 (/ for opt*, or Default = 16) 2000000000 rounds were stored in 6d2B.binBankroll? (default = $10,000) Risk Of Ruin? (default = 0.135335) Optimal bets for player 2:-20 7.50181-19 7.50181-18 7.50181-17 7.50181-16 7.50181*-15 7.50181*-14 7.50181*-13 7.50181*-12 7.50181*-11 7.50181*-10 7.50181*-9 7.50181*-8 7.50181*-7 7.50181*-6 7.50181*-5 7.50181*-4 7.50181*-3 7.50181*-2 7.50181*-1 7.50181* 0 7.50181* 1 30.3202* 2 67.0897* 3 102.795* 4 120.0289* 5 120.0289* 6 120.0289* 7 120.0289* 8 120.0289* 9 120.0289* 10 120.0289* 11 120.0289* 12 120.0289* 13 120.0289* 14 120.0289* 15 120.0289 16 120.0289 17 120.0289 18 120.0289 19 120.0289 20 120.0289Optimal bets for player 3:-20 7.58905-19 7.58905-18 7.58905-17 7.58905-16 7.58905*-15 7.58905*-14 7.58905*-13 7.58905*-12 7.58905*-11 7.58905*-10 7.58905*-9 7.58905*-8 7.58905*-7 7.58905*-6 7.58905*-5 7.58905*-4 7.58905*-3 7.58905*-2 7.58905*-1 7.58905* 0 7.58905* 1 29.1431* 2 66.9773* 3 101.3047* 4 121.4248* 5 121.4248* 6 121.4248* 7 121.4248* 8 121.4248* 9 121.4248* 10 121.4248* 11 121.4248* 12 121.4248* 13 121.4248* 14 121.4248* 15 121.4248 16 121.4248 17 121.4248 18 121.4248 19 121.4248 20 121.4248Optimal bets for player 4:-20 11.26792-19 11.26792-18 11.26792-17 11.26792-16 11.26792*-15 11.26792*-14 11.26792*-13 11.26792*-12 11.26792*-11 11.26792*-10 11.26792*-9 11.26792*-8 11.26792*-7 11.26792*-6 11.26792*-5 11.26792*-4 11.26792*-3 11.26792*-2 11.26792*-1 11.26792* 0 11.26792* 1 32.8728* 2 74.2183* 3 116.1111* 4 162.333* 5 180.287* 6 180.287* 7 180.287* 8 180.287* 9 180.287* 10 180.287* 11 180.287* 12 180.287* 13 180.287* 14 180.287* 15 180.287 16 180.287 17 180.287 18 180.287 19 180.287 20 180.2871: $-.0422275/$10 =-.422275% var = 133.18 ROR = 100%!!2: $.2209/$24.5047 = .901459% var = 2209 SCORE = 22.09 ROR = .1353353: $.220993/$24.4587 = .903535% var = 2209.93 SCORE = 22.0993 ROR = .1353354: $.394397/$31.7754 = 1.241199% var = 3943.97 SCORE = 39.4397 ROR = .135335 This optimizes a 16:1 spread. Note, the smallest bet I input was 1, and the largest was 16. These were "hard bets" input at TC = -20 to -17, and +15 to +20. A backslash was entered at TC = -16 (and repeated by default all the way up through +14) to tell ScoCalc to optimize bets at all those true counts. Taking Player #4 as an example, ScoCalc decided the correct size for your 1 unit bet is $11.26792, and the optimal size for your 16 unit bet is $180.287 (note: $11.26792 x 16 = $180.287). It also decided you should make the minimum bet up through TC = 0 and then bet 32.8728, 74.2183, 116.1111, 162.333 topping out with your max bet at TC = 5. This gives Player 4 a SCORE of $39.4397 for this game, comparable to the SCORE you can find on page 237 of Blackjack Attack ed. 3 for 5.0/6 S17 DAS PA Opt (1-16). I had players 1, 2 and 3 play basic in this sim, so their SCOREs are a little lower. In addition, I instructed ScoCalc to have player #1 flat bet.Example 2: The first example begs the question "how much would the game be improved by Wonging?" So -- let's enter a Wong type ramp!There are 4 players.Which will flat bet? [Default = none] 23bet at -20 (/ for opt*, or Default = 1) 0bet at -19 (/ for opt*, or Default = 0) bet at -18 (/ for opt*, or Default = 0) bet at -17 (/ for opt*, or Default = 0) bet at -16 (/ for opt*, or Default = 0) bet at -15 (/ for opt*, or Default = 0) bet at -14 (/ for opt*, or Default = 0) bet at -13 (/ for opt*, or Default = 0) bet at -12 (/ for opt*, or Default = 0) bet at -11 (/ for opt*, or Default = 0) bet at -10 (/ for opt*, or Default = 0) bet at -9 (/ for opt*, or Default = 0) bet at -8 (/ for opt*, or Default = 0) bet at -7 (/ for opt*, or Default = 0) bet at -6 (/ for opt*, or Default = 0) bet at -5 (/ for opt*, or Default = 0) bet at -4 (/ for opt*, or Default = 0) bet at -3 (/ for opt*, or Default = 0) bet at -2 (/ for opt*, or Default = 0) bet at -1 (/ for opt*, or Default = 0) bet at 0 (/ for opt*, or Default = 0) bet at 1 (/ for opt*, or Default = 0) bet at 2 (/ for opt*, or Default = 0) 1bet at 3 (/ for opt*, or Default = 1) /bet at 4 (/ for opt*, or Default = opt*) bet at 5 (/ for opt*, or Default = opt*) bet at 6 (/ for opt*, or Default = opt*) bet at 7 (/ for opt*, or Default = opt*) bet at 8 (/ for opt*, or Default = opt*) bet at 9 (/ for opt*, or Default = opt*) bet at 10 (/ for opt*, or Default = opt*) bet at 11 (/ for opt*, or Default = opt*) bet at 12 (/ for opt*, or Default = opt*) bet at 13 (/ for opt*, or Default = opt*) bet at 14 (/ for opt*, or Default = opt*) bet at 15 (/ for opt*, or Default = opt*) bet at 16 (/ for opt*, or Default = opt*) bet at 17 (/ for opt*, or Default = opt*) bet at 18 (/ for opt*, or Default = opt*) 4bet at 19 (/ for opt*, or Default = 4) bet at 20 (/ for opt*, or Default = 4) 2000000000 rounds were stored in 6d2B.binBankroll? (default = $10,000) 25000Risk Of Ruin? (default = 0.135335) 0.05Optimal bets for player 1:-20 0-19 0-18 0-17 0-16 0-15 0-14 0-13 0-12 0-11 0-10 0-9 0-8 0-7 0-6 0-5 0-4 0-3 0-2 0-1 0 0 0 1 0 2 125.7701 3 173.134* 4 229.946* 5 284.539* 6 332.038* 7 392.065* 8 447.326* 9 481.4* 10 503.08* 11 503.08* 12 503.08* 13 503.08* 14 503.08* 15 503.08* 16 503.08* 17 503.08* 18 503.08 19 503.08 20 503.08Optimal bets for player 4:-20 0-19 0-18 0-17 0-16 0-15 0-14 0-13 0-12 0-11 0-10 0-9 0-8 0-7 0-6 0-5 0-4 0-3 0-2 0-1 0 0 0 1 0 2 160.834 3 193.794* 4 270.941* 5 340.28* 6 418.781* 7 504.544* 8 579.168* 9 643.338* 10 643.338* 11 643.338* 12 643.338* 13 643.338* 14 643.338* 15 643.338* 16 643.338* 17 643.338* 18 643.338 19 643.338 20 643.3381: $.635111/$33.7127 = 1.883892% var = 10600.27 SCORE = 38.0525 ROR = .052: $-.042198/$10 =-.42198% var = 133.177 ROR = 100%!!3: $-.0420824/$10 =-.420824% var = 133.183 ROR = 100%!!4: $1.034891/$41.2051 = 2.51156% var = 17272.8 SCORE = 62.0051 ROR = .05 Note, at the input stage I entered zero (0) all the way up through TC = 1. then I entered 1 at TC = 2, the backslash "/" at TC = 3, then just [Enter] all the way up through TC = 17 (defaulting to optimal bets), then 4 at TC = 18, 19 and 20. This simulates Wonging with a 4:1 bet spread, and needs to be done carefully. The zeros, the 1 and the three 4s are all "hard bets." ScoCalc will not change them except to "scale" them to a particular ROR and bankroll. This is the way classical optimal betting theory works. In other words, the bets at TCs 18, 19 and 20 will turn out to be exactly four times as large as the bet at TC = 2, since I entered 4 at 18 through 20 and 1 at TC = 2. If you enter different "hard bets" at any stage, you will get different results, except that the 4 unit bet can be entered at pretty much any TC greater than 10, since (according to ScoCalc ) the max 4 unit bet kicks in at TC = 10. Your max bet will always be the maximum "hard bet" you input after scaling. Likewise, your minimum bet will always be the smallest non-zero "hard bet" you input. For example, if your smallest bet (other than 0) was 2.35 and the largest was 11.75, you will wind up with a 5:1 bet spread, whatever the actual dollar amounts, since 2.35 x 5 = 11.75. You may find this method of inputting optimal bets and/or hard bets a little confusing at first, but this system provides enormous flexibility. For example, suppose you want to test the effects of betting 1, 2 and 3 units at TCs -4, -5 and -6 respectively (raising your bet in the "wrong direction" for cover), and then Wonging out at all other negative counts while using an optimal 8:1 spread for positive counts. Many programs would reject these inputs, or would simply write over the bets at -4, -5 and -6 with zeros. Not so with ScoCalc. You can enter all that information, and optimal betting theory will provide you with the precise answer.Math Trivia: A SCORE (upper case) is simply the win rate you can expect in 100 rounds, if you use a bet ramp optimized to produce an ROR of 13.5335% on a bankroll of $10,000. (Please don't interpret this to mean an ROR of 13.5335% is in any way "optimal.") The SCORE shown is accurate, even though the bets shown are optimized for another bankroll and ROR (the ones you input). However, if you enter all "hard bets," then the bets are not optimized at all, and you should probably use the term DI squared or score (lower-case), instead of SCORE. You don't need to understand all this math to glean significant information from your use of Blackjack PowerSim. What you need to know is this: You can expect to make on average -- and with huge daily fluctuations -- your expected win rate per round, with the degree of risk stated to the bankroll stated. In other words, Player #1, using the bet ramp in the last example, can expect to make just over 63 and a half cents per round, with an 5% risk to a $25,000 bankroll. If he gets in 100 hands per hour, that translates into $63.51 an hour. The flip side of the 5% risk is that there's a 100% - 5% = 95% chance Player #1 will continue to play forever, eventually doubling and quadrupling his bankroll, while pulling in $63+ an hour (more, if he can get in more rounds per hour). Of course, you can't go into a real casino and bet $125.77 to $503.08. This is where inputting hard bets comes in handy. You will find that if you keep approximately the same bet sizes (rounding to the nearest dollar or five dollars) and take care to keep the same bet spread (4: 1, in this case, so you could bet $125 to $500), your win rate and ROR will come very close to the optimum fractions above. In the case of player #1, by inputting bets of $0 for TC from -20 to +1, then $125, $175, $230, $285, $330, $390, $450, $480, and finally $500 for TC = 10 and above, I got a win rate of $0.634821 with ROR 0.0499368 on the bankroll of $25,000. This is indistinguishable from the optimum results, for all practical purposes. Some professionals are uncomfortable with RORs as large as 5%. This is a matter of individual taste. If you want a lower ROR, you simply input the ROR desired during the optimal bet calculation. Your Obligation: Over 1,000 hours of development time, spanning over a period of 20 years, went into the creation of BJ PowerSim. You have received it free of charge. Now that you made it this far, you have only one obligation: to give me at least one comment of any kind -- good, bad or indifferent -- about your experience with PowerSim. Typical comments might be:Thanks, I liked it. Or ...Can't use it, not friendly to Windows. Or ...Couldn't get it installed on Windows ME. Or ...Got it installed, but couldn't figure out what to do with it. Or ...__ Fill in the blanks. A special user name and password have been set up so you can make comments quickly and anonymously on the site where you found this program. Point your browser to: www.blackjackforumonline.com and click on Forums then Log In as User: powersim and Password: temp Both User and Password are all lower case. This will give you the ability to post only in the Blackjack PowerSim Project Board. After you log in, just click on Forums > Blackjack PowerSim Project. You may read the posts there, and click on Post to make your comments. Your comments will help decide what direction to take in further developing BJ PowerSim. You may get a response, but you are not obligated to reply. You are also welcome to email me at: [email protected] . Your privacy will be respected.Details, Details: Now that you've come this far, you may wish to run a longer sim, or skip to the section on installing XBasic, or uninstall BJ PowerSim, quit blackjack forever and become a monk! But if you wish to continue, there are some details about the operation of PowerSim that will make your life easier. They are here for you when you need them. For example, changing counting systems or stategies will be discussed in more detail further down. For experts, the ultimate resource on BJ PowerSim is the source code. The source code is in the file PowerSim.x, and the file ScoCalc.x. Even if you don't download the XBasic programming environment, you can read these source files with Word or WordPad. Take care not to modify them in this fashion without first backing them up. To read PowerSim.x with WordPad, you can just open WordPad, and then Open PowerSim.x from the File menu by selecting All documents (".") from the drop down menu, then navigating to your PowerSim folder and selecting PowerSim.x. Alternately, without manually opening WordPad, you can highlight PowerSim.x with the left mouse button, then click the right mouse button while holding down the Shift key and select Open with ... Then scroll down to select WordPad and click OK.Files: You should have received the following files. Not all the extensions (letters after the dots) will necessarily appear in your PowerSim folder, depending on how your View Folder Options are setup. (Suggestion: you may want to uncheck the box that says "Hide filename extensions," or similar, in your View - Folder Options - View dialogue box.)- ReadMeFirst.txt A list of files in the zip folder, and instructions on how to open the instructions you are reading now.- BJ PowerSim Features.rtf A quick summary of the main features of BJ PowerSim.- BJ PowerSim Instructions.rtf The document you are reading now.- PowerSim.exe- ScoCalc .exe The two main program files.- PowerSim.x- ScoCalc.x Source code for the two programs.- PSDebug.exe- PSDebug.x- PSDebug Instructions.rtf Program, source and instructions for a patch to aid experts in debugging PowerSim.- PSRed.exe- PSRed.x Program and source for a version to simulate Arnold Snyder's Red-7 count.- 6d2B.sim A sample .SIM file produced by the optimal bet examples above.- GPL.txt Your General Public License for using and abusing BJ PowerSim. Briefly, BJ PowerSim is copyrighted, and you can't sue me. But you can copy, modify and recompile the source code as long as you make the results similarly open for public use. Refer to the License for details.- xb.dll This is the .dll file necessary to run compiled XBasic programs. If you want the option to run BJ PowerSim from any folder on your computer, you will want to put a copy of this file in your c:\Windows\System folder.- generic.str The generic, total-dependent strategy file. You can modify this to your liking with a text editor, such as NotePad or the DOS program Edit. Just be sure to make a copy for backup, and keep the symbols and numbers in the same columns as the original! More on this process later.- generic with ES.str The generic strategy file with Early Surrender included as basic strategy, plus three Early Surrender indices.- 2dH17DAS.str Another strategy file. Correct basic strategy and some indices for 2 decks with Double After Splits and the dealer Hits soft 17.- KO Preferred 6d.str- Red7shoeH17DASI18.str Strategy files for the two most popular unbalanced counts. The indices in these files refer to running counts, with IRCs set as recommended by their creators.- XBInstall.bat, XtoEXEInstall.bat, dupxbst.bat, XBas.txt, Shortcut to XBStart.bat.lnk, XRead.bat, XtoEXE.bat, XtoDLL.bat, and InstTest.x Beta support files to aid Windows users in the day to day use of the XBasic programming environment. Installation is explained below. In addition, PowerSim will generate the following files in normal operation:- .SIM files This holds all the input parameters of a simulation (rules, penetration, etc.) and all results that were created under those parameters in the form of a text file.- .BIN files This is where bin data is stored for the computer to read. It's how PowerSim communicates with ScoCalc.- LastBin PowerSim stores the same of the last .bin file used here, so ScoCalc knows what default to use.- XBas~x.reg and XBas~XBF.reg These files will be created only if you install XBasic, and the XBInstall.bat program finds it will need to overwrite some previous file associations in the registry. It will store the old file associations in these files, and also give you the option to abort.- XtoEXE.err and XtoDLL.err These files are created by XtoEXE.bat and XtoDLL.bat respectively, along with the required .EXE and .DLL files.Uninstalling PowerSim: Uninstalling BJ PowerSim is a simple matter of deleting the PowerSim folder from your desktop. If you don't want the option to reinstall, you can also delete the PowerSim.zip file you originally downloaded. If you also installed XBasic, it's easy to uninstall that as well through add/remove program in Control Panel. If you did Step 3) below, to create the shortcut on your desktop, just manually delete it.Infinite Options: Heh, heh. Just wanted an excuse to write that header. These are the two options with (INFINITY) defaults, not explained in Quick Start above:Maximum rounds per shoe (INFINITY) In pitch games, it's common in many casinos to deal a set number of rounds for a given number of players, eg. the "rule of 5" or "rule of 6." Also, when studying basic strategy, there is something called the "cut card effect," that increases the house edge a fraction of a percent. Hence, some simulators shuffle the shoe after every round to find the true "off the top" house edge. In either event, this option is useful. Set the penetration level to the maximum permitted, but enter an appropriate number of Maximum rounds per shoe. Eg. If you have three players at a single deck game with "rule of 6," you would enter the number 3 for Maximum rounds per shoe. If you are looking to find the "off the top" BS house edge, it can be proven it is not necessary to enter a 1 as the maximum. You can enter any number, as long as you make it very unlikely, or impossible, that a cut card will be reached. Note that Maximum rounds per shoe coexists with the cut card parameter. Both limits are in place. If you don't want the penetration level to interfere with max rounds, choose the maximum penetration level. If you don't want max rounds to interfere with the cut card, just choose INFINITY for max rounds by pressing [Enter].# rounds per dealer (INFINITY) In some casinos, each time a new dealer comes to the table he burns one card. This option lets you simulate this practice. Set the number to your best guess on the number of rounds each dealer gets before his replacement comes. If new dealers don't burn a card, press [Enter] to choose INFINITY. The BJ PowerSim defaults are set to Vegas Strip rules, commonly used as a benchmark by blackjack authors. Blackjack mavens would describe this as S17, DA2, no DAS, SPL3, no RSA, no Sur. Of course, insurance pays off at 2 to 1 and natural blackjacks pay 3 to 2, as God intended. The default for "How many rounds to Auto-play (1 - 2,147,483,647)?" is zero. However, if you press [Enter] by mistake don't panic. Just restart PowerSim, enter the name of your .SIM file, and you're good to go. The options to display hands or display shoes are included for debugging purposes. The numbers are output to the display teletype style -- there are no graphics of any kind in this release of BJ PowerSim. Hands collected before the end of a round are not displayed, but the totals are always shown.Custom Shoes This feature allows you to simulate situations with extra tens or aces in the shoe (eg. jokers at some casinos) or depleted decks, like Thorp used when he invented counting (see Beat The Dealer). Just enter zero (0) for Number of decks. You will still be prompted for penetration, although the default will be 0. Enter the desired penetration, taking into account the actual number of cards that will be in the shoe you create. Later, before the Rounds input, you will be prompted to create a custom shoe. You will enter the total number of aces, 2's, 3's etc. that you want. The default will be the number you put in for the previous rank, except for 10's, where the default will be four times the number of 9's input, since 10's also includes Jacks, Queens and Kings. It might be fun to do a sim with twice the number aces as in a regular shoe. I used to play a Radio Shack blackjack game that had that many aces, though you couldn't tell it from the instructions. I'm convinced some casino wrote that program to get non-counting suckers to believe they could win in real life.Unbalanced Counts: If you enter tags in response to the prompt:Count tag -- integer -256 to +255 -- for ace (default = hilo system) and the tags you enter for all ten ranks do not sum to zero (after multiplying the 10's tag by 4) PowerSim will detect that you've entered an unbalanced count, and will interpret the indices in your strategy file as running counts. In this case, you will be prompted for an Initial Running Count (IRC) which will be stored as part of the .SIM configuration. When you run ScoCalc with results from an unbalanced count, the true counts listed are actually running counts. If you wish to accurately simulate an unbalanced true count system, you will need to do a tiny bit of programming. All the elements are there in PowerSim, it's just a matter of mixing and matching. Don't hesitate to ask for help on the PowerSim Project board at www.blackjackforumonline.com . We'll get you set up very quickly. Included in versions 5 and 6 of PowerSim is the program PSRed. Run this program to simulate Arnold Snyder's famous Red-7 count. The I18 for shoe games is included in the file Red7shoeH17DASI18.str . Do not use .SIM files created with other counts with PSRed, as results would be meaningless. When running PSRed.exe with the show hands option on, you will see about half of the sevens represented as 97 instead of 7. Also, the ShoeCheck routine will show half as many sevens as you'd normally expect. This is so that half the sevens will have a tag of +1, and the other half will have the tag 0. The hand totals, and some other details, are handled correctly by using the MOD function. 97 MOD 90 = 7, whereas all other ranks are unaffected by appending MOD 90. The lines in PSRed.x that were added or modified from PowerSim.x are marked with the comment 'RS at the end, so you can find those lines easily with the XBasic edit/find function.Making your own .STR strategy files:(For testing different strategies and indices) Only five .STR files are included in this beta BJ PowerSim release, but others may quickly become available, as they are created by users. The basic strategy employed is the generic total-dependent basic recommended by Stanford Wong for Strip rules in his book Basic Blackjack. The indices included are the "Catch 22" indices popularized by Don Schlesinger. Any number of indices can be incorporated in a .STR file. If you press anything other than [Enter] (such as 0, -1, -2 etc.) in response to the Count tag -- integer -256 to +255 -- for ace (default = hilo system) prompt, you will get prompts for the count tags to apply for each of the remaining ranks, 2 through 10. Naturally, unless you enter the tags for hi-lo, this will entail a new set of indices, so you will need the information in this section. There are also basic strategy changes that need to be made if you play a game where the dealer hits soft 17, or where you can't double after splits, or if late surrender is offered. Currently, PowerSim does not support exotic "composition dependent" basic strategy plays. These can be programmed in by expert users, if desired, but a player using indices gets, as a rough guess, 95+% of the gain from composition dependent play. And the basic strategist who doesn't want to count, but wants to make exotic plays like "hit 12 v. 3, but stand on 12 v. 3 only in single deck when the hand has three or more cards, but only if those three are in the original hand, not a split hand" is a very odd duck indeed. The true counts employed by PowerSim are "floored," which means the running count is divided by the number of unseen cards remaining, then multiplied by 52 to get an index scaled to full deck, rather than half or quarter deck. Then the INT math function is used to get an integral index, which in Basic (as opposed to c++) is never higher than the exact fractional index. Examples of floored TCs:* RC = 20, unseen = 64, TC = INT(20/64 x 52) = INT(16.25) = 16 (nice to dream, isn't it?)* RC = 20, unseen = 65, TC = INT(20/65 x 52) = INT(16) = 16* RC = 20, unseen = 66, TC = INT(20/66 x 52) = INT(15.7575..) = 15* RC = -7, unseen = 122, TC = INT(-7/122 x 52) = INT (-2.9836) = -3* RC = -7, unseen = 118, TC = INT(-7/118 x 52) = INT(-3.0847) = -4 Choosing accuracy of decks remaining to nearest quarter deck, or nearest half deck was not done. Instead the fractional TC is precise and then floored. Again here, nearest 1/x deck accuracy could be written in by a programmer, and I would be glad to help, if this is desired. Doing the entire TC calculation "in line," rather than splitting it up into parts, guarantees the accuracy of this flooring technique, under the IEEE 754 floating point standard employed by XBasic. Another advantage is simplicity and readability of the source. A disadvantage is speed in execution. When you create a custom .str strategy file, I highly recommend you start with a copy of a .str file you already have, such as generic.str. Just right click on generic.str and select Copy, then right click on an open space in the same folder and select Paste. You should get a file named "Copy of generic.str" which you can rename to whatever you wish. Then open it with NotePad and edit away. [You can teach Windows to automatically open a .STR file with NotePad. First select a .STR file with your left mouse button, then hold down the shift key while right clicking on it. Choose Open With... from the drop down menu. (With Windows XP, at this point you get a dialogue box. Choose the option to "Select the program from a list" and click OK.) Make sure there's a check in the box labeled "Always use this program ..." Then scroll down and select NotePad from the list and click OK.] You should try to make the name of your .str file correspond with the strategy, or the game for which the strategy is fine tuned. Examples: nobust.str, copydlr.str, or 2dh17das.str. Long Windows filenames are permitted. You should get a proper basic strategy in place first, before you add indices. Once a proper basic strategy is in place, it should not be necessary to change it, in light of any indices you add. Basic should be correct, for plays with an index, in case you decide later to have some seats play basic. Also, plays with no indices in the .str file, depend on a correct basic strategy, even for players who use indices. The rule with basic strategy is this: Hit, Double, Split, and Surrender must be written as H, D, Sp, and Su, and they must be written into the exact columns you see in generic.str. Anything other than H, D, Sp and Su in those columns will be interpreted as Don't Hit, Don't Double, Don't Split or Don't Surrender. For example, if you put in sp (lower case "s") instead of Sp, that hand would never split as basic strategy. The order of decisions is: Early Surrender, Insurance, Split, Surrender, Double, Hit. All decisions should be correct for the total in question, even though you may not be thinking of the hand where that decision is important. For example, you normally want to Surrender hard 16 vs. T, but you also want to Split if it's 8-8, and you want to Hit, if you can't Surrender or Split. However, you will never want to double down. Assuming early surrender is not offered, the correct BS looks like this:hard 16 vs. T H - Sp Su -- . When early surrender is not available, it shouldn't appear anywhere in the strategy file. If Early surrender is available, it should look like this:hard 16 vs. T H - Sp Su ES . It's important for the columns and rows to stay lined up just as they are in generic.str. Eg. You can't have hard 2 vs. 2 come before hard 2 vs. A, and any Sp symbol must appear in columns 42 and 43. Indices must line up as well. For instance, the X3 in the rows for 8 vs. 5 and 8 vs.6 don't do anything, because they're not in the 2cnd, 3rd, or 4th space following the slash mark "-" where doubling would go, if doubling were basic strategy in this case. That's the general rule. Doubling indices come in the 2cnd, 3rd and 4th space following the D (doubling) BS column, surrender indices come in the 2cnd, 3rd and 4th spaces after the Su (surrender) BS column, etc. The X3s in the file are just there as a reminder for me to put a 3 in as a doubling index if I want to write a .STR file tailored for single deck. When you write in data, you need to delete the same number of spaces, so the columns remain lined up just as they are. When you are done, all the decimal points at the end of every line, should still be lined up in the 60th column. If you're unsure of where a piece of data should go, scroll down and see where similar data is placed already. There's really little chance of a mistake if you are careful, and you visually check your work. Here are some true statements about lines in a strategy file:- All the lines must be present and in the same order as the generic.str file.- Every line should have at least 60 characters including spaces (except for earlier versions, which are still compatible).- Letters are for basic strategy, numbers are for index players.- The numbers have no consequence for simulated basic players.- If an index is indicated for a decision, a simulated index player pays no attention to the letter for that decision.- If no index is present for a decision, index players play the same as basic players -- they use the letters. The rule with indices is "do positive action when TC >= index." Positive actions are stand (ie. Don't Hit), Double, Split, and Surrender. People get confused on the first one, because we tend to think that hitting is a positive action. And it is -- but not for the purpose of indices. Here are two examples of correct lines in a .str file and their interpretation:{Ex.1}hard 15 vs. T H 4 - -- Su 0 ES -2 . A player who does NOT use indices will always Hit this hand unless he can Early Surrender (first two cards). He will never Double and never Split. The Su and 0 surrender index actually have no effect here, because of the early surrender, but it's OK to leave them, just in case you choose to edit out the ES option for a future sim. A player who DOES use indices will Early Surrender if the true count is greater than or equal to -2. He will also Hit if he can't Surrender under the house rules (eg. more than two cards), if the true count is less than 4, and he will stand, if the true count is greater than or equal to 4.{Ex.2}hard 8 vs. 6 H D 3 Sp -4 -- -- . This is correct for a single deck S17 game with double after splits. The basic strategist will Split if he has a pair of fours, Double if he has 3-5 or 2-6, and Hit if he has three or four cards adding up to 8. He will never Surrender this hand. The player using indices will Split, if possible, any time TC >= -4. He will double, if splitting is not allowed (eg. 3-5, 2-6, or max splits has been reached) when TC >= +3. Finally, he will Hit, if neither Splitting nor Doubling apply (eg. TC = 0 with 3-5). He will never Surrender, and he will never stand. The last line in the .str file is for the Insurance Index. This can be a decimal fraction, such as 2.718, and may be placed anywhere on the line after Insurance Index: . If no index is given, the index defaults to +3, allowing compatibility with .str files created before I added this option. Insurance is not taken by simulated players who don't use indices (basic strategy players). The question has been raised as to why the strategy chart starts with Hard 2 vs. A, since you never get a hand with a hard 2. My desire was to create strategy charts as flexible as possible within the limits of a total dependant system. A player gets a hard 2 when he splits a pair of 2's. In some casinos, the first hit on a split pair isn't automatic. It's possible for situations to arise where you would not want that first hit, eg. on the basis of next card information. Thus, the program logic actually looks for the basic strategy, and/or an index, before making the decision to hit a hard 2. BJ PowerSim was culled from a program capable of making the decision not to hit a split 2, based on next card and hole card information. It's also quite possible to set up .STR files with poor strategies, such as never hitting a stiff, or mimicing the dealer's strategy. It can be fun to see how fast a poor strategy will lose. I'll be happy to double check any .STR files created by wonderful PowerSim users.Installing XBasic for Complete Programming and Simulation Flexibility: Many players will be satisfied with the features of BJ PowerSim as is, right out of the box. If that describes you, stop reading here and start simulating! You don't have the most powerful simulator on the market, but you have one with a heck of a benefit/cost ratio! There's an excellent chance it's the only simulator you'll ever need. But PowerSim is specifically designed for researching innovative blackjack strategies. To get really innovative, you will need to install and learn about XBasic, or seek the aid of others at http://www.blackjackforumonline.com who are willing to help. Programming requires a considerable investment in time at the console, and large doses of of patience and persistence. If you've never done any programming at all, XBasic may be a hard way to start because of the cryptic documentation, though the docs are better than any free BASIC compiler I've ever seen. QBasic was thoroughly documented, of course, but the free version of QB was only an interpreter (not a compiler). Still, beginners might want to consider a book like the highly rated Qbasic by Example by Greg Perry. QBasic is a recent ancestor of XBasic that you can get from any Windows 98 Installation CD in the Old MS-DOS folder. Another excellent option for budding BASIC programmers is "Just Basic," available at http://www.justbasic.com . It is completely free, and beautifully documented, but since it's not compiled it's far too slow for blackack simulations. Before you begin, if you use Windows 2000, Windows NT, Windows ME or Windows XP, you will need full administrator or "root user" privileges to program in XBasic. To find out if you have administrator privileges under Windows XP, first click Start. The name of your account is at the top of the Start screen. Then click Control Panel > User Accounts > User Accounts and make sure it says "Computer administrator" under the name of your account. If you are not an administrator, you will need to have an administrator set you up to be one. Since XBasic is free, the installation and support files are scattered around the internet. I've tried to take some of the frustration out of the installation process for you. The installation needs to be done in order. The Quick Start Installation instructions above is first, followed by 1), 2) and (optionally) 3) and 4) below. 3) and 4) are very helpful for Windows 98 and XP (home or Pro) but will not work for Windows Vista or Windows 7.1) Download the Self-installing .exe for the Win32 version of XBasic from the following site: http://xbasic.sourceforge.net/ (Detailed instructions:) It's the first download link that appears on the page. Choose the mirror site in North America (assuming you are in North America). When the download dialogue box appears, choose save, then when Save As pops up, push on the up arrow repeatedly so the file will save to your desktop. Once the download is complete, close the dialogue box and all other windows. Now double click on the xbasic-6.2.3.exe icon that appears on your desktop. Use the wizard to install XBasic. Click past the initial prompts and accept the user agreement. Do not use the default location for the folder where you want XBasic installed. Instead carefully type in C:\XB into that dialogue box. This location is necessary in order to use the automated batch files I've included.[Important note: If you are installing XBasic over a previous PowerSim XBasic installation, and you wish to save the old files, you should rename C:\XB\demo to something like C:\XB\oldDemo before double clicking on xbasic-6.2.3.exe.] [Note2: If you can not use your C: drive for XBasic, please contact me at [email protected], and I will try to set you up.] Click Next > Next > Install > Finish. You should now have the ability to open the XBasic PDE through your Start > Programs menu.2) Download the documentation from the following address: http://www.xbasic.org/download/xbhtml.zip (Detailed instructions:) Once again, download this to your desktop. You will need to have WinZip installed on your computer to open this. Double click on the xbhtml.zip icon, press Extract, make sure the All files box is checked, and Extract all files to your root directory. To do this, type C:\ (the backslash character) into the Extract to: box, where C: is the name of the drive where you have XBasic installed. Don't type C:\XB. If asked, enable "recreate directories." The zip file will automatically load the the XBasic html help files into C:\XB folder if you just type C:\ Close the WinZip window and continue.Special Batch Files: I created these optional batch files to assist you with the daily operation of XBasic. I hope you find them useful. If you're nervous about modifying your registry, you can skip step 4). These batch files have only been tested on Windows 98 and XP. They won't work in their current form for Vista or Windows 7. 3) This step gives you the ability to make a .EXE file with one double click, after you've debugged a program in the PDE. Ordinarily under XBasic, to make an EXE file you have to go into DOS and type several commands. (Modern programming languages typically have a "Make EXE" command in the PDE, but XBasic currently lacks this feature.) You will also gain the ability to right click on a .x file and choose "Read as Text" from the drop down menu. This copies the .x file to a file name XRead.doc, and then opens XRead.doc with whatever is associated with .doc files on your computer (generally Word or WordPad). This is a read only function. Any changes you make to XRead.doc will not be reflected in the .x file. Advanced users of XBasic also gain the ability to create .dll files through the right click menu. To add all these functions, just double click on the XBInstall.bat file (not XtoEXEInstall.bat) included in your PowerSim folder. In a black console window, you will see several "file(s) copied" messages and a line saying "New file associations created." followed by "Press any key to exit . . .". This puts all your PowerSim files in your \XB\demo folder for easy access, and sets up certain support files that make it much easier to work with XBasic. Press a key to close the window. [Note: This step modifies your file associations by importing some keys into your registry. If you have any applications that use files with the .X extension, it will show you the old registry keys and give you the option not to continue with that part of the installation. If these old file associations are important to you, carefully press Ctrl+Break when prompted and skip the next section on Testing Your Windows XBasic Setup. You can always come back and redo this step later.] 4) Drag "Shortcut to XBStart.bat" from your PowerSim folder to your desktop. If you previously completed steps 1) through 3), you should now have the ability to open the XBasic programming environment, including the PDE, the demo folder, and the html documentation, by simply double clicking on this shortcut. [Note: Under Windows 98, the first time you use this shortcut, the icon may change in appearance, and the (usually hidden) .lnk extension will change to .pif. This is normal; don't be concerned.] Testing The Special Batch Files: - First, double click on the Shortcut to XBStart.bat icon you put on the desktop in step 4). This should bring up four windows (sometimes you will get a 5th window for free).- Select the demo folder from your taskbar, and find a file in the folder called InstTest.x .- Double click on it. You should see some activity and a black box with some text ending with these two messages: InstTest.exe was created!Press any key to exit . . . Press any key to close the black window. Congratulations! You've just compiled your first XBasic program to a stand alone executable. This shows the batch files are working which allow you to double click on a valid .x file to create a .exe file and put it in the same folder. If you study the XBasic documentation, you will soon appreciate what a nice feature this is. While you still have your demo folder open, find the new file named InstTest.exe and double click on it. You should see a gray console box pop up with the message:Installation successful!Press [Enter] to close If this message comes up as expected, you have a very sweet XBasic setup. Sweeter, in my humble opinion, than the the setup dozens of people download each week from the internet. If you double click on InstTest.x a second time, XtoEXE will politely ask whether you want to overwrite the InstTest.exe file you just created. At this point, the only thing you need on your desktop to run, modify and test BJ PowerSim, is the Shortcut to XBStart.bat icon. You can run PowerSim.exe from the demo folder, so you no longer need the PowerSim folder on your desktop. But you may wish to leave it there for a while, just to feel safe. (You still have PowerSim.zip in case of emergencies.) *** XtoEXE ERROR MESSAGES *** If you did NOT see "INSTTEST.exe was created!" above, you may have received one of these two error messages:1) !! NO .exe CREATED !! You need to rename, move or delete the following files: (followed by a list of files) XtoEXE and XtoDLL use certain very unusual filenames whileprocessing. If any of these actually pre-exist in your demofolder, it won't overwrite them but will abort with the abovemessage. {any}.x~b and XB~Prog.{any} are the reserved filenames.2) ! nmake did not create a .EXE file ! You get this error when nmake could not create an executablefor any reason. You normally will get some errors in the grayconsole box from the XB.exe compiler before this error appears. Similar error messages may arise when creating a .DLL file. In addition, output from nmake and link are appended to the files XtoEXE.err and XtoDLL.err, to aid experts in debugging serious problems. The XBInstall, XBStart, XtoEXE and XtoDLL batch files are all beta. Post any comments or problems on www.blackjackforumonline.com in the Blackjack PowerSim Project discussion board.If You Were Unable To Complete Steps 3) and 4) Since I wrote the XtoEXE/XtoDLL batch files, I wish every XBasic user could have them. But technically, it is still possible to work with XBasic if you only got through steps 1) and 2) above. This just means you have the regular installation most people download from the internet. You already have the ability to open the XBasic PDE from the Start -> Programs menu. To open the XBasic docs, open My Computer > XB > html and look for a little 1KB file called index.htm . (Not index_x.htm.) It may help to Arrange Icons by Name to find it. Right click on index.htm and choose Create Shortcut. Drag the Shortcut to your desktop. Now you can double click on the Shortcut whenever you want to see the html documentation. You will need to study documentation from several sources quite carefully to create .EXE files. The explanation in the html docs (under advanced topics in the left frame) is dated, I'm afraid. Studying the XtoEXE.bat file in your PowerSim folder might be helpful. Here are two other sources on this topic:http://gnetools.sourceforge.net/xbsupport/viewpane_xbvars.htmlhttp://xbnotes.freehosting.net/make_exe.html With your installation complete, you are now ready to begin your journey into the wondrous world of XBasic programming. I hope your journey is a pleasant one. Happy programming!Learning The XBasic Programming Language I spent a month and a half testing other versions of BASIC for this project, including some that were inexpensive, but not free. Some highly rated free ones, with all the latest polymorphwhatever, turned out to be interpreted, or semi-interpreted, or lacked crucial variable types, so failed miserably in speed tests. And though Visual Basic programmers may be disappointed with the XBasic documentation, I can tell you it's far better than the docs that come with the other free or shareware BASIC compilers I've seen. We owe a real vote of thanks to Max Reason -- the genius who developed XBasic. The closest competitor was PureBasic, which is every bit as fast as c++, and extremely well documented. PureBasic ran about 5% faster than XBasic in one speed test, and a PureBasic devotee actually studied the assembly source and discovered the reason -- a detail about the way operands are loaded into registers for math operations. But the two languages were nearly identical in speed, and PureBasic costs about $80 USD. Plus, PureBasic lacks double precision floating point variables -- which is important if you need to use banks and handles instead of bins, eg. for progression testing. And it lacks ULONG variables, which are buggy in XBasic, but works well for the XORShift RNG currently implemented. XBasic also beat VB6 in my speed tests, and according to one XBasic guru, it beat PowerBasic in a speed test once upon a time. So if BJ PowerSim runs slow, it's not due to XBasic -- it's my programming. And XBasic has a GIANT data type -- which means we can just declare "bin"s, "freq"uencies and "rounds" to be GIANT and run simulations to 2^63 rounds (now implemented and tested). And it has COMPLEX numbers as a data type! (Hard to see how we can use that, but it's pretty cool, anyhow.) If you want to learn XBasic programming, here are some important resources:http://www.maxreason.com/software/xbasic/xbasic.htmlhttp://groups.yahoo.com/group/xbasic/http://www.xbasic.org/http://xbasic.sourceforge.net/ (Hint: If you enter XBasic into Google, as of 3/1/11, these are among the first ten sites that crop up.) You definitely want to join the user group at Yahoo if you get serious about XBasic at all. They can be a little cranky at times, but remember, they generously donate their talent and energy, and the archived posts and search function are invaluable resources. Ultimately, learning XBasic is the same as learning any programming language. You just jump in and write a very simple two or three line program, such as the one that prints "Hello World" or your name to the console. Then you slowly try more and more complicated tricks, such as printing your name 1,000 times, neatly spaced, making your program longer and longer, and more and more interesting. Read, try, fail, read some more, try again, rinse repeat.BJ PowerSim Program Notes: PowerSim.x is a rather hasty translation and upgrade from an old QBx (16 bit compiled QBasic) program. Therefore, it is kind of adrift between two different styles. Still, I feel the program is fairly clear and readable. The original program was written in BASCOM, back in the eighties, when modern structured key words like DO WHILE were not available. So -- you will sometimes see lines like "IF condition GOTO EndOfLoop." Nevertheless, I would argue the code is fairly well structured. It's trivial to change my old-fashioned constructs to the fashionable new ones. PowerSim was pruned from a large (one version was nearly 64K of source with no REMarks) program designed to test shuffle tracking strategies, including sequencing. For this reason, it does a thorough simulation of the actual procedure the dealer follows in dealing and playing out the hands. I consider this an asset worth retaining at the cost of some speed and consiseness. Once you familiarize yourself with the code, I believe this feature will simplify the process of testing, for example, the effects of dealer errors, or unusual procedures. I would council a "top down" approach to learning how PowerSim works. First, make sure you have a strong understanding of advantage play blackjack, including the vernacular that's developed around it. The internet, and the library at http://www.blackjackforumonline.com can be a great help here. Then master these user's instructions. Finally, tackle the code itself. Many of the variable and routine label names should be transparent to serious blackjack students. Variables are XLONG type, by default, ie. 32 bit signed integer. It may or may not be possible to speed execution by changing the many flag-type variables to smaller data types. The INLINE$ statements toward the beginning provide meanings for many variables. 0 always means "NO" or "FALSE" and 1 means "YES" or "TRUE," just as in Windows .INI files. Eg. when resplitAces = 1, that means the program will resplit aces if the .STR file recommends it. When resplitAces = 0, that means no ace resplitting allowed. Arrays are set up much larger than they strictly need to be. Remember, BJ PowerSim is specifically designed for researching unusual winning strategies, so some built in flexibility was deemed appropriate. A study of the opening variable declarations should reveal that we can sim shoes with up to 10 decks, and tables with up to 14 players, each with the ability to split to up to 10 hands. The third Bet dimension is to separately track any double down bet (so we can easily implement, for example, double for less strategies and isolate the results). The Hit, Spl, Dbl and Sur strategy arrays are indexed to 31 different player totals (10 soft totals, the rest hard) and 10 dealer upcards. The shoeChk[] array is just for a "quick and dirty" check on shuffling algorithms, to make sure no cards are lost. Note that aces are 1, in this program, and all tens and face cards are 10. The aceFlag array variable is either 0 or 10, depending on the absence or presence of an ace in that hand. The "hardTotal" for a hand counts all aces as 1. If a hardTotal is less than or equal to 11, then total is set equal to hardTotal + aceFlag. (I challenge you to devise a simpler system!) Although suit and face card distinctions are not made by PowerSim, it's actually quite easy to implement this. Since all changes to hand totals are made in the DealACard routine, all that's required is a few changes to the "Forming a New Shoe" and DealACard routines. In practice, I've found most any unusual rule can be tested by flagging the specified suit(s) by adding a constant to some among the rank(s) in question, and then using MOD constant for totaling in the DealACard routine. (See PSRed.x, for an excellent example, where constant = 90.) The heart of the program begins at the NewShoe routine. Note that once the first two cards have been dealt, there is a handsExtant variable set to the number of players. This is maintained to save the dealer from playing out his hand if all hands are resolved (busts or naturals) before the Holecard is exposed. This will need to be handled differently if spreading to two or more hands is permitted in the middle of a sim. The main loop, that controls the logic for play of the hands, begins FOR p = 1 TO players, at the beginning of the StartPlay routine. This is a long, complex loop. p obviously stands for the Player number. When play for a given player is finished, you will often see a GOTO NextPlayer command. NextPlayer is simply a label placed just before the NEXT p command. Much code is duplicated for A-A "Special Handling." I found this faster and more readable than continually checking a flag in the main loop to see if the first two cards were aces. After any split, the numHands[] array variable for that hand is updated. The hand currently being acted upon is handNum. For example, right after Player 2 splits an initial 3-3, numHands[2] = 2, but handNum = 1. Once play on handNum 1 is done, handNum 2 can begin (possibly resulting in another split). I only switched to the bins system -- to support multiple bet ramps for a single sim -- several months ago. I'm still calling extra double, split, insurance, etc. "bets." The program would probably go faster if we just put flags for each of these in one variable per player, but the present system should make it easy to go back to the old system, eg. to test progression strategies. I think I've set it up so updating the BetDecision module to reflect the progression, and uncommenting the lines marked with '$$$, is all that's required. This is untested. The program will also go faster if we just don't collect the hands into the discards. We really don't even need the discards for a random shuffle situation, but I've left it that way, so far, for educational purposes. Bets are often settled before the SettleBets routine, just as a real dealer often settles bets for busts and naturals before the regular settlement stage. This is why if handsExtant = 0, the program skips the SettleBets routine entirely. But note that every time money changes hands, control is passed to the Money routine. Please continue this tradition. It'll make your life simpler if you ever want to gather statistics on different sized bets. I would advise extreme caution when making changes -- particularly deletions of code which may seem superfluous -- within the StartPlay loop, the "Dealer Plays His Hand" routine, or the SettleBets routine. Be sure to check your logic by running sims identical to previous accurate ones, with the same starting seed, and several sets of rules. Because XBasic is a 32 bit compiler, and because it just compiles more efficient assembler code, it runs over 10 times as fast on Windows as the old QBx program "SimSimp" on the computers I've tested. Interesting to note though, that QBx SimSimp ran faster in 16 bit DOS mode, because it didn't use 32 bit instructions, and 16 bit instructions can run faster in 16 bit mode. Thus, on machines with both 16 bit and 32 bit modes available, 32 bit BJ PowerSim only runs 2.5 times faster than 16 bit SimSimp. But it doesn't matter, since nobody runs computers in 16 bit mode anymore. To the people who wrote to tell me they had modified SimSimp in QBasic and ran it in interpreted mode at dismal speeds (a few thousands rounds an hour??), because no compiler was legally available: Weeeeeeeeelll! Now you can play with a compiler!BJ PowerSim updates:8/8/05 Initial XBasic BJ PowerSim released under the name "SimSimp."8/11 Improved bounds checking in ScoCalc so ROR doesn't overflow for negative EVs.8/13 Fixed problem with long Windows file names for .cfg and .str files, and added more error checking to filename inputs.8/14 Fixed intermittent timing hang in XtoEXE.bat and XtoDLL.bat. Also improved the paths so they don't depend on c:\ as root, made the batch files more friendly to XP, added some helpful REMs, and improved error checking.8/14 Created new XB installation instructions, with new XBInstall and XBStart batch files. Full install with the XBSimp batch files should work on 98 through XP now. [Note: didn't work...]8/18 Improved XtoEXE.bat so long filenames don't refuse to become .EXE files, but instead compile to their short name equlvalents. The .exe file can then be renamed to match the .x file, if desired. The new system also improves error handling. Eg. If you double click on a .x file that already has a .exe file, you get a "duplicate filename" message, and the new .exe is stored to a~b~z.exe, which must be renamed before any more .exe files can be created. I wasn't able to accomplish this with DLL files, though. DLL files must have old fashioned, short, DOS filenames.9/3 Daily work on improving BJ PowerSim Instructions.doc.9/12 FINALLY got installation to work on both 98 and XP. Many thanks to Arnold for testing these procedures. Also improved XtoEXE.bat so you can see nmake messages in the console without sacrificing the Start /wait fix for the intermittent timing hang. Also wrote a regedit script that does the file association for XtoEXE.bat and XtoDLL.bat automatically. It also stores old file associations in two .reg files, and asks permission to overwrite them, if necessary. Nice, simple installation. Works for 98 and XP Home.9/22 Put in Early Surrender. You use the strategy file to put in ES versus 10 and/or Ace. ES is only in effect if the Surrender option is chosen in the .cfg file setup. If you don't need ES, the old strategy files still work.9/26 Put in the XORShift RNG with a period of 2^64 - 1, so 1.84 x 10^19 different random numbers can theoretically be chosen. It's trivial to make the period 2^96 or longer with XORShift, but 2^64 should be sufficient. If you could deal a billion cards per second, it would take 585 years to cycle through this RNG. For theoretical justification, see "Xorshift RNGs" Marsaglia, http://www.jstatsoft.org/v08/i14/xorshift.pdf11/12 Fixed another problem in the installation of the batch files (eg. XtoEXE) with XP Pro. Changed the instructions to reflect ths change.11/16 Added the Read as Text option for .x files.11/21 Added Uninstall instructions.11/25 Added the Insurance Index to the .str strategy file format. The Insurance Index may be a decimal, such as 3.123 . The index defaults to 3.0, if no index is given, giving compatibility with the old .str files.11/27 Added the European No Holecard option.11/29 Completely revised the input/output structure with editable .SIM files in place of the old .CFG file format. Autonumbering is replaced by a simpler "last .SCO file" system.11/30 Rewrote the instructions to reflect all the changes plus new screen shots.12/25 Put in the optimal bet calculations for ScoCalc. Changed the interpretation of a cut card to that used in BJA3, rather than BJRM and the old SBA. Fixed a bug found by OPPC wherein the insurance bet was never lost when the ENHC rule was in effect. Other cosmetic changes to PowerSim. Instructions updated.Jan/Feb 2006 Created PSDebug to aid in forever getting rid of the ENHC insurance bug. There is a separate SettleENHCBets routine now, that hopefully puts it to bed. Also fixed a problem when the seed input option is un-REMed in the source. Also added the custom shoe option, when you input zero (0) as the number of shoes and changed the default number of decks to 6.Aug 2006 Version 5: Finally cleaned up the variable naming conventions, so it's easy to distinguish variables from routine labels in the program. All variables now begin with a lower case letter, so all variables now appear in alphabetical order when you use XBasic's tracing functions.PowerSim now allows multiple strategy files for a sim -- one file per player. Compatibility with the old .SIM file format has been maintained.PowerSim and ScoCalc also now include complete alphabetical listing of variables with an explanation of their meanings. Some variable names were changed, and a few were expunged (folded into other variables).Also, beginning in August, PowerSim now supports unbalanced running counts. Default number of players is changed from 6 to 4, and default number of burncards is changed from zero to 1.Created PSRed.x to run sims of Arnold Snyder's Red-7 count. Half of the sevens in a shoe are distinguished as "red" or "black" (ranked as 7 or 97) and only the red sevens have a tag of +1. Thus, Red-7 is accurately simmed, unlike many other programs where Red-7 is only approximated by tagging all sevens as +0.5 .Also fixed a bug that rarely caused ScoCalc to output the wrong default .SCO file.1/1/07 PowerSim, PSDebug, PSRed, and ScoCalc are all now capable of running an infinite number of rounds, for all intents and purposes (over 9 quintillion, which would take something like a million years to run). This required a new file format for bin file communications, so I'm calling the new .SCO files ".BIN" to avoid confusion.Random number seed input is now supported without programming, and the batch files (eg. XtoEXE.bat) now work with any XBasic set up. Eg. XBasic can be installed (with the self-installing xbasic-6.2.3.exe) in C:\Program Files\XBasic, and you can still double click to make a .EXE file. (Believe me, it's a challenge to get batch files working with long Windows path names accross different versions of Windows.) Also, Xto