Cribbage and the Python
You get beautiful designs when you build simple things that compose correctly. - Chris Lattner I’ve been ramping on on writing software for AI, and Python is the language of AI. So I thought to myself, could I write a Cribbage Engine in Python, wrap it in Gymnasium and then use Stable Baselines to build an RL agent that could play cribbage well through re-enforced learning. Welp, I’m not there yet, because I built the cribbage engine and started doing some statistical analysis and have gone done the rabbit whole of programmatic cribbage and statistical regression. Cribbage holds a special place in my heart. When I first met Mrs.Chaos somehow the topic of cribbage came up and we learned that both of us had played a lot of cribbage. It is not a popular card game. She beat me at cribbage... a lot. So, all that time ago, being the nerd I was (am?) I wrote a little engine in JavaScript where you put in the six cards in your hand and it would do a very basic calculation to tell what to d...




