You are on page 1of 51

BJ PowerSim User's Instructions

copyright 2011 ET Fan 3 1 11

Intro!uction
"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 ' edition !t's as true today as when Dr. Thorp penned it forty years ago. !n"estigators tirelessly pursue new strategies to try to impro"e their odds of winning at blac#$ac#. %or e&ample' () When *+ had a ,uestion about the ad"antage associated with a -ero count four dec#s into a si& dec# shoe "ersus the e" at the top of a two dec#er, he as#ed .en %uchs to whip up a custom "ersion of his blac#$ac# simulator to cran# out the answer. /) When 0tanford Wong wanted to #now how much the casinos were gi"ing away by handing out coupons that could be parlayed as an ace, he $ust inserted a few new lines into his sim program. 1e "patched the source" so the player got an ace e"ery hand. 2) 3ater, when yours truly was studying ace location techni,ues, ! found ! couldn't use Wong's figures. !t turns out that a coupon is different from ta#ing an ace from the shoe, since that ace would no longer be a"ailable for the rest of the hand. 4o problem5 ! simply rigged my own home6brewed simulator to swap an ace from the shoe to player number one 6 hand after hand. The story is always the same. To do serious gaming research you need to do your own programming. "1a"e source code will tra"el," has always been my motto. 4ow, not e"eryone is cut out to be a programmer. But an open source simulator is a big plus e"en for nonprogrammers. !t adds a le"el of Trust to #now do-ens of people are pouring o"er the code, so there's a high

probability the code is re"ia#"e 7any mista#es will be found and corrected ,uic#ly) and honest 7it does what it claims to do). +nd no where is Trust with a capital "T" more important than in a blac#$ac# simulator. 0o what if a programmer made the source code to a top notch simulator program a"ailable to the general public8 One that's useful "right out of the bo&" to nonprogrammers, yet easily "erifiable and modifiable to programmers8 +nd what if he wrote it in 9Basic, a fast, free, easy6to6read, greatly6respected compiler freely a"ailable on the internet8 Would this be TOO :;<1 <O:=;TE> =OWE> in the hands of the s,ualid masses88 We're about to find out5 Blac#$ac# =ower0im is an open source blac#$ac# 0!:ulator program with an emphasis on 0!:=licity and readability. The concept is to pro"ide a serious research tool, and a fast free sim program together in one pac#age. This is for card counters who ha"e already read a boo# or two, and are interested in doing simulations for original research, or to confirm some of the numbers they'"e seen. ?ou won't find any eye6 popping graphics here, nor any rare, e&otic features. That would defeat the purpose by muddying the source with ugly "spaghetti code." !f you want an e&otic option, as# someone on www.blac#$ac#forumonline.com to program it for you, or program it yourself5 That's the precept dri"ing =ower0im 6 to encourage independent research and eliminate the need to "rein"ent the wheel" before you get to first base 7to mi& metaphors). >ight out of the bo&, B* =ower0im pro"ides fast simulation of many different rule "ariations and counting strategies. But to a B+0!< programmer, B* =ower0im 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. <ode simplifying tric#s 7li#e settling busts and naturals after a round is finished, instead of right away when they occur) ha"e been a"oided. This will ease the tas# of maintaining the source through the many re"isions en"isioned for the future. Blac#$ac# =ower0im is also a great "argument stopper." When someone claims that card counting is $ust a bunch of hooey, show him some =ower0im sim results. Then, if he sings the old song "!t's $ust not the same as in a real casino" 66 show him the source code, and tell him to ma#e a list of the logic errors. 7Don't do this if he owes you money 66 he may decide to s#ip town.)

The time for e&cuses is o"er5 +nyone who's e"er ta#en a remedial computing course has programmed a few lines in B+0!<. Want to test that supernatural progression you'"e been pondering, or that new rule at the Trop where the @ of clubs is wild8 With =ower0im, the possibilities are endless5 <O:=;TE> =OWE> TO T1E =EO=3E555

$am#"ing %arning
Aambling is dangerous. :ost people who gamble regularly would be better off if they'd ne"er set foot in a casino. 0ometimes people reali-e this, but sadly that reali-ation comes too late. They become hoo#ed and unable to cope with withdrawal from the hypnotic spinning lights and soothing green felt. This software is for those few indi"iduals with the discipline and attitude re,uired to learn ad"antage play so as to beat the casinos at their own game. This re,uires many hours of practice, the ability to thin# outside the bo&, and a capacity to delay gratification 66 things incompatible with a typical gambler mentality. 0ome heartfelt words of warning' !f you ha"e any doubt about your ability to do what it ta#es 66 stay away &rom casinos' E"en if you put in the long hours, dutifully calculate your mathematical edge, and culti"ate a healthy respect for >is# Of >uin, there's a good chance you'll still lose. ?ou may be cheated. That's right 66 the casinos so re"ile your ability to turn the tables around on 'em, that they'll stoop to sleight of hand, shorting shoes, or e"en shorting the payoffs when your bac# is turned. ?ou don't want to thin# ill of your fellow man. 4aturally, most casino personnel are as honest as the day is long. ?ou may play for months without meeting a cheat. But it only ta#es an occassional bad apple to turn all the simulations and probability charts into confetti. +nd forget about legal recourse. ?ou 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 bac#, and watch your wallet.

(uic) Start

Insta""ation*
These are the instructions to install this beta "ersion of Blac#$ac# =ower0im for Windows on your computer, so you can start using =ower0im immediately. "Beta" means it hasn't been tested on a wide "ariety of machines with different "ersions 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. ?ou're downloading and running this software at your own ris#. We solicit your help in finding bugs, and suggesting impro"ements. !f you're a programmer, and want to ta#e a crac# at modifying B* =ower0im for an unusual rule or strategy, you will also want to install the 9Basic programming en"ironment. This will be co"ered later. E"en ine&perienced programmers may find hac#ing 7in the good sense of the word) B* =ower0im to be a positi"e learning e&perience. ?ou must ha"e the ability to e&tract -ip files to install B* =ower0im. This comes built in to Windows 9=, and most other computers ha"e WinBip installed. 0imply download =ower0im " .-ip to your des#top, double clic# on it, and e&tract it to your des#top. !f you're using WinBip, ma#e sure the +ll files' bo& is chec#ed before you e&tract. This will create a folder named "=ower0im " " on your des#top. Once you ha"e the =ower0im " folder, you can mo"e =ower0im " .-ip to your :y =rograms folder, or any place on your computer for safe #eeping. 4ow you're ready to roll. !f you ne"er operated a computer before Windows appeared on the scene, B* =ower0im may re,uire a little ad$ustment. !t has a DO06li#e line at a time interface. But hang in there5 :any people find this approach easier to use for this type of program. 4ote' !f you're upgrading =ower0im from a pre"ious "ersion, you will want to #eep your old =ower0im " & folder if you ha"e any important .0<O files. Cersion of =ower0im and 0co<alc use a new .B!4 file format to support simulations o"er the old / billion round limit. 1owe"er, you can still use old .0!: or .0T> files going bac# to "ersion /. !f you install 9Basic o"er a pre"ious installation, 9B!nstall will write o"er the old =ower0im files in the <'D9BDdemo folder. !f you wish to sa"e

the old files, you should rename <'D9BDdemo to something li#e <'D9BDoldDemo, and then completely reinstall 9Basic as described below, starting with running &basic6 ./.2.e&e.

+unning B"ac),ac) PowerSim*


To start =ower0im, please double clic# on the =ower0im folder you now ha"e on your des#top, then double clic# on the =ower0im.e&e icon inside. ?ou will be presented with a screen li#e this' (screen shot:)

***** Welcome to Blackjack PowerSim ***** The eminently hackable, patchable, open source blackjack simulator Input a seed (0 !,"#!,#$%,"#&, de'ault ( timer)

EOne or two .sim files !'"e includedF


*ame o' +SI, simulation 'ile -stsim

! pressed EEnterF in response to the "!nput a seed" cue, so =ower0im pic#ed a seed based on the timer. + .0!: file is a file type ! created to store the input and output parameters of your simulations. 0ince this is your first simulation, enter any name of your choice and press EEnterF. ! chose "(stsim" for my first simulation file. 0ince this is a new .0!: filename, B* =ower0im will respond with the message'
.reatin/ a new +SI, simulation 'ile0

!f you had entered the name of a .0!: file that already e&ists, =ower0im

would use the input parameters from that file. 4e&t, you will see a range of options 66 one line at a time 66 that should loo# something li#e this'
*umber o' decks (de'ault($) ! 1 players (!) $ Shu''le point (- "02, de'ault ( -&$) ,a3imum rounds per shoe (I*4I*IT5) 1 burn cards per shoe (-) 1 rounds per dealer (I*4I*IT5) 6ast card dealt hole card or upcard (78u) 9uropean *o 7ole .ard (*8y) Split to a ma3imum o' how many hands (" -0 de'ault(!) :ouble a'ter splits on non aces (58n) ;esplit aces (*8y) 93tra hits allowed on split aces (*8y) :ouble on hard -0 or -- only (*8y) :oublin/ allowed on split aces (*8y) :ealer hits so't -% (*8y) Surrender o''ered (*8y) :ealer picks up hands 'rom 6ast player to 'irst, or 'irst to last (68') .ount ta/ inte/er "&$ to <"&& 'or ace (de'ault ( hilo system) ** 7i6o ta/s enabled ** /eneric with 9S+str /eneric+str "d7-%:=S+str >? Pre'erred $d+str ;ed%shoe7-%:=SI-2+str +ST; strate/y 'ile 'or player - (/eneric) +ST; strate/y 'ile 'or player " (/eneric+str) +ST; strate/y 'ile 'or player @ (/eneric+str) +ST; strate/y 'ile 'or player ! (/eneric+str) +ST; strate/y 'ile 'or player & (/eneric+str) +ST; strate/y 'ile 'or player $ (/eneric+str) Will Will Will Will Will Player Player Player Player Player - use indicesA (58n) n " use indicesA (58n) @ use indicesA (58n) n ! use indicesA (58n) & use indicesA (58n) n

Will Player $ use indicesA (58n) :isplay indiBidual hands (*8y) :isplay shoe and discards be'ore shu''lin/ (*8y) *ame o' +BI* 'ile -stsim 7ow many rounds to auto play (- #,""@,@%",0@$,2&!,%%&,20%) -000000 6aunchin/ Simulation =tC -8-8"00% -C"@C!& ;ound -000000 was completed atC -8-8"00% -C"@C&% = ma3imum o' -2# cards were dealt 'rom the shoe+ Shoe checkC -$ -$ -$ -$ -$ -$ -$ -$ -$ $! Bin data is bein/ stored in -stsim+bin Press D9nterE to close

!n each case, the defaults are shown in parentheses after the prompt. %or e&ample, if you $ust press EEnterF after the G players prompt, you will get H players per round for that sim. %or a prompt li#e' Dealer hits soft (I 74Jy), if you #ey in anything other than a lower case "y" 7without the ,uotes), the dealer will 4ot hit soft (I 66 in other words, you will be simulating 0(I 70tand on 0oft (I). On the other hand, if 7and only if) you press y EEnterF, the dealer will hit soft (I. E4ote' the abo"e display is for the latest "ersion . 0ome of the defaults ha"e changed from earlier "ersions, but .0!: files from "ersions / through K are still compatible.F %or another e&ample, if you press anything other than a lower case "u" in response to' "3ast card dealt hole card or upcard 71Ju)," the 1ole card will be the last card dealt on each round 66 which is the normal procedure in most casinos. The fact that the "1" comes first, and is capitali-ed, is your cue that the program will default to 1olecard for this option when you press anything other than the alternate option' u EEnterF. !f you ma#e a mista#e at any time, you can use the bac#space #ey before you press EEnterF, or you can press <trlLBrea# if you wish, to abort the program and start o"er. ?ou can e"en use <trlLBrea# after the simulation is running, but it's better to hit 0pace, followed by n, in response to the >esume 7?Jn) ,uery. !f you $ust abort with <trlLBrea#, your partial sim results will not be stored.

4ote that clic#ing on the upper right hand corner of the <onsole bo& does not close the window, as it does with most programs. That's because 9Basic was de"eloped on a ;ni& wor# station running under something called 9Windows. This was the mid eighties, lads and lasses, before :0 Windows e"en e&isted. The con"entions to which we'"e grown accustomed are not car"ed in stone. !f you loo# closely at the =ower0im screen ! copied abo"e, you will see that ! chose the defaults in most cases, but ! entered H, for the number of dec#s and for number of players, plus ! ha"e some of the players using indices, and some $ust playing basic strategy. 0o for the simulation abo"e, we will ha"e H dec#s with players, shuffle point at (K cards 7ie. 2 dec#s are dealt), ( burn card at the start of each shoe, last card dealt is the holecard, no European 4o 1ole <ard rule, 0=2 7split up to 2 times to H hands ma&imum), D+0, 4o >0+, one card to each split ace, DO+, no doubling on split aces, 0(I, 4o 30, dealer pic#s up the hands in the usual way 66 from third base to first base, and the players will use the 1i3o tags with the basic strategy and indices in generic.str. 73ater, ! will show you how to create your own .0T> strategy files with any te&t editor). =layers G/, GH, and G will use indices. !t's also possible to ha"e a player flat bet, whether or not he uses indices, but that is handled after the sim is completed, by 0co<alc, the 0core <alculator. ! will e&plain that when we get there. ?ou may ha"e noticed that ! mushed past the two prompts with 7!4%!4!T?) as defaults. Those are simple, but !'ll e&plain them later. Don't worry about them for now. The .B!4 file in the prompt abo"e, is the file that holds the results of your sim in the form of "bins," so 0co<alc can calculate win rate, a"erage bet, "ariance, ris# of ruin 7>O>) and 0<O>E 7a statistical term related to your hourly win rate) for whate"er bet schedule and ban#roll you choose. ! elected to use the same name for my .B!4 file as ! used for my .0!: file. That helps #eep me from mi&ing up my files. 3ater, if ! want to use the same .0!: parameters for another sim, ! can append numbers to the .B!4 file names, such as (stsim/, (stsim2 etc. =ower0im always stores the name of the last .B!4 file you use, so 0co<alc will default to your last simulation 7though you always ha"e the option to pic# any .B!4 file).

%or this first sim, you might want to chose a small number of rounds to get some results ,uic#ly. ! chose (MMMMMM 7one million rounds) which should ta#e about (M to (K seconds on a ( gh- computer. This represents about (M years of "ery acti"e play 7so the results should be significant, if not e&tremely accurate), but you can chose (M or /M million, if you don't mind waiting a little longer. !n fact, you can choose anything up to some N ,uintillion rounds5 +s a practical matter, on a modern =< you can generally do (M billion rounds o"ernight while you sleep. While the sim is running, if you tap the 0pace bar, the program will halt with a display such as'
;ound &$%!-" was completed atC -8-8"00% -C"@C&@ = ma3imum o' -22 cards were dealt 'rom the shoe+ Shoe checkC -$ -$ -$ -$ -$ -$ -$ -$ -$ $! ;esume (58n)

!f you $ust press EEnterF your sim will resume, but if you press n EEnterF you will get this message'
Bin data is bein/ stored in -stsim+bin Press D9nterE to close

?ou get this message any time a sim is completed. ! hope you were patient enough to wait the whole (M seconds to complete the sim. 4ow it's time to see some results5 =ress EEnterF to close the =ower0im window. 7Once more, you cannot close this window by clic#ing on the upper right corner 96bo& as you can with most Windows programs. <lic#ing the upper right corner will simply minimi-e the window to your tas#bar. The correct way to close this window is by hitting the EEnterF #ey.) 4ow double clic# on the 0co<alc.e&e icon. =ress EEnterF at the prompt to choose the default (stsim.bin. 7the last .B!4 file you used). ?ou will see'
There are $ players+ Which will 'lat betA (:e'ault ( none) @$

Enter the number7s) of the player7s) you'd li#e to flat bet for this analysis. ! elected to ha"e players 2 and flat bet. ;nless you chose to ha"e all players flat bet, you will now be prompted

to enter your bets for each possible T< from 6/M to L/M. The Default is O(, and changes as soon as you enter a bet, to the last bet entered. + good ramp to try for this sim, is O(M for T< P M and below, then up in increments of O2K for each T< to a ma&imum of O/MM. O2K, OIM, O(MK, O(HM, O(IK, and O/MM for T< P and abo"e. To enter this, in response to bet at "0 (8 'or opt*, or :e'ault ( -) press (M, followed by EEnterF /( times, then 2K EEnterF IM EEnterF (MK EEnterF (HM EEnterF (IK E EnterF and /MM followed by (K more EEnterFs . ?ou will see'
bet bet bet bet bet bet bet bet bet bet bet bet bet bet bet bet bet bet bet bet bet bet bet bet bet bet bet bet bet at at at at at at at at at at at at at at at at at at at at at at at at at at at at at "0 (8 'or opt*, or :e'ault ( -) -0 -# (8 'or opt*, or :e'ault ( -0) -2 (8 'or opt*, or :e'ault ( -0) -% (8 'or opt*, or :e'ault ( -0) -$ (8 'or opt*, or :e'ault ( -0) -& (8 'or opt*, or :e'ault ( -0) -! (8 'or opt*, or :e'ault ( -0) -@ (8 'or opt*, or :e'ault ( -0) -" (8 'or opt*, or :e'ault ( -0) -- (8 'or opt*, or :e'ault ( -0) -0 (8 'or opt*, or :e'ault ( -0) # (8 'or opt*, or :e'ault ( -0) 2 (8 'or opt*, or :e'ault ( -0) % (8 'or opt*, or :e'ault ( -0) $ (8 'or opt*, or :e'ault ( -0) & (8 'or opt*, or :e'ault ( -0) ! (8 'or opt*, or :e'ault ( -0) @ (8 'or opt*, or :e'ault ( -0) " (8 'or opt*, or :e'ault ( -0) - (8 'or opt*, or :e'ault ( -0) 0 (8 'or opt*, or :e'ault ( -0) - (8 'or opt*, or :e'ault ( -0) @& " (8 'or opt*, or :e'ault ( @&) %0 @ (8 'or opt*, or :e'ault ( %0) -0& ! (8 'or opt*, or :e'ault ( -0&) -!0 & (8 'or opt*, or :e'ault ( -!0) -%& $ (8 'or opt*, or :e'ault ( -%&) "00 % (8 'or opt*, or :e'ault ( "00) 2 (8 'or opt*, or :e'ault ( "00)

bet bet bet bet bet bet bet bet bet bet bet bet

at at at at at at at at at at at at

# (8 'or opt*, or :e'ault ( "00) -0 (8 'or opt*, or :e'ault ( "00) -- (8 'or opt*, or :e'ault ( "00) -" (8 'or opt*, or :e'ault ( "00) -@ (8 'or opt*, or :e'ault ( "00) -! (8 'or opt*, or :e'ault ( "00) -& (8 'or opt*, or :e'ault ( "00) -$ (8 'or opt*, or :e'ault ( "00) -% (8 'or opt*, or :e'ault ( "00) -2 (8 'or opt*, or :e'ault ( "00) -# (8 'or opt*, or :e'ault ( "00) "0 (8 'or opt*, or :e'ault ( "00)

-000000 rounds were stored in bin0+bin BankrollA (de'ault ( F-0,000)

!f you press EEnterF $ust one more time, you are accepting the O(M. ban#roll default. 74aturally you ha"e the ability to enter whate"er ban#roll you desire at this prompt.) %or the Hd game outlined abo"e, with players, you will see the results for each player, numbered from ( to . %or =layer /, you should see something li#e this'
"C F+!$$0-8F@-+@0" ( -+!22%&-G Bar ( !00#+2 S.?;9 ( &!+-&2& ;?; ( + 0#%2!% ++++ ++++ Store these results to -stsim+sim D58nE

(screen shot: )

E4ote' To copy selected te&t from the console to the Windows clipboard, use <trlL!nsert. 7+gain, this is different from the usual Windows con"ention.) Then you can =aste as you normally would 7<ontrolLC, EditJ=aste, or right clic#J=aste) to a Word or 4otepad file. Or $ust press EEnterF and 0co<alc will store your results to the appropriate .0!: file.F 1ere's how to interpret the results' The first number you see is the player number followed by a colon. Then we ha"e the win rate, in dollars per round. %or e&ample, in the screen shot abo"e, we see that =layer / had a win rate of O.H M(, or $ust o"er H cents per round. This is di"ided by the +"erage !nitial Bet 7in this case O2(.2M/ for =layer /) to gi"e the percentage win rate of (.H@@IK(Q. The percentage win rate is followed by the "ariance in dollars s,uared per round. 0<O>E 7D! s,uared) is then gi"en, which can be calculated by the formula 0<O>E P (,MMM,MMM & 7Win rate)R/ J "ariance. 4ote that 0<O>E is a function of the bet ramp you input and the ,uality of the game. Ban#roll is not a factor. %inally, the >O> is output for whate"er ban#roll you input. The >O> represents the percentage of times you will go bro#e, if you play fore"er with the betting schedule you entered for this sim. 7?ou don't ha"e to play fore"er to feel safe. %or e&ample, if your >O> is KQ and you double your ban#roll, your >O> will then be M.MKR/ P M./KQ, or one chance in HMM down from one chance in /M.) These are con"enient units for e&pectation and "ariance because they are additi"e. !n other words, if the e&pectation for one round is OM.KM, the e&pectation for a hundred rounds is (MM & OM.KM P OKM. 0imilarly, if the "ariance for one round is OOH,MMM, the "ariance for a thousand rounds is (,MMM & OOH,MMM P OOH,MMM,MMM. The standard de"iation, for a gi"en number of rounds, is defined as the s,uare root of the "ariance. 0tandard de"iation is usually gi"en in actual result units 7such as the dollars and cents used here), $ust li#e the e&pectation, though in the blac#$ac# world, it's not uncommon to refer to s.d. in terms of percent. !f you want the percentage s.d., you di"ide the dollar s.d. by the a"erage bet and multiply by (MMQ. + poc#et calculator is helpful. %or e&ample, the s.d per round for =layer 2 7a flat bettor) is 0,>t7OO(2/.I@2) P O((.K/ . The percentage s.d. is 7O((.K/JO(M) & (MMQ P ((K./Q

+ny ( million round sim you did will differ from mine considerably. !n fact, as you can see, the indi"idual players' results differed ,uite a bit in this one million round sim. E"en players / and H were different, though they both used indices, and they both employed a bet ramp. This statistical flu& tends to e"en out as you do longer and longer sims. 4ow it's time to open up your .0!: file to "iew your permanent simulation report5 !f you ha"e not already done so, press EEnterF to sa"e your results to (stsim.sim. This will bring up the line'
9nter another rampA D58nE

=ress n EEnterF to close the 0co<alc program. 4ow let's open your .0!: file with Word for Windows or Word=ad 66 preferably Word=ad. 1ere's how to get Windows to automatically open all your .0!: files with Word=ad' %irst select a .0!: file 7such as (stsim.sim) with your left mouse button, then hold down the shift #ey while right clic#ing on it. <hoose Open With... from the drop down menu. 7With Windows 9=, at this point you get a dialogue bo&. <hoose the option to "0elect the program from a list" and clic# O..) 4ow, ma#e sure there's a chec# in the bo& labeled "+lways use this program ..." Then scroll down and select Word=ad from the list and clic# O.. %rom now on, you can $ust double clic# on any .0!: file, and it will open in Word=ad. ?ou will see all the parameters you input, including number of dec#s, players, all the rules and e"en the tags for each indi"idual card ran#. Then there is a SSSSSS separator line followed by raw data from your =ower0im simulation. This includes the name of the .B!4 file, the seed used by the random number generator, the number of rounds and the time they were completed, the ma&imum number of cards dealt from any shoe in the sim, and finally, a complete list of the fre,uencies, win rates, and "ariances for each player at e"ery True <ount. ?ou may or may not find the raw data "ery enlightening. But you should certainly be interested in the data below the ne&t separator line. This is the data you ordered 0co<alc to copy for you. ?ou can run 0co<alc as many times as you li#e with a gi"en .B!4 file, and you can run =ower0im as many times as you li#e with any .0!: file. The programs will continue to append data to the appropriate .0!: file.

Each .B!4 file "#nows" what .0!: file created it, so data automatically goes to the right file. ?ou can e"en edit input parameters in a .0!: file with Word=ad. 0ay you were chec#ing out a sim by letting =ower0im display the 1ands after each round and the 0hoe before each shuffle. !nstead of inputting all those parameters again one line at a time 7a boring, error prone process), you can $ust go in with Word=ad and change the (s after "Display hands'" and "Display shoes'" to Ms. 7+ one 7() generally means "yes" in the sim parameters, and a -ero 7M) means "no.") Then you $ust sa"e the .0!: file, and use it for your ne&t =ower0im simulation5 !n general, though, it's a good idea to #eep separate .0!: files for really different sim parameters. ?ou can always copy an old .0!: file, rename it, delete any old results after the SSSSS separator, and then use it as a template for a new sim.

-ptima" Bets an! S.-+Es*


?ou can also ha"e 0co<alc calculate precise optimal bets for you, in a gi"en range of true counts. *ust use the bac#slash #ey "J" for the bets you want optimi-ed. !n this case, you will be as#ed to enter a >is# Of >uin, and the "hard bets" you enter will be scaled to match your chosen ban#roll and >O>. ?ou can also enter a -ero 7M) for any subset of true counts, to simulate "Wonging," or other bets at negati"e or positi"e counts to simulate co"er betting strategies. Optimal bets are simply the bets that will gi"e you the best possible 0<O>E for a gi"en ma&imum to minimum bet ratio 7e&cluding any -ero non6bets), also #nown as a "bet spread." 1ere are two e&amples. These are based on a / billion round sim done with H players, dec#s, cut card at / M 7KJ ), one burn card, D+0 7double after split) and 0(I 7dealer stands on soft (I). !'"e included the .0!: file for your inspection, which is named d/B.sim. =ower0im results were stored to d/B.bin. E&ample ('
+BI* 'ileA D:e'ault ( $d"BE $d"B

There are ! players+ Which will 'lat betA D:e'ault ( noneE bet at "0 (8 'or opt*, or :e'ault ( -) bet at -# (8 'or opt*, or :e'ault ( -) bet at -2 (8 'or opt*, or :e'ault ( -) bet at -% (8 'or opt*, or :e'ault ( -) bet at -$ (8 'or opt*, or :e'ault ( -) 8 bet at -& (8 'or opt*, or :e'ault ( opt*) bet at -! (8 'or opt*, or :e'ault ( opt*) bet at -@ (8 'or opt*, or :e'ault ( opt*) bet at -" (8 'or opt*, or :e'ault ( opt*) bet at -- (8 'or opt*, or :e'ault ( opt*) bet at -0 (8 'or opt*, or :e'ault ( opt*) bet at # (8 'or opt*, or :e'ault ( opt*) bet at 2 (8 'or opt*, or :e'ault ( opt*) bet at % (8 'or opt*, or :e'ault ( opt*) bet at $ (8 'or opt*, or :e'ault ( opt*) bet at & (8 'or opt*, or :e'ault ( opt*) bet at ! (8 'or opt*, or :e'ault ( opt*) bet at @ (8 'or opt*, or :e'ault ( opt*) bet at " (8 'or opt*, or :e'ault ( opt*) bet at - (8 'or opt*, or :e'ault ( opt*) bet at 0 (8 'or opt*, or :e'ault ( opt*) bet at - (8 'or opt*, or :e'ault ( opt*) bet at " (8 'or opt*, or :e'ault ( opt*) bet at @ (8 'or opt*, or :e'ault ( opt*) bet at ! (8 'or opt*, or :e'ault ( opt*) bet at & (8 'or opt*, or :e'ault ( opt*) bet at $ (8 'or opt*, or :e'ault ( opt*) bet at % (8 'or opt*, or :e'ault ( opt*) bet at 2 (8 'or opt*, or :e'ault ( opt*) bet at # (8 'or opt*, or :e'ault ( opt*) bet at -0 (8 'or opt*, or :e'ault ( opt*) bet at -- (8 'or opt*, or :e'ault ( opt*) bet at -" (8 'or opt*, or :e'ault ( opt*) bet at -@ (8 'or opt*, or :e'ault ( opt*) bet at -! (8 'or opt*, or :e'ault ( opt*) bet at -& (8 'or opt*, or :e'ault ( opt*) -$

bet bet bet bet bet

at at at at at

-$ (8 'or opt*, or :e'ault ( -$) -% (8 'or opt*, or :e'ault ( -$) -2 (8 'or opt*, or :e'ault ( -$) -# (8 'or opt*, or :e'ault ( -$) "0 (8 'or opt*, or :e'ault ( -$)

"000000000 rounds were stored in $d"B+bin BankrollA (de'ault ( F-0,000) ;isk ?' ;uinA (de'ault ( 0+-@&@@&) ?ptimal bets 'or player "C "0 %+&0-2-# %+&0-2-2 %+&0-2-% %+&0-2-$ %+&0-2-* -& %+&0-2-* -! %+&0-2-* -@ %+&0-2-* -" %+&0-2-* -- %+&0-2-* -0 %+&0-2-* # %+&0-2-* 2 %+&0-2-* % %+&0-2-* $ %+&0-2-* & %+&0-2-* ! %+&0-2-* @ %+&0-2-* " %+&0-2-* - %+&0-2-* 0 %+&0-2-* - @0+@"0"* " $%+02#%* @ -0"+%#&* ! -"0+0"2#* & -"0+0"2#* $ -"0+0"2#*

% -"0+0"2#* 2 -"0+0"2#* # -"0+0"2#* -0 -"0+0"2#* -- -"0+0"2#* -" -"0+0"2#* -@ -"0+0"2#* -! -"0+0"2#* -& -"0+0"2# -$ -"0+0"2# -% -"0+0"2# -2 -"0+0"2# -# -"0+0"2# "0 -"0+0"2# ?ptimal bets 'or player @C "0 %+&2#0& -# %+&2#0& -2 %+&2#0& -% %+&2#0& -$ %+&2#0&* -& %+&2#0&* -! %+&2#0&* -@ %+&2#0&* -" %+&2#0&* -- %+&2#0&* -0 %+&2#0&* # %+&2#0&* 2 %+&2#0&* % %+&2#0&* $ %+&2#0&* & %+&2#0&* ! %+&2#0&* @ %+&2#0&* " %+&2#0&* - %+&2#0&* 0 %+&2#0&* - "#+-!@-*

" $$+#%%@* @ -0-+@0!%* ! -"-+!"!2* & -"-+!"!2* $ -"-+!"!2* % -"-+!"!2* 2 -"-+!"!2* # -"-+!"!2* -0 -"-+!"!2* -- -"-+!"!2* -" -"-+!"!2* -@ -"-+!"!2* -! -"-+!"!2* -& -"-+!"!2 -$ -"-+!"!2 -% -"-+!"!2 -2 -"-+!"!2 -# -"-+!"!2 "0 -"-+!"!2 ?ptimal bets 'or player !C "0 --+"$%#" -# --+"$%#" -2 --+"$%#" -% --+"$%#" -$ --+"$%#"* -& --+"$%#"* -! --+"$%#"* -@ --+"$%#"* -" --+"$%#"* -- --+"$%#"* -0 --+"$%#"* # --+"$%#"* 2 --+"$%#"* % --+"$%#"* $ --+"$%#"* & --+"$%#"* ! --+"$%#"*

@ --+"$%#"* " --+"$%#"* - --+"$%#"* 0 --+"$%#"* - @"+2%"2* " %!+"-2@* @ --$+----* ! -$"+@@@* & -20+"2%* $ -20+"2%* % -20+"2%* 2 -20+"2%* # -20+"2%* -0 -20+"2%* -- -20+"2%* -" -20+"2%* -@ -20+"2%* -! -20+"2%* -& -20+"2% -$ -20+"2% -% -20+"2% -2 -20+"2% -# -20+"2% "0 -20+"2% -C F +0!"""%&8F-0 ( +!"""%&G Bar ( -@@+-2 ;?; ( -00G00 "C F+""0#8F"!+&0!% ( +#0-!&#G Bar ( ""0# S.?;9 ( ""+0# ;?; ( +-@&@@& @C F+""0##@8F"!+!&2% ( +#0@&@&G Bar ( ""0#+#@ S.?;9 ( ""+0##@ ;?; ( +-@&@@& !C F+@#!@#%8F@-+%%&! ( -+"!--##G Bar ( @#!@+#% S.?;9 ( @#+!@#% ;?; ( +-@&@@&

This optimi-es a ( '( spread. 4ote, the smallest bet ! input was (, and the largest was ( . These were "hard bets" input at T< P 6/M to 6(I, and L(K to L/M. + bac#slash was entered at T< P 6( 7and repeated by default all the way up through L(H) to tell 0co<alc to optimi-e bets at all those true counts. Ta#ing =layer GH as an e&ample, 0co<alc decided the correct si-e for your ( unit bet is O((./ IN/, and the optimal si-e for your ( unit bet is O(@M./@I

7note' O((./ IN/ & ( P O(@M./@I). !t also decided you should ma#e the minimum bet up through T< P M and then bet @"+2%"2, %!+"-2@, --$+----, -$"+@@@ topping out with your ma& bet at T< P K. This gi"es =layer H a 0<O>E of O2N.H2NI for this game, comparable to the 0<O>E you can find on page /2I of Blackjack Attack ed. 2 for K.MJ 0(I D+0 =+ Opt 7(6( ). ! had players (, / and 2 play basic in this sim, so their 0<O>Es are a little lower. !n addition, ! instructed 0co<alc to ha"e player G( flat bet. E&ample /' The first e&ample begs the ,uestion "how much would the game be impro"ed by Wonging8" 0o 66 let's enter a Wong type ramp5
There are ! players+ Which will 'lat betA D:e'ault ( noneE "@ bet at "0 (8 'or opt*, or :e'ault ( -) 0 bet at -# (8 'or opt*, or :e'ault ( 0) bet at -2 (8 'or opt*, or :e'ault ( 0) bet at -% (8 'or opt*, or :e'ault ( 0) bet at -$ (8 'or opt*, or :e'ault ( 0) bet at -& (8 'or opt*, or :e'ault ( 0) bet at -! (8 'or opt*, or :e'ault ( 0) bet at -@ (8 'or opt*, or :e'ault ( 0) bet at -" (8 'or opt*, or :e'ault ( 0) bet at -- (8 'or opt*, or :e'ault ( 0) bet at -0 (8 'or opt*, or :e'ault ( 0) bet at # (8 'or opt*, or :e'ault ( 0) bet at 2 (8 'or opt*, or :e'ault ( 0) bet at % (8 'or opt*, or :e'ault ( 0) bet at $ (8 'or opt*, or :e'ault ( 0) bet at & (8 'or opt*, or :e'ault ( 0) bet at ! (8 'or opt*, or :e'ault ( 0) bet at @ (8 'or opt*, or :e'ault ( 0) bet at " (8 'or opt*, or :e'ault ( 0) bet at - (8 'or opt*, or :e'ault ( 0) bet at 0 (8 'or opt*, or :e'ault ( 0) bet at - (8 'or opt*, or :e'ault ( 0) bet at " (8 'or opt*, or :e'ault ( 0) -

bet bet bet bet bet bet bet bet bet bet bet bet bet bet bet bet bet bet

at at at at at at at at at at at at at at at at at at

@ (8 'or opt*, or :e'ault ( -) 8 ! (8 'or opt*, or :e'ault ( opt*) & (8 'or opt*, or :e'ault ( opt*) $ (8 'or opt*, or :e'ault ( opt*) % (8 'or opt*, or :e'ault ( opt*) 2 (8 'or opt*, or :e'ault ( opt*) # (8 'or opt*, or :e'ault ( opt*) -0 (8 'or opt*, or :e'ault ( opt*) -- (8 'or opt*, or :e'ault ( opt*) -" (8 'or opt*, or :e'ault ( opt*) -@ (8 'or opt*, or :e'ault ( opt*) -! (8 'or opt*, or :e'ault ( opt*) -& (8 'or opt*, or :e'ault ( opt*) -$ (8 'or opt*, or :e'ault ( opt*) -% (8 'or opt*, or :e'ault ( opt*) -2 (8 'or opt*, or :e'ault ( opt*) ! -# (8 'or opt*, or :e'ault ( !) "0 (8 'or opt*, or :e'ault ( !)

"000000000 rounds were stored in $d"B+bin BankrollA (de'ault ( F-0,000) "&000 ;isk ?' ;uinA (de'ault ( 0+-@&@@&) 0+0& ?ptimal bets 'or player -C "0 0 -# 0 -2 0 -% 0 -$ 0 -& 0 -! 0 -@ 0 -" 0 -- 0 -0 0 # 0 2 0 % 0

$ 0 & 0 ! 0 @ 0 " 0 - 0 0 0 - 0 " -"&+%%0@ -%@+-@!* ! ""#+#!$* & "2!+&@#* $ @@"+0@2* % @#"+0$&* 2 !!%+@"$* # !2-+!* -0 &0@+02* -- &0@+02* -" &0@+02* -@ &0@+02* -! &0@+02* -& &0@+02* -$ &0@+02* -% &0@+02* -2 &0@+02 -# &0@+02 "0 &0@+02 ?ptimal bets 'or player !C "0 0 -# 0 -2 0 -% 0 -$ 0 -& 0 -! 0 -@ 0 -" 0

-- 0 -0 0 # 0 2 0 % 0 $ 0 & 0 ! 0 @ 0 " 0 - 0 0 0 - 0 " -$0+2@! @ -#@+%#!* ! "%0+#!-* & @!0+"2* $ !-2+%2-* % &0!+&!!* 2 &%#+-$2* # $!@+@@2* -0 $!@+@@2* -- $!@+@@2* -" $!@+@@2* -@ $!@+@@2* -! $!@+@@2* -& $!@+@@2* -$ $!@+@@2* -% $!@+@@2* -2 $!@+@@2 -# $!@+@@2 "0 $!@+@@2 -C F+$@&---8F@@+%-"% ( -+22@2#"G Bar ( -0$00+"% S.?;9 ( @2+0&"& ;?; ( +0& "C F +0!"-#28F-0 ( +!"-#2G Bar ( -@@+-%% ;?; ( -00G00 @C F +0!"02"!8F-0 ( +!"02"!G Bar ( -@@+-2@ ;?; ( -00G00 !C F-+0@!2#-8F!-+"0&- ( "+&--&$G Bar ( -%"%"+2 S.?;9 ( $"+00&- ;?; ( +

0&

4ote, at the input stage ! entered -ero 7M) all the way up through T< P (. then ! entered ( at T< P /, the bac#slash "J" at T< P 2, then $ust EEnterF all the way up through T< P (I 7defaulting to optimal bets), then H at T< P (@, (N and /M. This simulates Wonging with a H'( bet spread, and needs to be done carefully. The -eros, the ( and the three Hs are all "hard bets." 0co<alc will not change them e&cept to "scale" them to a particular >O> and ban#roll. This is the way classical optimal betting theory wor#s. !n other words, the bets at T<s (@, (N and /M will turn out to be e/act"y four times as large as the bet at T< P /, since ! entered H at (@ through /M and ( at T< P /. !f you enter different "hard bets" at any stage, you will get different results, e&cept that the H unit bet can be entered at pretty much any T< greater than (M, since 7according to 0co<alc ) the ma& H unit bet #ic#s in at T< P (M. ?our ma& bet will always be the ma&imum "hard bet" you input after scaling. 3i#ewise, your minimum bet will always be the smallest nonzero "hard bet" you input. %or e&ample, if your smallest bet 7other than M) was /.2K and the largest was ((.IK, you will wind up with a K'( bet spread, whate"er the actual dollar amounts, since /.2K & K P ((.IK. ?ou may find this method of inputting optimal bets andJor hard bets a little confusing at first, but this system pro"ides enormous fle&ibility. %or e&ample, suppose you want to test the effects of betting (, / and 2 units at T<s 6H, 6K and 6 respecti"ely 7raising your bet in the "wrong direction" for co"er), and then Wonging out at all other negati"e counts while using an optimal @'( spread for positi"e counts. :any programs would re$ect these inputs, or would simply write o"er the bets at 6H, 6K and 6 with -eros. 4ot so with 0co<alc. ?ou can enter all that information, and optimal betting theory will pro"ide you with the precise answer.

0ath Tri1ia*
+ 0<O>E 7upper case) is simply the win rate you can e&pect in (MM rounds, i& you use a bet ramp optimi-ed to produce an >O> of (2.K22KQ on a ban#roll of O(M,MMM. 7=lease don't interpret this to mean an >O> of (2.K22KQ is in any way "optimal.") The 0<O>E shown is accurate, e"en though the bets shown are optimi-ed for another ban#roll and >O> 7the ones you input). 1owe"er, if you enter all "hard bets," then the bets are not

optimi-ed at all, and you should probably use the term D! s,uared or score 7lower6case), instead of 0<O>E. ?ou don't need to understand all this math to glean significant information from your use of Blac#$ac# =ower0im. What you need to #now is this' ?ou can e&pect to ma#e on average 66 and with huge daily fluctuations 66 your e&pected win rate per round, with the degree of ris# stated to the ban#roll stated. !n other words, =layer G(, using the bet ramp in the last e&ample, can e&pect to ma#e $ust o"er 2 and a half cents per round, with an KQ ris# to a O/K,MMM ban#roll. !f he gets in (MM hands per hour, that translates into O 2.K( an hour. The flip side of the KQ ris# is that there's a (MMQ 6 KQ P NKQ chance =layer G( will continue to play fore"er, e"entually doubling and ,uadrupling his ban#roll, while pulling in O 2L an hour 7more, if he can get in more rounds per hour). Of course, you can't go into a real casino and bet O(/K.II to OKM2.M@. This is where inputting hard bets comes in handy. ?ou will find that if you #eep appro&imately the same bet si-es 7rounding to the nearest dollar or fi"e dollars) and ta#e care to #eep the same bet spread 7H' (, in this case, so you could bet O(/K to OKMM), your win rate and >O> will come "ery close to the optimum fractions abo"e. !n the case of player G(, by inputting bets of OM for T< from 6/M to L(, then O(/K, O(IK, O/2M, O/@K, O22M, O2NM, OHKM, OH@M, and finally OKMM for T< P (M and abo"e, ! got a win rate of OM. 2H@/( with >O> M.MHNN2 @ on the ban#roll of O/K,MMM. This is indistinguishable from the optimum results, for all practical purposes. 0ome professionals are uncomfortable with >O>s as large as KQ. This is a matter of indi"idual taste. !f you want a lower >O>, you simply input the >O> desired during the optimal bet calculation.

2our -#"igation*
O"er (,MMM hours of de"elopment time, spanning o"er a period of /M years, went into the creation of B* =ower0im. ?ou ha"e recei"ed it free of charge. 4ow that you made it this far, you ha"e only one obligation' to gi"e me at least one comment of any #ind 66 good, bad or indifferent 66 about your e&perience with =ower0im. Typical comments might be' Than#s, ! li#ed it. Or ...

<an't use it, not friendly to Windows. Or ... <ouldn't get it installed on Windows :E. Or ... Aot it installed, but couldn't figure out what to do with it. Or ... TT %ill in the blan#s. + special user name and password ha"e been set up so you can ma#e comments ,uic#ly and anonymously on the site where you found this program. =oint your browser to' www.blac#$ac#forumonline.com and clic# on %orums then 3og !n as ;ser' powersim and =assword' temp Both ;ser and =assword are all lower case. This will gi"e you the ability to post only in the Blac#$ac# =ower0im =ro$ect Board. +fter you log in, $ust clic# on %orums U Blac#$ac# =ower0im =ro$ect. ?ou may read the posts there, and clic# on =ost to ma#e your comments. ?our comments will help decide what direction to ta#e in further de"eloping B* =ower0im. ?ou may get a response, but you are not obligated to reply. ?ou are also welcome to email me at' etfan/(Vhotmail.com . ?our pri"acy will be respected.

3etai"s4 3etai"s*
4ow that you'"e come this far, you may wish to run a longer sim, or s#ip to the section on installing 9Basic, or uninstall B* =ower0im, ,uit blac#$ac# fore"er and become a mon#5 But if you wish to continue, there are some details about the operation of =ower0im that will ma#e your life easier. They are here for you when you need them. %or e&ample, changing counting systems or stategies will be discussed in more detail further down. %or e&perts, the ultimate resource on B* =ower0im is the source code. The source code is in the file =ower0im.&, and the file 0co<alc.&. E"en if you don't download the 9Basic programming en"ironment, you can read these source files with Word or Word=ad. Ta#e care not to modify them in this fashion without first bac#ing them up. To read =ower0im.& with Word=ad, you can $ust open Word=ad, and then Open =ower0im.& from the %ile menu by selecting +ll documents 7".") from the drop down menu, then na"igating to your =ower0im folder and selecting =ower0im.&. +lternately, without manually opening Word=ad, you can highlight =ower0im.& with the left mouse button, then clic# the right mouse button while holding down the 0hift #ey and select Open with ... Then scroll

down to select Word=ad and clic# O..

Fi"es*
?ou should ha"e recei"ed the following files. 4ot all the e&tensions 7letters after the dots) will necessarily appear in your =ower0im folder, depending on how your Ciew %older Options are setup. 70uggestion' you may want to unchec# the bo& that says "1ide filename e&tensions," or similar, in your Ciew 6 %older Options 6 Ciew dialogue bo&.) 6 >ead:e%irst.t&t + list of files in the -ip folder, and instructions on how to open the instructions you are reading now. 6 B* =ower0im %eatures.rtf + ,uic# summary of the main features of B* =ower0im. 6 B* =ower0im !nstructions.rtf The document you are reading now. 6 =ower0im.e&e 6 0co<alc .e&e The two main program files. 6 =ower0im.& 6 0co<alc.& 0ource code for the two programs. 6 =0Debug.e&e 6 =0Debug.& 6 =0Debug !nstructions.rtf =rogram, source and instructions for a patch to aid e&perts in debugging =ower0im. 6 =0>ed.e&e 6 =0>ed.& =rogram and source for a "ersion to simulate +rnold 0nyder's >ed6I count. 6 d/B.sim + sample .0!: file produced by the optimal bet e&amples abo"e.

6 A=3.t&t ?our Aeneral =ublic 3icense for using and abusing B* =ower0im. Briefly, B* =ower0im is copyrighted, and you can't sue me. But you can copy, modify and recompile the source code as long as you ma#e the results similarly open for public use. >efer to the 3icense for details. 6 &b.dll This is the .dll file necessary to run compiled 9Basic programs. !f you want the option to run B* =ower0im from any folder on your computer, you will want to put a copy of this file in your c'DWindowsD0ystem folder. 6 generic.str The generic, total6dependent strategy file. ?ou can modify this to your li#ing with a te&t editor, such as 4ote=ad or the DO0 program Edit. *ust be sure to ma#e a copy for bac#up, and #eep the symbols and numbers in the same columns as the original5 :ore on this process later. 6 generic with E0.str The generic strategy file with Early 0urrender included as basic strategy, plus three Early 0urrender indices. 6 /d1(ID+0.str +nother strategy file. <orrect basic strategy and some indices for / dec#s with Double +fter 0plits and the dealer 1its soft (I. 6 .O =referred d.str 6 >edIshoe1(ID+0!(@.str 0trategy files for the two most popular unbalanced counts. The indices in these files refer to running counts, with !><s set as recommended by their creators. 6 9B!nstall.bat, 9toE9E!nstall.bat, dup&bst.bat, 9Bas.t&t, 0hortcut to 9B0tart.bat.ln#, 9>ead.bat, 9toE9E.bat, 9toD33.bat, and !nstTest.& Beta support files to aid Windows users in the day to day use of the 9Basic programming en"ironment. !nstallation is e&plained below. !n addition, =ower0im will generate the following files in normal operation' 6 .0!: files This holds all the input parameters of a simulation 7rules, penetration, etc.)

and all results that were created under those parameters in the form of a te&t file. 6 .B!4 files This is where bin data is stored for the computer to read. !t's how =ower0im communicates with 0co<alc. 6 3astBin =ower0im stores the same of the last .bin file used here, so 0co<alc #nows what default to use. 6 9BasW&.reg and 9BasW9B%.reg These files will be created only if you install 9Basic, and the 9B!nstall.bat program finds it will need to o"erwrite some pre"ious file associations in the registry. !t will store the old file associations in these files, and also gi"e you the option to abort. 6 9toE9E.err and 9toD33.err These files are created by 9toE9E.bat and 9toD33.bat respecti"ely, along with the re,uired .E9E and .D33 files.

Uninsta""ing PowerSim*
;ninstalling B* =ower0im is a simple matter of deleting the =ower0im folder from your des#top. !f you don't want the option to reinstall, you can also delete the =ower0im.-ip file you originally downloaded. !f you also installed 9Basic, it's easy to uninstall that as well through addJremo"e program in <ontrol =anel. !f you did 0tep 2) below, to create the shortcut on your des#top, $ust manually delete it.

In&inite -ptions*
1eh, heh. *ust wanted an e&cuse to write that header. These are the two options with 7!4%!4!T?) defaults, not e&plained in Xuic# 0tart abo"e'
,a3imum rounds per shoe (I*4I*IT5)

!n pitch games, it's common in many casinos to deal a set number of rounds for a gi"en number of players, eg. the "rule of K" or "rule of ." +lso, when studying basic strategy, there is something called the "cut card effect,"

that increases the house edge a fraction of a percent. 1ence, some simulators shuffle the shoe after e"ery round to find the true "off the top" house edge. !n either e"ent, this option is useful. 0et the penetration le"el to the ma&imum permitted, but enter an appropriate number of :a&imum rounds per shoe. Eg. !f you ha"e three players at a single dec# game with "rule of ," you would enter the number 2 for :a&imum rounds per shoe. !f you are loo#ing to find the "off the top" B0 house edge, it can be pro"en it is not necessary to enter a ( as the ma&imum. ?ou can enter any number, as long as you ma#e it "ery unli#ely, or impossible, that a cut card will be reached. 4ote that :a&imum rounds per shoe coe&ists with the cut card parameter. Both limits are in place. !f you don't want the penetration le"el to interfere with ma& rounds, choose the ma&imum penetration le"el. !f you don't want ma& rounds to interfere with the cut card, $ust choose !4%!4!T? for ma& rounds by pressing EEnterF.
1 rounds per dealer (I*4I*IT5)

!n some casinos, each time a new dealer comes to the table he burns one card. This option lets you simulate this practice. 0et the number to your best guess on the number of rounds each dealer gets before his replacement comes. !f new dealers don't burn a card, press EEnterF to choose !4%!4!T?. The B* =ower0im defaults are set to Cegas 0trip rules, commonly used as a benchmar# by blac#$ac# authors. Blac#$ac# ma"ens would describe this as 0(I, D+/, no D+0, 0=32, no >0+, no 0ur. Of course, insurance pays off at / to ( and natural blac#$ac#s pay 2 to /, as Aod intended. The default for "1ow many rounds to +uto6play 7( 6 /,(HI,H@2, HI)8" is -ero. 1owe"er, if you press EEnterF by mista#e don't panic. *ust restart =ower0im, enter the name of your .0!: 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 66 there are no graphics of any #ind in this release of B* =ower0im. 1ands collected before the end of a round are not displayed, but the totals are always shown.

.ustom Shoes

This feature allows you to simulate situations with e&tra tens or aces in the shoe 7eg. $o#ers at some casinos) or depleted dec#s, li#e Thorp used when he in"ented counting 7see Beat he !ealer). *ust enter -ero 7M) for 4umber of dec#s. ?ou will still be prompted for penetration, although the default will be M. Enter the desired penetration, ta#ing into account the actual number of cards that will be in the shoe you create. 3ater, before the >ounds input, you will be prompted to create a custom shoe. ?ou will enter the total number of aces, /'s, 2's etc. that you want. The default will be the number you put in for the pre"ious ran#, e&cept for (M's, where the default will be four times the number of N's input, since (M's also includes *ac#s, Xueens and .ings. !t might be fun to do a sim with twice the number aces as in a regular shoe. ! used to play a >adio 0hac# blac#$ac# game that had that many aces, though you couldn't tell it from the instructions. !'m con"inced some casino wrote that program to get non6counting suc#ers to belie"e they could win in real life.

Un#a"ance! .ounts*
!f you enter tags in response to the prompt'
.ount ta/ inte/er "&$ to <"&& 'or ace (de'ault ( hilo system)

and the tags you enter for all ten ran#s do not sum to -ero 7after multiplying the (M's tag by H) =ower0im will detect that you'"e entered an unbalanced count, and will interpret the indices in your strategy file as running counts. !n this case, you will be prompted for an !nitial >unning <ount 7!><) which will be stored as part of the .0!: configuration. When you run 0co<alc with results from an unbalanced count, the true counts listed are actually running counts. !f you wish to accurately simulate an unbalanced true count system, you will need to do a tiny bit of programming. +ll the elements are there in =ower0im, it's $ust a matter of mi&ing and matching. Don't hesitate to as# for help on the =ower0im =ro$ect board at www.blac#$ac#forumonline.com . We'll get you set up "ery ,uic#ly. !ncluded in "ersions K and of =ower0im is the program =0>ed. >un

this program to simulate +rnold 0nyder's famous >ed6I count. The !(@ for shoe games is included in the file >edIshoe1(ID+0!(@.str . Do not use .0!: files created with other counts with =0>ed, as results would be meaningless. When running =0>ed.e&e with the show hands option on, you will see about half of the se"ens represented as NI instead of I. +lso, the 0hoe<hec# routine will show half as many se"ens as you'd normally e&pect. This is so that half the se"ens will ha"e a tag of L(, and the other half will ha"e the tag M. The hand totals, and some other details, are handled correctly by using the :OD function. NI :OD NM P I, whereas all other ran#s are unaffected by appending :OD NM. The lines in =0>ed.& that were added or modified from =ower0im.& are mar#ed with the comment '>0 at the end, so you can find those lines easily with the 9Basic editJfind function.

0a)ing your own 'ST+ strategy &i"es* 5For testing !i&&erent strategies an! in!ices6
Only fi"e .0T> files are included in this beta B* =ower0im release, but others may ,uic#ly become a"ailable, as they are created by users. The basic strategy employed is the generic total6dependent basic recommended by 0tanford Wong for 0trip rules in his boo# Basic Blackjack. The indices included are the "<atch //" indices populari-ed by Don 0chlesinger. +ny number of indices can be incorporated in a .0T> file. !f you press anything other than EEnterF 7such as M, 6(, 6/ etc.) in response to the .ount ta/ inte/er "&$ to <"&& 'or ace (de'ault ( hilo system) prompt, you will get prompts for the count tags to apply for each of the remaining ran#s, / through (M. 4aturally, unless you enter the tags for hi6lo, 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 (I, or where you can't double after splits, or if late surrender is offered. <urrently, =ower0im does not support e&otic "composition dependent" basic strategy plays. These can be programmed in by e&pert users, if desired, but a player using indices gets, as a rough guess, NKLQ of the gain from composition dependent play. +nd the basic strategist who doesn't want

to count, but wants to ma#e e&otic plays li#e "hit (/ ". 2, but stand on (/ ". 2 only in single dec# when the hand has three or more cards, but only if those three are in the original hand, not a split hand" is a "ery odd duc# indeed. The true counts employed by =ower0im are "floored," which means the running count is di"ided by the number of unseen cards remaining, then multiplied by K/ to get an inde& scaled to full dec#, rather than half or ,uarter dec#. Then the !4T math function is used to get an integral inde&, which in Basic 7as opposed to cLL) is never higher than the e&act fractional inde&. E&amples of floored T<s' S >< P /M, unseen P H, T< P !4T7/MJ H & K/) P !4T7( ./K) P ( 7nice to dream, isn't it8) S >< P /M, unseen P K, T< P !4T7/MJ K & K/) P !4T7( ) P ( S >< P /M, unseen P , T< P !4T7/MJ & K/) P !4T7(K.IKIK..) P (K S >< P 6I, unseen P (//, T< P !4T76IJ(// & K/) P !4T 76/.N@2 ) P 62 S >< P 6I, unseen P ((@, T< P !4T76IJ((@ & K/) P !4T762.M@HI) P 6H <hoosing accuracy of dec#s remaining to nearest ,uarter dec#, or nearest half dec# was not done. !nstead the fractional T< is precise and then floored. +gain here, nearest (J& dec# accuracy could be written in by a programmer, and ! would be glad to help, if this is desired. Doing the entire T< calculation "in line," rather than splitting it up into parts, guarantees the accuracy of this flooring techni,ue, under the !EEE IKH floating point standard employed by 9Basic. +nother ad"antage is simplicity and readability of the source. + disad"antage is speed in e&ecution. When you create a custom .str strategy file, ! highly recommend you start with a copy of a .str file you already ha"e, such as generic.str. *ust right clic# on generic.str and select <opy, then right clic# on an open space in the same folder and select =aste. ?ou should get a file named "<opy of generic.str" which you can rename to whate"er you wish. Then open it with 4ote=ad and edit away. E?ou can teach Windows to automatically open a .0T> file with 4ote=ad. %irst select a .0T> file with your left mouse button, then hold down the shift #ey while right clic#ing on it. <hoose Open With... from the drop down menu. 7With Windows 9=, at this point you get a dialogue bo&. <hoose the

option to "0elect the program from a list" and clic# O..) :a#e sure there's a chec# in the bo& labeled "+lways use this program ..." Then scroll down and select 4ote=ad from the list and clic# O..F ?ou should try to ma#e the name of your .str file correspond with the strategy, or the game for which the strategy is fine tuned. E&amples' nobust.str, copydlr.str, or /dh(Idas.str. 3ong Windows filenames are permitted. 2ou shou"! get a proper #asic strategy in p"ace &irst, 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 inde&, in case you decide later to ha"e some seats play basic. +lso, plays with no indices in the .str file, depend on a correct basic strategy, e"en for players who use indices. The rule with basic strategy is this' 1it, Double, 0plit, and 0urrender must be written as 1, D, 0p, and 0u, and they must be written into the e&act columns you see in generic.str. +nything other than 1, D, 0p and 0u in those columns will be interpreted as Don't 1it, Don't Double, Don't 0plit or Don't 0urrender. %or e&ample, if you put in sp 7lower case "s") instead of 0p, that hand would ne"er split as basic strategy. The order of decisions is' Early 0urrender, !nsurance, 0plit, 0urrender, Double, 1it. +ll decisions should be correct for the total in ,uestion, e"en though you may not be thin#ing of the hand where that decision is important. %or e&ample, you normally want to 0urrender hard ( "s. T, but you also want to 0plit if it's @6@, and you want to 1it, if you can't 0urrender or 0plit. 1owe"er, you will never want to double down. +ssuming early surrender is not offered, the correct B0 loo#s li#e this' hard ( "s. T 1 6 0p 0u 66 . When early surrender is not a"ailable, it shouldn't appear anywhere in the strategy file. !f Early surrender is a"ailable, it should loo# li#e this' hard ( "s. T 1 6 0p 0u E0 . !t's important for the columns and rows to stay lined up $ust as they are in generic.str. Eg. ?ou can't ha"e hard / "s. / come before hard / "s. +, and any 0p symbol must appear in columns H/ and H2. !ndices must line up as well. %or instance, the 92 in the rows for @ "s. K and @ "s. don't do anything, because they're not in the /cnd, 2rd, or Hth space following the

slash mar# "6" where doubling would go, if doubling were basic strategy in this case. That's the general rule. Doubling indices come in the /cnd, 2rd and Hth space following the D 7doubling) B0 column, surrender indices come in the /cnd, 2rd and Hth spaces after the 0u 7surrender) B0 column, etc. The 92s in the file are $ust there as a reminder for me to put a 2 in as a doubling inde& if ! want to write a .0T> file tailored for single dec#. When you write in data, you need to delete the same number of spaces, so the columns remain lined up $ust as they are. When you are done, all the decimal points at the end of e"ery line, should still be lined up in the Mth column. !f 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 mista#e if you are careful, and you "isually chec# your wor#. 1ere are some true statements about lines in a strategy file' 6 +ll the lines must be present and in the same order as the generic.str file. 6 E"ery line should ha"e at least M characters including spaces 7e&cept for earlier "ersions, which are still compatible). 6 3etters are for basic strategy, numbers are for inde& players. 6 The numbers ha"e no conse,uence for simulated basic players. 6 !f an inde& is indicated for a decision, a simulated inde& player pays no attention to the letter for that decision. 6 !f no inde& is present for a decision, inde& players play the same as basic players 66 they use the letters. The rule with indices is "do positi"e action when T< UP inde&." =ositi"e actions are stand 7ie. Don't 1it), Double, 0plit, and 0urrender. =eople get confused on the first one, because we tend to thin# that hitting is a positi"e action. +nd it is 66 but not for the purpose of indices. 1ere are two e&amples of correct lines in a .str file and their interpretation' YE&.(Z hard (K "s. T 1 H 6 66 0u M E0 6/ .

+ player who does 4OT use indices will always 1it this hand unless he can Early 0urrender 7first two cards). 1e will ne"er Double and ne"er 0plit. The 0u and M surrender inde& actually ha"e no effect here, because of the

early surrender, but it's O. to lea"e them, $ust in case you choose to edit out the E0 option for a future sim. + player who DOE0 use indices will Early 0urrender if the true count is greater than or e,ual to 6/. 1e will also 1it if he can't 0urrender under the house rules 7eg. more than two cards), if the true count is less than H, and he will stand, if the true count is greater than or e,ual to H. YE&./Z hard @ "s. 1 D 2 0p 6H 66 66 .

This is correct for a single dec# 0(I game with double after splits. The basic strategist will 0plit if he has a pair of fours, Double if he has 26K or /6 , and 1it if he has three or four cards adding up to @. 1e will ne"er 0urrender this hand. The player using indices will 0plit, if possible, any time T< UP 6H. 1e will double, if splitting is not allowed 7eg. 26K, /6 , or ma& splits has been reached) when T< UP L2. %inally, he will 1it, if neither 0plitting nor Doubling apply 7eg. T< P M with 26K). 1e will ne"er 0urrender, and he will ne"er stand. The last line in the .str file is for the !nsurance !nde&. This can be a decimal fraction, such as /.I(@, and may be placed anywhere on the line after !nsurance !nde&' . !f no inde& is gi"en, the inde& defaults to L2, allowing compatibility with .str files created before ! added this option. !nsurance is not ta#en by simulated players who don't use indices 7basic strategy players). The ,uestion has been raised as to why the strategy chart starts with 1ard / "s. +, since you ne"er get a hand with a hard /. :y desire was to create strategy charts as fle&ible as possible within the limits of a total dependant system. + player gets a hard / when he splits a pair of /'s. !n some casinos, the first hit on a split pair isn't automatic. !t's possible for situations to arise where you would not want that first hit, eg. on the basis of ne&t card information. Thus, the program logic actually loo#s for the basic strategy, andJor an inde&, before ma#ing the decision to hit a hard /. B* =ower0im was culled from a program capable of ma#ing the decision not to hit a split /, based on ne&t card and hole card information.

!t's also ,uite possible to set up .0T> files with poor strategies, such as ne"er hitting a stiff, or mimicing the dealer's strategy. !t can be fun to see how fast a poor strategy will lose. !'ll be happy to double chec# any .0T> files created by wonderful =ower0im users.

Insta""ing 7Basic &or .omp"ete Programming an! Simu"ation F"e/i#i"ity*


:any players will be satisfied with the features of B* =ower0im as is, right out of the bo&. !f that describes you, stop reading here and start simulating5 ?ou don't ha"e the most powerful simulator on the mar#et, but you ha"e one with a hec# of a benefitJcost ratio5 There's an e&cellent chance it's the only simulator you'll e"er need. But =ower0im is specifically designed for researching inno"ati"e blac#$ac# strategies. To get really inno"ati"e, you will need to install and learn about 9Basic, or see# the aid of others at http'JJwww.blac#$ac#forumonline.com who are willing to help. =rogramming re,uires a considerable in"estment in time at the console, and large doses of of patience and persistence. !f you'"e ne"er done any programming at all, 9Basic may be a hard way to start because of the cryptic documentation, though the docs are better than any free B+0!< compiler !'"e e"er seen. XBasic was thoroughly documented, of course, but the free "ersion of XB was only an interpreter 7not a compiler). 0till, beginners might want to consider a boo# li#e the highly rated "basic by #$a%ple by Areg =erry. XBasic is a recent ancestor of 9Basic that you can get from any Windows N@ !nstallation <D in the Old :06DO0 folder. +nother e&cellent option for budding B+0!< programmers is "*ust Basic," a"ailable at http'JJwww.$ustbasic.com . !t is completely free, and beautifully documented, but since it's not compiled it's far too slow for blac#ac# simulations. Before you begin, if you use Windows /MMM, Windows 4T, Windows :E or Windows 9=, you will need full administrator or "root user" pri"ileges to program in 9Basic. To find out if you ha"e administrator pri"ileges under Windows 9=, first clic# 0tart. The name of your account is at the top of the 0tart screen. Then clic# <ontrol =anel U ;ser +ccounts U ;ser +ccounts and ma#e sure it says "<omputer administrator" under the name of your

account. !f you are not an administrator, you will need to ha"e an administrator set you up to be one. 0ince 9Basic is free, the installation and support files are scattered around the internet. !'"e tried to ta#e some of the frustration out of the installation process for you. The installation needs to be done in order. The Xuic# 0tart !nstallation instructions abo"e is first, followed by (), /) and 7optionally) 2) and H) below. 2) and H) are "ery helpful for Windows N@ and 9= 7home or =ro) but will not wor# for Windows Cista or Windows I. () Download the 0elf6installing .e&e for the Win2/ "ersion of 9Basic from the following site' http'JJ&basic.sourceforge.netJ 7Detailed instructions') !t's the first download lin# that appears on the page. <hoose the mirror site in 4orth +merica 7assuming you are in 4orth +merica). When the download dialogue bo& appears, choose sa"e, then when 0a"e +s pops up, push on the up arrow repeatedly so the file will sa"e to your des#top. Once the download is complete, close the dialogue bo& and all other windows. 4ow double clic# on the &basic6 ./.2.e&e icon that appears on your des#top. ;se the wi-ard to install 9Basic. <lic# past the initial prompts and accept the user agreement. 3o not use the !e&au"t "ocation for the folder where you want 9Basic installed. !nstead carefully type in <'D9B into that dialogue bo&. This location is necessary in order to use the automated batch files !'"e included. E!mportant note' !f you are installing 9Basic o"er a pre"ious =ower0im 9Basic installation, and you wish to sa"e the old files, you should rename <'D9BDdemo to something li#e <'D9BDoldDemo before double clic#ing on &basic6 ./.2.e&e.F E4ote/' !f you can not use your <' dri"e for 9Basic, please contact me at etfan/(Vhotmail.com, and ! will try to set you up.F <lic# 4e&t U 4e&t U !nstall U %inish. ?ou should now ha"e the ability to open the 9Basic =DE through your 0tart U =rograms menu. /) Download the documentation from the following address' http'JJwww.&basic.orgJdownloadJ&bhtml.-ip

7Detailed instructions') Once again, download this to your des#top. ?ou will need to ha"e WinBip installed on your computer to open this. Double clic# on the &bhtml.-ip icon, press E&tract, ma#e sure the +ll files bo& is chec#ed, and E&tract all files to your root directory. To do this, type .*8 5the #ac)s"ash character6 into the E/tract to* #o/, where <' is the name of the dri"e where you ha"e 9Basic installed. 3on't type .*87B. !f as#ed, enable "recreate directories." The -ip file will automatically load the the 9Basic html help files into <'D9B folder if you $ust type <'D <lose the WinBip window and continue.

Specia" Batch Fi"es*


! created these optional batch files to assist you with the daily operation of 9Basic. ! hope you find them useful. !f you're ner"ous about modifying your registry, you can s#ip step H). These batch files ha"e only been tested on Windows N@ and 9=. They won't wor# in their current form for Cista or Windows I. 2) This step gi"es you the ability to ma#e a .E9E file with one double clic#, after you'"e debugged a program in the =DE. Ordinarily under 9Basic, to ma#e an E9E file you ha"e to go into DO0 and type se"eral commands. 7:odern programming languages typically ha"e a ":a#e E9E" command in the =DE, but 9Basic currently lac#s this feature.) ?ou will also gain the ability to right clic# on a .& file and choose ">ead as Te&t" from the drop down menu. This copies the .& file to a file name 9>ead.doc, and then opens 9>ead.doc with whate"er is associated with .doc files on your computer 7generally Word or Word=ad). This is a read only function. +ny changes you ma#e to 9>ead.doc will not be reflected in the .& file. +d"anced users of 9Basic also gain the ability to create .dll files through the right clic# menu. To add all these functions, $ust double clic# on the 9B!nstall.bat file 7not 9toE9E!nstall.bat) included in your =ower0im folder. !n a blac# console window, you will see se"eral "file7s) copied" messages and a line saying "4ew file associations created." followed by "=ress any #ey to e&it . . .". This puts all your =ower0im files in your D9BDdemo folder for easy access,

and sets up certain support files that ma#e it much easier to wor# with 9Basic. =ress a #ey to close the window. E4ote' This step modifies your file associations by importing some #eys into your registry. !f you ha"e any applications that use files with the .9 e&tension, it will show you the old registry #eys and gi"e you the option not to continue with that part of the installation. !f these old file associations are important to you, carefully press <trlLBrea# when prompted and s#ip the ne&t section on Testing ?our Windows 9Basic 0etup. ?ou can always come bac# and redo this step later.F H) Drag "0hortcut to 9B0tart.bat" from your =ower0im folder to your des#top. !f you pre"iously completed steps () through 2), you should now ha"e the ability to open the 9Basic programming en"ironment, including the =DE, the demo folder, and the html documentation, by simply double clic#ing on this shortcut. E4ote' ;nder Windows N@, the first time you use this shortcut, the icon may change in appearance, and the 7usually hidden) .ln# e&tension will change to .pif. This is normal[ don't be concerned.F

Testing The Specia" Batch Fi"es*


6 %irst, double clic# on the 0hortcut to 9B0tart.bat icon you put on the des#top in step H). This should bring up four windows 7sometimes you will get a Kth window for free). 6 0elect the demo folder from your tas#bar, and find a file in the folder called !nstTest.& . 6 Double clic# on it. ?ou should see some acti"ity and a blac# bo& with some te&t ending with these two messages' !nstTest.e&e was created5 =ress any #ey to e&it . . . =ress any #ey to close the blac# window. <ongratulations5 ?ou'"e $ust compiled your first 9Basic program to a stand alone e&ecutable. This shows the batch files are wor#ing which allow you to double clic# on a "alid .& file to create a .e&e file and put it in the same folder. !f you study the 9Basic documentation, you will soon appreciate what a nice feature this is. While you still ha"e your demo folder open, find the new file named

!nstTest.e&e and double clic# on it. ?ou should see a gray console bo& pop up with the message'
Installation success'ul0 Press D9nterE to close

!f this message comes up as e&pected, you ha"e a "ery sweet 9Basic setup. 0weeter, in my humble opinion, than the the setup do-ens of people download each wee# from the internet. !f you double clic# on !nstTest.& a second time, 9toE9E will politely as# whether you want to o"erwrite the !nstTest.e&e file you $ust created. +t this point, the only thing you need on your des#top to run, modify and test B* =ower0im, is the 0hortcut to 9B0tart.bat icon. ?ou can run =ower0im.e&e from the demo folder, so you no longer need the =ower0im folder on your des#top. But you may wish to lea"e it there for a while, $ust to feel safe. 7?ou still ha"e =ower0im.-ip in case of emergencies.) 999 7toE7E E++-+ 0ESS:$ES 999 !f you did 4OT see "!40TTE0T.e&e was created5" abo"e, you may ha"e recei"ed one of these two error messages' () 55 4O .e&e <>E+TED 55 ?ou need to rename, mo"e or delete the following files' 7followed by a list of files) 9toE9E and 9toD33 use certain "ery unusual filenames while processing. !f any of these actually pre6e&ist in your demo folder, it won't o"erwrite them but will abort with the abo"e message. YanyZ.&Wb and 9BW=rog.YanyZ are the reser"ed file names. /) 5 nma#e did not create a .E9E file 5 ?ou get this error when nma#e could not create an e&ecutable for any reason. ?ou normally will get some errors in the gray console bo& from the 9B.e&e compiler before this error appears. 0imilar error messages may arise when creating a .D33 file. !n addition, output from nma#e and lin# are appended to the files 9toE9E.err and

9toD33.err, to aid e&perts in debugging serious problems. The 9B!nstall, 9B0tart, 9toE9E and 9toD33 batch files are all beta. =ost any comments or problems on www.blac#$ac#forumonline.com in the Blac#$ac# =ower0im =ro$ect discussion board.

I& 2ou %ere Una#"e To .omp"ete Steps 36 an! ;6


0ince ! wrote the 9toE9EJ9toD33 batch files, ! wish e"ery 9Basic user could ha"e them. But technically, it is still possible to wor# with 9Basic if you only got through steps () and /) abo"e. This $ust means you ha"e the regular installation most people download from the internet. ?ou already ha"e the ability to open the 9Basic =DE from the 0tart 6U =rograms menu. To open the 9Basic docs, open :y <omputer U 9B U html and loo# for a little (.B file called inde&.htm . 74ot inde&T&.htm.) !t may help to +rrange !cons by 4ame to find it. >ight clic# on inde&.htm and choose <reate 0hortcut. Drag the 0hortcut to your des#top. 4ow you can double clic# on the 0hortcut whene"er you want to see the html documentation. ?ou will need to study documentation from se"eral sources ,uite carefully to create .E9E files. The e&planation in the html docs 7under ad"anced topics in the left frame) is dated, !'m afraid. 0tudying the 9toE9E.bat file in your =ower0im folder might be helpful. 1ere are two other sources on this topic' http'JJgnetools.sourceforge.netJ&bsupportJ"iewpaneT&b"ars.html http'JJ&bnotes.freehosting.netJma#eTe&e.html With your installation complete, you are now ready to begin your $ourney into the wondrous world of 9Basic programming. ! hope your $ourney is a pleasant one. 1appy programming5

<earning The 7Basic Programming <anguage


! spent a month and a half testing other "ersions of B+0!< for this pro$ect, including some that were ine&pensi"e, but not free. 0ome highly rated free ones, with all the latest polymorphwhate"er, turned out to be interpreted, or semi6interpreted, or lac#ed crucial "ariable types, so failed

miserably in speed tests. +nd though Cisual Basic programmers may be disappointed with the 9Basic documentation, ! can tell you it's far better than the docs that come with the other free or shareware B+0!< compilers !'"e seen. We owe a real "ote of than#s to :a& >eason 66 the genius who de"eloped 9Basic. The closest competitor was =ureBasic, which is e"ery bit as fast as cLL, and e&tremely well documented. =ureBasic ran about KQ faster than 9Basic in one speed test, and a =ureBasic de"otee actually studied the assembly source and disco"ered the reason 66 a detail about the way operands are loaded into registers for math operations. But the two languages were nearly identical in speed, and =ureBasic costs about O@M ;0D. =lus, =ureBasic lac#s double precision floating point "ariables 66 which is important if you need to use ban#s and handles instead of bins, eg. for progression testing. +nd it lac#s ;3O4A "ariables, which are buggy in 9Basic, but wor#s well for the 9O>0hift >4A currently implemented. 9Basic also beat CB in my speed tests, and according to one 9Basic guru, it beat =owerBasic in a speed test once upon a time. 0o if B* =ower0im runs slow, it's not due to 9Basic 66 it's my programming. +nd 9Basic has a A!+4T data type 66 which means we can $ust declare "bin"s, "fre,"uencies and "rounds" to be A!+4T and run simulations to /R 2 rounds 7now implemented and tested). +nd it has <O:=3E9 numbers as a data type5 71ard to see how we can use that, but it's pretty cool, anyhow.) !f you want to learn 9Basic programming, here are some important resources'
http'JJwww.ma&reason.comJsoftwareJ&basicJ&basic.html http'JJgroups.yahoo.comJgroupJ&basicJ http'JJwww.&basic.orgJ http'JJ&basic.sourceforge.netJ

71int' !f you enter 9Basic into Aoogle, as of 2J(J((, these are among the first ten sites that crop up.) ?ou definitely want to $oin the user group at ?ahoo if you get serious about 9Basic at all. They can be a little cran#y at times, but remember, they generously donate their talent and energy, and the archi"ed posts and search

function are in"aluable resources. ;ltimately, learning 9Basic is the same as learning any programming language. ?ou $ust $ump in and write a "ery simple two or three line program, such as the one that prints "1ello World" or your name to the console. Then you slowly try more and more complicated tric#s, such as printing your name (,MMM times, neatly spaced, ma#ing your program longer and longer, and more and more interesting. >ead, try, fail, read some more, try again, rinse repeat.

BJ PowerSim Program =otes*


=ower0im.& is a rather hasty translation and upgrade from an old XB& 7( bit compiled XBasic) program. Therefore, it is #ind of adrift between two different styles. 0till, ! feel the program is fairly clear and readable. The original program was written in B+0<O:, bac# in the eighties, when modern structured #ey words li#e DO W1!3E were not a"ailable. 0o 66 you will sometimes see lines li#e "!% condition AOTO EndOf3oop." 4e"ertheless, ! would argue the code is fairly well structured. !t's tri"ial to change my old6fashioned constructs to the fashionable new ones. =ower0im was pruned from a large 7one "ersion was nearly H. of source with no >E:ar#s) program designed to test shuffle trac#ing strategies, including se,uencing. %or this reason, it does a thorough simulation of the actual procedure the dealer follows in dealing and playing out the hands. ! consider this an asset worth retaining at the cost of some speed and consiseness. Once you familiari-e yourself with the code, ! belie"e this feature will simplify the process of testing, for e&ample, the effects of dealer errors, or unusual procedures. ! would council a "top down" approach to learning how =ower0im wor#s. %irst, ma#e sure you ha"e a strong understanding of ad"antage play blac#$ac#, including the "ernacular that's de"eloped around it. The internet, and the library at http'JJwww.blac#$ac#forumonline.com can be a great help here. Then master these user's instructions. %inally, tac#le the code itself. :any of the "ariable and routine label names should be transparent to serious blac#$ac# students. Cariables are 93O4A type, by default, ie. 2/ bit signed integer. !t may or may not be possible to speed e&ecution by changing the many flag6type "ariables to smaller data types. The !43!4EO

statements toward the beginning pro"ide meanings for many "ariables. M always means "4O" or "%+30E" and ( means "?E0" or "T>;E," $ust as in Windows .!4! files. Eg. when resplit+ces P (, that means the program will resplit aces if the .0T> file recommends it. When resplit+ces P M, that means no ace resplitting allowed. +rrays are set up much larger than they strictly need to be. >emember, B* =ower0im is specifically designed for researching unusual winning strategies, so some built in fle&ibility was deemed appropriate. + study of the opening "ariable declarations should re"eal that we can sim shoes with up to (M dec#s, and tables with up to (H players, each with the ability to split to up to (M hands. The third Bet dimension is to separately trac# any double down bet 7so we can easily implement, for e&ample, double for less strategies and isolate the results). The 1it, 0pl, Dbl and 0ur strategy arrays are inde&ed to 2( different player totals 7(M soft totals, the rest hard) and (M dealer upcards. The shoe<h#EF array is $ust for a ",uic# and dirty" chec# on shuffling algorithms, to ma#e sure no cards are lost. 4ote that aces are (, in this program, and all tens and face cards are (M. The ace%lag array "ariable is either M or (M, depending on the absence or presence of an ace in that hand. The "hardTotal" for a hand counts all aces as (. !f a hardTotal is less than or e,ual to ((, then total is set e,ual to hardTotal L ace%lag. 7! challenge you to de"ise a simpler system5) +lthough suit and face card distinctions are not made by =ower0im, it's actually ,uite easy to implement this. 0ince all changes to hand totals are made in the Deal+<ard routine, all that's re,uired is a few changes to the "%orming a 4ew 0hoe" and Deal+<ard routines. !n practice, !'"e found most any unusual rule can be tested by flagging the specified suit7s) by adding a constant to some among the ran#7s) in ,uestion, and then using :OD constant for totaling in the Deal+<ard routine. 70ee =0>ed.&, for an e&cellent e&ample, where constant P NM.) The heart of the program begins at the 4ew0hoe routine. 4ote that once the first two cards ha"e been dealt, there is a handsE&tant "ariable set to the number of players. This is maintained to sa"e the dealer from playing out his hand if all hands are resol"ed 7busts or naturals) before the 1olecard is e&posed. 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 %O> p P ( TO players, at the beginning of the 0tart=lay routine. This is a long, comple& loop. p ob"iously stands for the =layer number. When play for a gi"en player is finished, you will often see a AOTO 4e&t=layer command. 4e&t=layer is simply a label placed $ust before the 4E9T p command. :uch code is duplicated for +6+ "0pecial 1andling." ! found this faster and more readable than continually chec#ing a flag in the main loop to see if the first two cards were aces. +fter any split, the num1andsEF array "ariable for that hand is updated. The hand currently being acted upon is hand4um. %or e&ample, right after =layer / splits an initial 262, num1andsE/F P /, but hand4um P (. Once play on hand4um ( is done, hand4um / can begin 7possibly resulting in another split). ! only switched to the bins system 66 to support multiple bet ramps for a single sim 66 se"eral months ago. !'m still calling e&tra double, split, insurance, etc. "bets." The program would probably go faster if we $ust put flags for each of these in one "ariable per player, but the present system should ma#e it easy to go bac# to the old system, eg. to test progression strategies. ! thin# !'"e set it up so updating the BetDecision module to reflect the progression, and uncommenting the lines mar#ed with 'OOO, is all that's re,uired. This is untested. The program will also go faster if we $ust don't collect the hands into the discards. We really don't e"en need the discards for a random shuffle situation, but !'"e left it that way, so far, for educational purposes. Bets are often settled before the 0ettleBets routine, $ust as a real dealer often settles bets for busts and naturals before the regular settlement stage. This is why if handsE&tant P M, the program s#ips the 0ettleBets routine entirely. But note that e"ery time money changes hands, control is passed to the :oney routine. =lease continue this tradition. !t'll ma#e your life simpler if you e"er want to gather statistics on different si-ed bets. ! would ad"ise e&treme caution when ma#ing changes 66 particularly deletions of code which may see% superfluous 66 within the 0tart=lay loop, the "Dealer =lays 1is 1and" routine, or the 0ettleBets routine. Be sure to chec# your logic by running sims identical to pre"ious accurate ones, with the same starting seed, and se"eral sets of rules.

Because 9Basic is a 2/ bit compiler, and because it $ust compiles more efficient assembler code, it runs o"er (M times as fast on Windows as the old XB& program "0im0imp" on the computers !'"e tested. !nteresting to note though, that XB& 0im0imp ran faster in ( bit DO0 mode, because it didn't use 2/ bit instructions, and ( bit instructions can run faster in ( bit mode. Thus, on machines with both ( bit and 2/ bit modes a"ailable, 2/ bit B* =ower0im only runs /.K times faster than ( bit 0im0imp. But it doesn't matter, since nobody runs computers in ( bit mode anymore. To the people who wrote to tell me they had modified 0im0imp in XBasic and ran it in interpreted %ode at dismal speeds 7a few thousands rounds an hour88), because no compiler was legally a"ailable' Weeeeeeeeelll5 4ow you can play with a compiler5

BJ PowerSim up!ates*
@J@JMK !nitial 9Basic B* =ower0im released under the name "0im0imp." @J(( !mpro"ed bounds chec#ing in 0co<alc so >O> doesn't o"erflow for negati"e ECs. @J(2 %i&ed problem with long Windows file names for .cfg and .str files, and added more error chec#ing to filename inputs. @J(H %i&ed intermittent timing hang in 9toE9E.bat and 9toD33.bat. +lso impro"ed the paths so they don't depend on c'D as root, made the batch files more friendly to 9=, added some helpful >E:s, and impro"ed error chec#ing. @J(H <reated new 9B installation instructions, with new 9B!nstall and 9B0tart batch files. %ull install with the 9B0imp batch files should wor# on N@ through 9= now. E4ote' didn't wor#...F @J(@ !mpro"ed 9toE9E.bat so long filenames don't refuse to become .E9E files, but instead compile to their short name e,ul"alents. The .e&e file can then be renamed to match the .& file, if desired. The new system also impro"es error handling. Eg. !f you double clic# on a .& file that already has a .e&e file, you get a "duplicate filename" message, and the new .e&e is stored to aWbW-.e&e, which must be renamed before any more .e&e files can be created. ! wasn't able to accomplish this with D33 files, though. D33

files must ha"e old fashioned, short, DO0 filenames. NJ2 Daily wor# on impro"ing B* =ower0im !nstructions.doc. NJ(/ %!4+33? got installation to wor# on both N@ and 9=. :any than#s to +rnold for testing these procedures. +lso impro"ed 9toE9E.bat so you can see nma#e messages in the console without sacrificing the 0tart Jwait fi& for the intermittent timing hang. +lso wrote a regedit script that does the file association for 9toE9E.bat and 9toD33.bat automatically. !t also stores old file associations in two .reg files, and as#s permission to o"erwrite them, if necessary. 4ice, simple installation. Wor#s for N@ and 9= 1ome. NJ// =ut in Early 0urrender. ?ou use the strategy file to put in E0 "ersus (M andJor +ce. E0 is only in effect if the 0urrender option is chosen in the .cfg file setup. !f you don't need E0, the old strategy files still wor#. NJ/ =ut in the 9O>0hift >4A with a period of /R H 6 (, so (.@H & (MR(N different random numbers can theoretically be chosen. !t's tri"ial to ma#e the period /RN or longer with 9O>0hift, but /R H should be sufficient. !f you could deal a billion cards per second, it would ta#e K@K years to cycle through this >4A. %or theoretical $ustification, see "&orshift '()s" :arsaglia, http'JJwww.$statsoft.orgJ"M@Ji(HJ&orshift.pdf ((J(/ %i&ed another problem in the installation of the batch files 7eg. 9toE9E) with 9= =ro. <hanged the instructions to reflect ths change. ((J( +dded the >ead as Te&t option for .& files. ((J/( +dded ;ninstall instructions. ((J/K +dded the !nsurance !nde& to the .str strategy file format. The !nsurance !nde& may be a decimal, such as 2.(/2 . The inde& defaults to 2.M, if no inde& is gi"en, gi"ing compatibility with the old .str files. ((J/I +dded the European 4o 1olecard option. ((J/N <ompletely re"ised the inputJoutput structure with editable .0!: files in place of the old .<%A file format. +utonumbering is replaced by a simpler "last .0<O file" system. ((J2M >ewrote the instructions to reflect all the changes plus new screen

shots. (/J/K =ut in the optimal bet calculations for 0co<alc. <hanged the interpretation of a cut card to that used in B*+2, rather than B*>: and the old 0B+. %i&ed a bug found by O==< wherein the insurance bet was ne"er lost when the E41< rule was in effect. Other cosmetic changes to =ower0im. !nstructions updated. *anJ%eb /MM <reated =0Debug to aid in fore"er getting rid of the E41< insurance bug. There is a separate 0ettleE41<Bets routine now, that hopefully puts it to bed. +lso fi&ed a problem when the seed input option is un6>E:ed in the source. +lso added the custom shoe option, when you input -ero 7M) as the number of shoes and changed the default number of dec#s to . +ug /MM Cersion K' %inally cleaned up the "ariable naming con"entions, so it's easy to distinguish "ariables from routine labels in the program. +ll "ariables now begin with a lower case letter, so all "ariables now appear in alphabetical order when you use 9Basic's tracing functions. =ower0im now allows multiple strategy files for a sim 66 one file per player. <ompatibility with the old .0!: file format has been maintained. =ower0im and 0co<alc also now include complete alphabetical listing of "ariables with an e&planation of their meanings. 0ome "ariable names were changed, and a few were e&punged 7folded into other "ariables). +lso, beginning in +ugust, =ower0im now supports unbalanced running counts. Default number of players is changed from to H, and default number of burncards is changed from -ero to (. <reated =0>ed.& to run sims of +rnold 0nyder's >ed6I count. 1alf of the se"ens in a shoe are distinguished as "red" or "blac#" 7ran#ed as I or NI) and only the red se"ens ha"e a tag of L(. Thus, >ed6I is accurately simmed, unli#e many other programs where >ed6I is only appro&imated by tagging all se"ens as LM.K . +lso fi&ed a bug that rarely caused 0co<alc to output the wrong default .0<O file. (J(JMI =ower0im, =0Debug, =0>ed, and 0co<alc are all now capable of

running an infinite number of rounds, for all intents and purposes 7o"er N ,uintillion, which would ta#e something li#e a million years to run). This re,uired a new file format for bin file communications, so !'m calling the new .0<O files ".B!4" to a"oid confusion. >andom number seed input is now supported without programming, and the batch files 7eg. 9toE9E.bat) now wor# with any 9Basic set up. Eg. 9Basic can be installed 7with the self6installing &basic6 ./.2.e&e) in <'D=rogram %ilesD9Basic, and you can still double clic# to ma#e a .E9E file. 7Belie"e me, it's a challenge to get batch files wor#ing with long Windows path names accross different "ersions of Windows.) +lso, 9toE9E no longer aborts if the .E9E file e&ists, but will as# permission to o"erwrite it. +nd finally, nma#e and lin# messages are appended to special .E>> files. ,0!: files and these instructions are now stored as rich te&t files 7file e&tension .>T%) to enhance compatibility. ;pdated these instructions to reflect all the changes. SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS The optimal bet algorithm is one suggested by Dr. Brett 1arris in his paper, "The Theory of Optimal Betting 0preads, which can be found here' http'JJwww.blac#$ac#forumonline.comJcontentJTheoryTofTOptimalTBetting T0preads.pdf !'m fooling around with a simpler approach that eliminates the intermediate 4M spread calculation. This may appear in a future "ersion of 0co<alc. +nother e&citing future impro"ement in"ol"es a new format for the .0T> strategy files, which would be far more fle&ible, yet "idiot proof" and easy to understand. "0ome day" !'ll loo# into se"eral speed enhancements. !'ll also loo# into creating Windows type forms for inputJoutput with the 9Basic A;!. But if it loo#s li#e this will ma#e =ower0im less "hac#able" that may not happen. Then ! have to re"erse the shoe numbering system so the top of the shoe and discards 7TO=E(F and TO=EMF) is e,ual to the number of cards remaining, and the BOTTO:EF "ariables are always -ero, and thus become

unnecessary. ! had it this way in the XB& "ersion, but adapted =ower0im from an earlier "ersion, for some reason ! can no longer recall. +nother possible impro"ement would be to ha"e the program output hands that are collected before end6of6round when the 1andsDisplay option is on. 74ow, you ha"e to =ause the program in =DE mode, and "isually chec# the 1andEF "ariables.) !'"e had "ersions of this program with a few lines written in allowing user input for playing the hands, turning it into a practice program of sorts. But ! wouldn't recommend it. There is a fine blac#$ac# practice program a"ailable for free on http'JJwww.blac#$ac#forumonline.com . E"entually B* =ower0im may branch out into se"eral "ersions[ one optimi-ed for speed, another optimi-ed for do-ens of rules "ariations, another for strange strategies ... but !'d li#e to #eep the core =ower0im source optimi-ed for simplicity and fle&ible patching. I nee! your suggestions' Blac#$ac# =ower0im is yo*r program, in e"ery sense of the word. !t's not e&clusi"ely yours, of course 66 it belongs to the world 66 so be generous with your time and talent. !f we pool our resources, we can ma#e B* =ower0im the coolest blac#$ac# simulator a"ailable at any price55 ! loo# forward to many hours of stimulating discussions J comments J criticisms on www.blac#$ac#forumonline.com . +gain, your user name is powersim and your password is temp . 3.;.<... 73ift ;p <ounting .nowledge) ET %an etfan/(Vhotmail.com

You might also like