Quote:mustangsallyThe OP shows a link to non-Excel CA (BJSTRAT) that is fast in my Win10 laptop except when wanting splits up to 4 hands, then it takes well over an hour for only one computation.

Excel is way too slow in comparison as it is not compiled as C or C++ can be.

Ion Saliu, iirc, did a CA (all permutations, no suits) on single deck BJ and the text files are massive as expected.

imo, the project asked for can NOT be done successfully in Excel.

The one for Baccarat the OP mentions is over 300k rows in Excel (combinations and permutations) and older Excel can not open that.

The number of 6-card permutations only for Baccarat is exactly 1 million rows and that slows down even for newer Excels using over 5 columns.

I would say, one would do way better by staying away from Excel for what the OP requests.

btw, imo, if it was possible, I say it would have already been done

I mean Dr. Thorp started massive computer work

and knows about combinations and permutations

and if it was possible, someone could have done that by now

Sally

i tried to learn C C++ many times, but failed at the beginning. so even i have code from others, i don't know how to use it.

for bac, i used 146971 lines to finish all combinations:4998398275503360 more than 20 columes, to caculate all side bets. i finished this task after many give-ups. but thinking there was a hongkong guy who can do it and i saw the file and lost it. so i kept redoing it after giveups.

for blackjack, maybe it will be easier to give up because nobody have done it before.

i finished blackjack dealer's hands

https://wizardofodds.com/games/blackjack/appendix/2a/

Blackjack Appendix 2: Dealer Probabilities

all is by excel, and the way is like bac. to show put all combinations in it.

it must be 12 cards,

because dealer can be 12 cards to make a hand.

312 311 310 309 308 307 306 305 304 303 302 301 686,807,714,636,276,000,000,000,000,000

1 1 1 1 1 1 6 1 1 1 1 1

1 1 1 1 1 1 6 1 1 1 1 2

1 1 1 1 1 1 6 1 1 1 1 3

1 1 1 1 1 1 6 1 1 1 1 4

1 1 1 1 1 1 6 1 1 1 1 5

1 1 1 1 1 1 6 1 1 1 1 6

1 1 1 1 1 1 6 1 1 1 1 7

1 1 1 1 1 1 6 1 1 1 1 8

1 1 1 1 1 1 6 1 1 1 1 9

1 1 1 1 1 1 6 1 1 1 1 10

there are some tricks to do all at 12 cards.

like A 10 ************ 24*96*310* 309 *308 *307 *306*305*304 *303 *302 *301

(the bad thing about excel which killed my 2 days is that excel cannot calculate huge numbers well.)

i will try to finish the left things to check how computer can play the game.

now my thread is to delare rather than to ask.

excel can calculate very large numbers, it only displays accuracy to 15 placesQuote:tomchina123because dealer can be 12 cards to make a hand.

686,807,714,636,276,000,000,000,000,000

(the bad thing about excel which killed my 2 days is that excel cannot calculate huge numbers well.)

P(312,12)

686,807,714,636,276,391,560,347,545,600

http://www.wolframalpha.com/input/?dataset=&equal=Submit&i=P(312,12)

or in pari/gp (free program)

(09:09) gp > 312!/(312-12)!

%3 = 686807714636276391560347545600

GP is great when you really want the exact values and very easy to add them up

to keep them exact.

There are precision programs and add-ins to allow Excel to do just that too.

I tested it (xlPrecision) years ago and was impressed (ok, easy, I know)

I am sure a Google search can find more

good luck

Sally

Quote:charliepatrickWith a bit of smarts (for instance P:10 9 B:10 10 is the same as P:9 10 B:10 10 but add a column to say can occur 2x reduces it quite a bit (3025 rather than 10000). Then some of these won't take more cards (or only one). So this gets it down to about 103k more lines (in my excel this has to be split across two sheets).

I've never tried (except for the push 22 sidebet) to look at all 54k combinations of the dealer's hand on s17 (which I created using a program and then worked out what I needed to know for each one).

I'm guessing you need to keep a database of combinations you've already analysed (e.g. 6 3 2 A is the same as 6 2 3 A, A 2 3 6, A 3 6 2 (yes I know you wouldn't hit soft 20 but the computer has to work that out!).

Charlie:

I have developed Excel algorithms to calculate the probabilities of Dealer 17-21 as a function of the shoe composition and the dealers upcard. These algorithms account for dealer hands that have up to 6 cards drawn to the upcard and in some cases that have 7 cards drawn to the the upcard. While this does not cover every possible multi-card hand (especially when hitting a dealer 2) it does give perfect agreement up to at least 4 digits for the dealer probabilities for 17-21, as compared to BJstrat calculator. I do indeed take advantage of "permutation/sequence folding" of the type that you mention, and I do it massively (and carefully) for hands with large numbers of cards.

On a worksheet that is dedicated to "vs. 10" or "vs. 2" (or whatever) I then list all the possible player hands in a column. A "player hand" is defined as any string of cards whose sum exceeds hard 16 without ever having made a soft 18 or higher (or soft 17 higher for D17 rules) or a sum exceeding soft 18/19 or higher. For each string of player cards, the remaining shoe composition is then redefined in the row to account for the cards in players hand and the algorithms for dealer outcome probabilities are then used to calculate the EV for that string of cards. Other than ignoring dealer hands of 8 cards or more and player hands of 9 cards or more, the only approximation I use is for splitting and resplitting pairs (other than Aces) -in which case I use a recurrence-type approximation.

There are a lot of tricky parts to this -one is player strategy (and optimization) as a function of the dealer up card and shoe composition. Another is the calculation of the split pair probabilities. And obviously, changing the game rules is a very significant undertaking requiring developing a customized set of spreadsheets.

For operational convenience, I usually configure a separate spreadsheet for each dealer upcard because having the entire set of spreadsheets open is hard on my computer. The vs. 2 and vs. A spreadsheets are particularly large.

This gives me a compositionally-dependent calculator capability in Excel for Blackjack House Edge that I have then adapted to handle blackjack variants -such as games with Push 22, Push on 16 and other weird rules variants. Again, the caveats are:

- hands of 8 or more cards are usually not included in dealer probabilities or 9 or more cards in set of possible player hands

- calculated values of dealers probabilities are not verified for more than 4 digits of accuracy (that is as much as BJstrat calculator provides)

- recurrence approximation is used for calculating the EV of the "n+1 hands" when splitting and re-splitting pairs (except split Aces which are treated rigorously.)

- I also do not routinely include the capability to evaluate player hitting H17 and higher and S19 as higher. That would significantly expand the size of the spreadsheets.

Quote:mustangsallyexcel can calculate very large numbers, it only displays accuracy to 15 places

P(312,12)

686,807,714,636,276,391,560,347,545,600

http://www.wolframalpha.com/input/?dataset=&equal=Submit&i=P(312,12)

or in pari/gp (free program)

(09:09) gp > 312!/(312-12)!

%3 = 686807714636276391560347545600

GP is great when you really want the exact values and very easy to add them up

to keep them exact.

There are precision programs and add-ins to allow Excel to do just that too.

I tested it (xlPrecision) years ago and was impressed (ok, easy, I know)

I am sure a Google search can find more

good luck

Sally

Thanks, Sally, i like this name.

here i show how excel cannot do big number. like

a=999,999,999,999,999,000

b=999,999,999,999,989,000

a-b=9,984

it is wrong answer.

for your info, i am sure it will be helpful.

Quote:mustangsallyexcel can calculate very large numbers, it only displays accuracy to 15 places

P(312,12)

686,807,714,636,276,391,560,347,545,600

http://www.wolframalpha.com/input/?dataset=&equal=Submit&i=P(312,12)

or in pari/gp (free program)

(09:09) gp > 312!/(312-12)!

%3 = 686807714636276391560347545600

GP is great when you really want the exact values and very easy to add them up

to keep them exact.

There are precision programs and add-ins to allow Excel to do just that too.

I tested it (xlPrecision) years ago and was impressed (ok, easy, I know)

I am sure a Google search can find more

good luck

Sally

Thanks, Sally, i like this name.

here i show how excel cannot do big number. like

a=999,999,999,999,999,000

b=999,999,999,999,989,000

a-b=9,984

it is wrong answer.

for your info, i am sure it will be helpful.

you reminds me of a friend in Romania, his name is Alex. who owns a company of renting rental equipments of moving stage, like PRG. he wrote emails of your style, very long and logical. have you been a teacher before? i am curious.

Quote:tomchina123gordonm888, thanks.

you reminds me of a friend in Romania, his name is Alex. who owns a company of renting rental equipments of moving stage, like PRG. he wrote emails of your style, very long and logical. have you been a teacher before? i am curious.

Thanks for the kind words. I taught physics in college when I was a graduate student, and I have always had a gift for explaining complex subjects, which has helped me greatly in my career as a scientist.

Quote:gordonm888Thanks for the kind words. I taught physics in college when I was a graduate student, and I have always had a gift for explaining complex subjects, which has helped me greatly in my career as a scientist.

you are welcome. and i tough english in college when i graduated. and i have alway had an interest for learning complex physics subjects.which helps me greatly in my study of gambling probabilities. , high probably, my scientist-minded way made me a failure when my career was factory-owner, i went too deep on electromagnetic things of the LED screen when i shoud have cared for production more.

i have a question, check this linK:

https://wizardofodds.com/games/blackjack/appendix/1/

if you have a hand of score 6, dealer is 8. the ev of standing and hit once should be the rougly the same, right? but why is the EV data in this link so different?

if not hitting once, then how many times to hit to finish all the logic? why is the decision of every point not independent?

to go further, the score 6 includes 33 or A5 or not?

the 1st question is the more important.