Wednesday, January 19, 2011

Cribbage (part 1)

Well, as requested on my previous maths post (I won't go so far as to say "by popular demand"), I'm going to do a brief analysis of the game of cribbage.

Cribbage, for the uninitiated, like some variants of poker, involves choosing which card or cards to throw out to maximise the number of points you're likely to get.  You can score points for your hand by having runs, combinations of cards that add up to 15 in value, pairs, three of a kind, four of a kind, flushes, and a strange one-point bonus named "one for his nob" <cough>

The variant of cribbage we'll work with here involves starting with 5 cards, and throwing one out. A single card, the "starter", is then chosen which acts as an extra card for your hand, replacing the one you discarded. Often you'll need to decide whether to take the risk and remove a card which might be useful in the hope that something better will come up as the starter.

Let's say you pick up this hand:

4♠ 4♣ 6♣ K♣ K

So, what do you do?  All you know about are the cards that you picked up, and nothing about what the other player(s) might have.  The starter could be any of the other 47 cards in the deck with equal probability.

If you discard a 4, you'll destroy one of the pairs, losing you 2 of the 4 points already in your hand.  But if the starter comes up 5, it'll score you 11 points.

If you discard a K, you'll again destroy a pair.  But again, if you pick up a 5, you'd score a tasty 14 points!

Finally, if you discard 6♣, you will have two pairs tucked away safely in your hand for 4 points.  However, the best you can do from that point is get an A, which will get you 12 points.

By running through all 47 possible starter cards, we can work out (using the magic of computers!) every possible outcome of each choice.


Discard Minimum Average Maximum
4♠ or 4♣23.6611
6♣45.5312
K♣ or K24.2614

So if you're trying to get as many points as possible, your best option is to discard 6♣ even though the best case scenario is only possible if you discard a K.  Even the option of discarding a 4 is almost as good as discarding a K, even though you can only score a measly 11 points.

A couple of histograms give a better idea of what is possible.  For 6♣:

Most likely we'll only get 4 points for our hand - but that's the worst we can do, and there is still a small chance of doing better. The red line shows us what'll happen on average, so a little over 5 points.

And for discarding a K:
In this case, we are most likely to get only 2 points, though getting 4 points is also a definite possibility.  Getting any more than that, though, is even more unlikely than if we discarded 6♣.  On average (red line) we won't even score 5 points!

So we see that in this case, the potential benefits are outweighed by the risk.

However, just like in Pass the Pigs, our aim isn't just to rack up as many points as possible - our aim is to win! If our opponent is very nearly at the finish line and we need 14 points to win, then our best option would then be to discard a K, because it's the only way to win the game.  In a situation like that, the utility of the amount of points changes, and near enough is no longer good enough!

4 comments:

  1. Ahhh crib...I always get beaten by my mother! Nice to know. Can you crate a document that will instruct me on every possible hand and what is the best card to throw out...I tend to pick the wrong one!!!

    ReplyDelete
  2. I would've thrown a 4 probably! I likes me some 5's. LOL.

    Good read as per usual.

    And I second Neepy's comment. DO ONE FOR EVERY PERMUTATION! Dance for me!!

    ReplyDelete
  3. But you are also neglecting the fact that the card you discard goes to the crib, and who gets the crib? If you get it, you have the potential to win more points. If your opponent gets it, then you might give them more. I play with 6 cards, discarding 2, which can make it sometimes more difficult to choose which two to discard, especially when it isn't your crib. You have to be crafty as well, so you want your opponents cribs to be rubbish, whilst still giving you a good points score.

    Need some real life opponents though. Who's keen?

    Cheers, Robbie B

    ReplyDelete
  4. Hi Robbie B,

    You make a very good point - I fully confess that what I was doing was quite a simplistic analysis suitable for a quick and cheap blog post ;)

    I have, however, done some reading about the more complex problem of taking into account the card you throw into the crib (or cards, if you play the more common 6-card version of cribbage). You can take it a step further and also take into account where in the game you are as well - your strategy if you are both 3 points from pegging out will often be very different from the start of the game!

    I will try to return to this topic soon! Not sure I'll be able to do any meaningful analysis though; at the "cutting" edge of cribbage things start to get a lot more confusing...

    ReplyDelete