File Exchange

image thumbnail

Blackjack

version 1.2.0.1 (6.3 KB) by

Play individual hands of the card game, or simulate a session.

21 Downloads

Updated

View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

Blackjack is now also descibed in a Cleve's Corner article in MathWorks News and Notes, http://www.mathworks.com/company/newsletters/articles/simulating-blackjack-with-matlab.html .
One of the less mathematical programs from an electronic textbook, "Numerical Computing with MATLAB®", by Cleve Moler. The book, and more programs, are available from http://www.mathworks.com/moler. A hardcopy edition of the book is available from SIAM.

Comments and Ratings (10)

@Mark. Don't run the blackjacksim file, just the run the blackjack.m file. The blackjacksim.m file is where all of the functions are stored

raif ozcan

IS THERE ANYWAY TO ADAPT BLACKJACKSIM TO EUROPEAN BLACKJACK RATHER THAN HAVING HOLE CARD TO NO HOLE CAR?THANKS

Mark Turnbull

Hey I'm getting these error message;
Error using blackjacksim (line 8)
Not enough input arguments.

Error in run (line 96)
evalin('caller', [script ';']);

Am I being missing something?

Bill Rooker

Hello, when I play the game, I get a warning -- see below. I'm now using R2014b -- it's been a while since I played this. Are there any updates to this?

"Warning: Symbol font is no longer supported. To display special characters,
use TeX or LaTeX markup with the Text Interpreter property set to TeX or
LaTeX."

Best regards,

Bill Rooker

Chris Clayton

I've been writing my own. This is truly great. Better than I would've done! Great job!

stamatis

Can you help us with the code?
One demo m-file would be very usefil.
Thank you

Mike Iori

Options are a bit limited (i.e. Can't vary bet size), but otherwise it's a very good simulation.

Kevin Holst

well made, i really enjoy the simulation. personally i'd love to see the option for various card counting strategies to see how they stack up.

Ramón D. Díaz

Great Program. With a couple of tweaks I will use it to calculate the specific advantage using modified basic strategy under the rules of my particular casino.

Thank You for writing this. You saved me a lot of work... and probably money too ;)

Let me know if you are interested in the couple of tweaks I'll be working on...

dfdggg retddg

Updates

1.2.0.1

Updated license

1.2

Rewrite of program to improve handling of callbacks.

MATLAB Release
MATLAB 7.14 (R2012a)
Acknowledgements

Inspired: Blackjack computational kernel

MATLAB Online Live Editor Challenge

Win cash prizes and have your live script featured on our website

Learn more

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video