Flanny.app
Apps Blog Me

Blackjack Simulator

Always split 8s

February 2018

A major project for Michigan computer science students to program is Euchre, a card game similar to Bridge. It was annoying for out of state students (if they hadn’t already been taught the game by friends), because the rules are tricky to program even if you already know them.

After this project, I had a repo with a deck of cards. If had programmed one game, maybe I could program another. I was planning a graduation trip top Las Vegas, so naturally I wanted to improve my Blackjack skills.

I programmed a Blackjack simulator that was meant to help quiz me on basic strategy, and maybe even card counting. I programmed a few players:

  • Random
  • Basic
  • Human
  • and Card Counter

These players each had chips they could bet with. They would all sit at the same table and play until they lost everything or hit a threshold. It was fun to see that the card counter brain tended to outlast the basic strategy brain, and consistently outlasted the random brain.

At the end of this project, I realized actually learning from my program was of no interest to me. I only enjoyed programming it. So it never fulfilled its original stated purpose as a teacher.