- For individual users
- Instant access to solutions
- Ask your tech questions
- Start your 30-day Free Trial
Main Topics
Browse All TopicsHello,
This one is tough. I've been programming games for a long time but haven't considered how to calculate EXPECTED VALUE for blackjack. The problem (for me) stems from the fact that I don't know how to setup a simulation because, literally, I don't know how many hits or splits or going to occur. By doing a little research it turns out we need to use a recursion algorithm with combinatrics to determine the expected value.
see http://www.tqsports.com/bl
or http://www.wizardofodds.co
The program needs to return the expected value for each of four "limbs" of a decision tree:
1. Hit
2. Stay
3. Double Down
4. Split
If we sum all of the expected values for a single "limb", we get the expected value for that branch of the decision tree. The "limb" with the highest expected value is the correct decision for that situation.
There are a certain number of outcomes that end a branch of a decision tree, using a base unit of '1' we get:
win = 1.0
lose = -1.0
push = 0
natural = 1.5
X = the set of known cards (a list)
Y = the set of unknown card (a list)
Pwin(X,Y) = the probability that given X known set of cards and Y unknown set of cards that we will WIN the hand
Plose(X,Y) = the probability that given X known set of cards and Y unknown set of cards that we will LOSE the hand
Ppush(X,Y) = the probability that given X known set of cards and Y unknown set of cards that we will PUSH the hand
Pnatural(X,Y) = the probability that given X known set of cards and Y unknown set of cards that we will NATURAL the hand
expected value for a "limb" of the decision tree may therefore become:
E.V. = Pwin(X,Y)*(1.0) + Plose(X,Y)*(-1.0) + Ppush(X,Y)*(0) + Pnatural(X,Y)*(1.5)
Well, that is as far as I know how to get. I don't know how to calculate the probabilities beyond that.
Is there anyone here that knows how to point me in the right direction? I just can't fathom how to tackle this problem.
Thanks for any advice. I know that I can't expect a solution here, but if you could help me with the SETUP of this problem I would really be happy.
sapbucket
This question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership