I like python
March 10, 2007
I just got done reading
- Chance
by Amir D. Aczel, which was a fun, quick book about probability and how it applies to various scenarios in our lives, including gambling. This book was by no means a rigorous study, but it had some good explanations on determining probabilities for simple situations. What I got out of it was a little motivation to revisit my gambling past and, along the way, mess with python.
One of the blackjack games I used to play had a side bet called a “Royal Match”, which was basically a bet that 2 cards of the same suit would be dealt to you. The probabilities for this side bet when playig with a full deck of cards is fairly straight forward. But I wanted to run some simulations to see what the probabilities looked like at various points dealing from a randomly shuffled deck. So I started writing a python script to simulate any number of decks being dealt and to determine probabilities. Within a few hours I had all the data I wanted generated by this script. I used a few online references for some syntax help, but it was relatively painless to whip out the script. So I think I’ll start using python more often for prototyping algorithms and such.
As far as the results of the Royal Match bet, I’m working to devise a count that can take advantage of positive situations. As soon as I get to a point I’m happy with I’ll add it to my projects page.