Royal Cribbage 3.1: a review

The Cribbage King
Royal Cribbage 3.1
 
By Tim Schempp. Published 2001. Requires Microsoft Windows 9x or later. Freeware, available for download here
If I could have my dream cribbage program, it would:
  • Be pleasant to look at
  • Play at expert level
  • Keep statistics and a log of games played against it
  • Support duplicate play
  • Offer a complete set of analysis features, including game hints, calculation of discard and pegging averages, and the ability to evaluate and play out either a specific game situation or an entire user-inputted game

Programs comparable to this are available to enthusiasts of chess and backgammon, but those high-profile games have long drawn the attention of the computer industry. Deep Blue and TD-Gammon are examples of what a talented development team can do with ample institutional support. This has yet to happen in cribbage, and it's frankly unlikely that anything resembling my dream program will appear on the radar of IBM or Microsoft. But fortunately, cribbage has attracted the attention of freelance programmers who have labored with little or no remuneration to bring forth software that has significantly advanced our understanding of the game. It is through the efforts of individuals such as Bruce Bowman (author of Cribbage Master), Craig Hessel (author of Cribbage for Windows 97) and Hal Mueller (author of HALSCRIB) that cribbage-playing software has come as far as it has.

Into this elite group of programmers steps Tim Schempp, whose new effort, Royal Cribbage 3.1, can be added to the list of must-have programs. Is it the fulfillment of my cribbage software dreams? Well, read on...

Specs and look and feel

Royal Cribbage 3.1 is freeware, and can be downloaded from Schempp's Web page, along with a technical description of the program's pegging and discarding algorithms, and a spreadsheet detailing some statistical findings generated by playing the algorithms against themselves (more on this later). Royal Cribbage should run OK under any 32-bit version of Windows. It does not demand a lot of system resources, and I've had no trouble using it on computers with as little as 32 MB of RAM. Performance is about what you'd expect for a program of this type. It should run acceptably fast on any computer capable of supporting Windows 95 or later. On my old 120 MHz laptop with Windows 98 SE, I notice a delay of a few seconds on each deal as the computer selects its discard, and again when it plays its first card, but otherwise find that the action proceeds instantaneously. On newer PCs running Windows 2000, I notice no delays at all.

The user interface is straightforward and easy to use. The colors and fonts are easy on the eye, and the screen layout works well all the way down to 800 x 600 resolution, making the program suitable for laptops with smaller displays.

When you launch Royal Cribbage, you are presented with the following welcome screen:
 


 

As you can see, Royal Cribbage allows you to set up multiple human "players". Any of these players can take on the program's alter ego, known as the Cribbage King. You cannot, however, use Royal Cribbage to play another human over a network as you can with Keith Westley's Ultimate Cribbage.

Royal Cribbage will tabulate your wins, losses and game scores against the Cribbage King, keeping separate totals for each player you've defined. However the program only retains 99 games' worth of data for each player, so if you wish to track results longer than that, you will need to add a new player every 99 games. Royal Cribbage also tabulates the average value of hands, cribs and pegging for each human player and for the Cribbage King. Unfortunately though, the usefulness of these figures is diminished by the way the program handles the last deal of each game: it records a value of zero for any hand or crib that is not counted. Thus, if you hold a twelve point hand on the last deal, but don't get to count it because your opponent pegs out first, your hand is averaged in at zero points, not twelve points. As a result, the hand and crib averages tabulated by Royal Cribbage are artificially low, as evidenced by the numbers shown above. If you are looking to develop your own board strategy by compiling average hand, crib and pegging statistics, you'd be better off using Cribbage for Windows 97, which ignores the last deal entirely for purposes of computing scoring averages — in my opinion a much more sensible approach.

Clicking on the Let's Play Cribbage button launches a new game. Here is a typical game screen, taken from one of my matches against the Cribbage King:
 


 

My cards are on the bottom. They are not sorted on the screen, but are instead displayed in the order in which they were "dealt". I like that, because expert players usually don't sort their hands (doing so increases the risk of inadvertently flashing or dropping a card, and may give an alert opponent clues about your hand composition). Playing against the Cribbage King is a good way to develop fluency at recognizing card patterns in an unsorted hand.

Royal Cribbage displays the game score both numerically and as a depiction of a cribbage board. In the above example I'm leading the computer 24-17*. The crib owner is clearly indicated by the large arrow on the right of the screen (in contrast to some programs where it's difficult to tell at a glance whose crib it is). Cards are selected and played by single-clicking on them. If you are discarding to the crib, an additional click is required to confirm your choice, a helpful precaution against accidental selections. The computer counts and scores hands and pegging automatically — there is no Muggins option.

Clicking on the Save button (the diskette icon just to the left of the ? button) allows you to save the current game state for later retrieval. This is a nice feature if you have to interrupt a game in progress, and it's not found in every cribbage program. There is no game log though, so once you've finished a game, it is gone forever. You also cannot tell the program to start with a predefined game state in order to practice endgames or analyze a specific play. Nor is there a duplicate option, which would allow you to replay a game with the same sequence of cards.

The percentages shown toward the top of the screen indicate Royal Cribbage's estimate of each side's winning chances at the current score. Clicking on these numbers gives a more detailed breakdown:

At 24-17*, Royal Cribbage figures I have a 54.2% chance of winning the game, with a 7.5% chance of winning a skunk. This seems about right to me, given that the Cribbage King is dealing from one point behind the positional hole, while I've already surpassed the positional hole by six points. The winning percentages are taken from a database of estimated game equity values for every possible score. They are displayed at the start of each deal, and do not reflect the six cards dealt to each player.

Game equity values play a crucial role in Royal Cribbage's playing algorithms. Whenever it must make a discarding or pegging decision, the program calculates the likelihood of victory for each possible play by predicting the resulting score at the end of the deal, then looking up the game equity value at that score. The program then selects the play that appears to produce the highest winning chances. (Actually this is a gross simplification, but if you're mathematically-inclined you can read the full technical description at Schempp's Web page).

Help me

At any time, you may click on Help to solicit advice from Royal Cribbage. The program will then tell you what it would do if it was playing your cards. Consider the above position, in which I was dealt 2-2-6-7-8-10 at 24-17*. Which two cards would you expect Royal Cribbage to recommend tossing to my opponent's crib?

The answer: 8-10. Did this surprise you? It certainly surprised me. But there is method to the computer's madness, as revealed by clicking on Details, which brings up a statistical analysis of all the possible discards:

Although 2-6-7-8 gets the best average hand and expected average, Royal Cribbage feels that 2-2-6-7, with its three card magic eleven, is a far better pegging hand. If I keep 2-2-6-7, the program estimates that dealer will underpeg me by 0.194 points, but will outscore me on the entire deal by 4.726 points. If I keep 2-6-7-8, Royal Cribbage predicts dealer will outpeg me by 1.685 points, and outscore me on the entire deal by a total of 4.839 points. Accordingly, the program advises me to keep 2-2-6-7, which it reckons will increase my winning chances by about 0.1%.

Schempp averages

To obtain a baseline pegging value for each of the 1,820 possible four-card cribbage hands (independent of suit), Schempp ran the hands through his pegging algorithm both as dealer and as pone, repeating the trials until the results had stabilized. The pegging averages derived from this technique are used by Royal Cribbage's discarding routine. After releasing Royal Cribbage 3.1, Schempp reran the trials using a later version of his pegging algorithm. The results of these trials, which produced somewhat different values than those used by Royal Cribbage itself, are available in an Excel spreadsheet that can be downloaded from Schempp's Web site. Below are a couple of sample entries from this spreadsheet:

Hand: Pone: Dealer:
  Diff.     (pone/dealer)     Diff.     (pone/dealer)  
4-4-5-6 -1.2 (2.7/3.9) +2.2 (2.4/4.6)
4-5-6-6 -1.4 (2.8/4.2) +3.1 (2.0/5.0)

The results indicate that as pone, 4-4-5-6 will peg 2.7 points on average and give up 3.9 points for a difference of -1.2 points. As dealer with the same hand, you will peg 4.6 points and give up 2.4 points for a difference of +2.2 points. Note that due to rounding, the difference value may drift by .1 point from the corresponding pone/dealer values.

How accurate are these figures? It's not clear. But in general, I would say that the values for dealer hands are probably more accurate than the values for pone hands. Computers are still learning how to peg decently, and their weakness at this phase of the game is most pronounced when they're handling the cards as pone. In particular, they tend to have trouble finding the right opening lead. The two hands listed above are a good example of this. Take another look at the pone pegging averages for 4-4-5-6 and 4-5-6-6. They're about the same, aren't they? But shouldn't 4-5-6-6, which contains a very effective 5 trap in the 4-6-6, peg considerably better than 4-4-5-6?

Well it should, but only if you lead the right card:

 K  6  5  4 (31-5)

I suspect that the pegging algorithm instead insists on leading the "safe" 4, thus missing out on the five pegging points that a 4-6-6 combo is guaranteed to score against 5-x-x-x or 5-5-x-x. This appears to be a case where the pegging average for a particular hand is underreported simply because the algorithm misplays it.

Further distortions are introduced by the algorithm's assumption that both sides are playing cautious offense (i.e., attempting to outscore their opponent). The possibility that either side might be playing on or off is not factored into the averages. Additionally, the algorithm disregards suits, which could cause "uncorrelated" hands, which might appear in a real game as flushes, to be underrepresented in the sample set. Given all this, these "Schempp averages" should be taken with a sizeable grain of salt. But they're nevertheless an important early step in the effort to more objectively assess pegging potential, and Schempp is to be credited for publishing the first comprehensive survey of its kind. I expect I'll have more to say about these averages in future Cribbage Forum articles.

More help

Besides analyzing discarding decisions, Royal Cribbage also gives pegging advice. Suppose you're dealing at 18*-24 when you receive 4-5-6-10-10-J. You toss yourself 10-10, the cut is a J, and pone leads a 2. What's your reply? Clicking on Help brings up Royal Cribbage's recommendation:
 


 

Clicking on Details reveals a more extensive analysis:

Here Royal Cribbage thinks that playing the 6 (instead of the 5) improves your winning chances by about half a percent. The reason is for this is found in the percentages at the bottom of the screen, which denote the estimated likelihood of your opponent holding a card of each rank. Based on the visible cards, Royal Cribbage figures that pone has a 45.8% chance of scoring on your 5 play, but only a 44.1% chance of scoring on a 6. Furthermore, if you play your 6 now and pone plays a 7 for a 15-2, you can then retaliate with your 5 for a 20-3, whereas if you play your 5 now, there is no way that you can retaliate on your opponent's score.

OK, but can it play?

Schempp has been working on his cribbage algorithms since 1992, and his experience shows. The Cribbage King has a remarkably good grasp of basic discarding technique. I was impressed, for example, when it tossed itself 5-K instead of 5-Q from A-2-3-5-Q-K on the first deal of a game (according to Rasmussen's discarding statistics, a K is a better choice than a Q to accompany a 3, 5, 7 or 9 in your crib). The program also knew to toss itself 2-3 from A-2-3-4-10-Q (this returns better expected averages than tossing A-x or 4-x).

The Cribbage King pegs pretty well too. It follows Colvert's rule, and will usually lead a 5 on the second play series to avoid traps in situations like this:

K  8  Q  3 (31-2)    5!  7  K  6 (28-1)

It even finds the occasional nuance that would elude most human players. Leading a 10 from 5-5-10-Q is one such nuance. Most players would probably lead the Q instead, reasoning that dealer is less likely to be able to pair a Q lead than a 10 lead. But this leaves the 10 vulnerable to being trapped into a run on the second play series:

Q  9  5  5 (29-3)    Q  10  J (28-4)    10 (10-1)

By starting with the 10, and saving the more run-proof Q for last, the Cribbage King will give up more pairs, but fewer runs, over the long haul.

Royal Cribbage does have its share of pegging proclivities though. For instance, it will frequently lead the lower card from an A-4 or 2-3 combination for no good reason. (Usually, of course, you want to lead the higher card to prevent your opponent from safely playing a 5 or 6). Also, the Cribbage King does not appear to take suit into consideration when making pegging decisions. As a result, you can often obtain an advantage if you're holding a flush, since the program is less likely to correctly predict your full hand after seeing two or three cards. The Cribbage King also does not play flush fakes, at least not intentionally.

The lynchpin of Royal Cribbage's playing strength is its board strategy algorithm, which — as previously mentioned — relies on a table of game equity values for each possible score. When the Cribbage King makes a discard or pegging decision, it is not simply trying to obtain an immediate tactical advantage, but is instead calculating the estimated game winning chances for each candidate play. This sensitivity to board position allows Royal Cribbage to make some nifty strategic moves. Not just obvious ones, like tossing me 9-9 from A 2 3 7 9 9 at 84-82*, or A-10 from A 4 5 10 J J at 97-84*, but nice plays like the following:

  • Tossing me 10-K from 3-7-7-10-10-K at 44-44* and 10-K from A-3-4-7-10-K at 77-67*, sacrificing two points for defense in both cases
  • Sacrificing four points for defense by tossing me 2-K (instead of 2-4) from A 2 4 5 10 K at 65-73*
  • Breaking up 2-5-6-7-10-J at 95-97* to toss me 6-10, the safest possible discard
  • Tossing J-K from 5-6-7-8-J-K at 90-77*, ensuring that it would get into good Fourth Street position. How many average players would play it "safe" here by tossing 8-K instead?
  • Going for it by playing a K (instead of the safe A) on my J lead with A-4-10-K at 52*-54, having dropped 2-8 to its crib and seen a 6 cut. Here the Cribbage King understands that it needs offense, and that it's worth giving up a three-card run in exchange for an opportunity to peg two points for 31
  • Playing 6 (not 5) on my 10 lead with 4-5-6-J (Q cut) at 83*-73, holding me scoreless as a result:

    10  6!  J  5 (31-2)    5  J (15-2)  5  4 (24-1)

    If the Cribbage King had instead taken a 15-2 on my 10 lead, the two points I'd have pegged in retaliation would have proved decisive, as I ended up falling two holes short on the final deal

Mind you, the Cribbage King's board strategy is not perfect. At 41-34* it tossed me the defensive 10-K from 2-2-5-7-10-K. A more prudent move in that position would be to keep four points with 2-2-5-10. Conversely, at 45-40*, a score at which one should be playing off, the Cribbage King tossed me 7-8 from 7-8-10-J-J-Q. A better idea is to break up this hand and toss 7-J or 8-J instead. Positional errors such as these seem to be caused by inaccuracies in Royal Cribbage's database of game equity values. For example, with the score tied at 66, Royal Cribbage reckons dealer has a 51.1% probability of winning. But most expert players I know would prefer to be pone at this score. Likewise at 42-43*, pone is given only a 39.0% probability of winning, but in reality the game is pretty much a tossup at this score, with perhaps a slight edge for pone. On the other hand, at 87-80* Royal Cribbage considers pone to be a 67.1% favorite, a figure that seems way too high given that pone has only a one point positional surplus and must contend with an opponent who will likely be playing defensively.

In general though, the Cribbage King's board strategy works more often than it fails. And it often allows the computer to stay competitive in games that would otherwise be blowouts. Like an expert human player, the Cribbage King often seems to be extraordinarily lucky, drawing key cuts at just the right moment. But one thing board strategy can do is put you in a position to benefit from exceptionally good cards when they come.

Endgames are usually the Achilles' heel of cribbage programs. The peculiarities of Fourth Street often require making plays that would be unthinkable earlier in the game. It's not surprising that a silicon player programmed to follow general principles of sound play would get into trouble as the game winds down. Royal Cribbage handles Fourth Street better than most, but it can still stumble. Here's one example:

PONE  (114):
Schell


2 5 9 10

 play:
   2  Q?  10!  4  5 (31-2)    A  9  Q (20-1)   
  crib:   10 Q
3 K
cut 7  
A-4-Q-Q

DEALER  (119*):
Cribbage King

At 119*-114 the Cribbage King kept A-4-Q-Q from A-3-4-Q-Q-K. Normally that's the best keep, since it returns the highest expected average. But needing to peg two points to win, the computer should have kept its best pegging hand: A-3-4-K. The low cards cover three of the four most likely leads, and the K is favored since pone is more likely to be holding a K than a Q (the computer was dealt two of the latter). How might the game have ended if the Cribbage King had kept the right cards and played them in the right order? It would have pegged more than enough to win:

2  A!  10  4  9  3 (29-1)    5  K (15-3)

Here's another example:

PONE  (114):
Schell


6-6-7-9

 play:
   9  9 (18-2)  6  7 (31-2)    6  2?  7 (15-2)  3 (18-1)   
  crib:   7-Q
A-K
cut A  
2-3-7-9

DEALER  (115*):
Cribbage King

The play of the 2 on my 6 lead cost Royal Cribbage this game, and would also have cost it the game if my last card was a 2. In either case, I'd have otherwise fallen one hole short. Presumably the program expected that my last card was a 3, and that pairing it was the only way to win. But playing the 3 first was still best. It loses if my last card is a 3, but wins if my last card is a 2 or 7, and those are much better odds than what the Cribbage King came up with.

Having surveyed the strengths and weaknesses of the Cribbage King's game, the obvious question is: how does it stack up to the competition? Without playing an extended series of duplicate matches against other programs, it's hard to say for sure — but in my opinion Royal Cribbage 3.1 would prevail over Cribbage Master and Cribbage 97 for Windows, and would lose to HALSCRIB. Expert human players should bat over .500 against the Cribbage King. Average human players will find it a formidable opponent.

Conclusion

At the beginning of this article, I described a dream cribbage program with the following characteristics:

  • Is pleasant to look at
  • Plays at expert level
  • Keeps statistics and a log of games played against it
  • Supports duplicate play
  • Offers a complete set of analysis features, including game hints, calculation of discard and pegging averages, and the ability to evaluate and play out either a specific game situation or an entire user-inputted game

How does Royal Cribbage 3.1 compare to my imaginary program? Well, it has an attractive look and feel. The screens conform to Windows standards, and are not cluttered with needless detail. It does not quite play at expert level (at present HALSCRIB is the only program that honestly does), but it is very close. In the future, if Schempp is able to upgrade Royal Cribbage with more accurate pegging averages and game equity values, then I think this will be enough to elevate its play to the level of a strong tournament player.

Royal Cribbage will keep track of your wins and losses, and will also average your scoring from hands, cribs and pegging. The usefulness of these figures, however, is compromised by the way the program tabulates the last deal of each game. Royal Cribbage does not support duplicate play and does not write a game log. It also does not support playouts, nor let you set up specific game situations for analysis. But neither does any other cribbage program currently available.

Royal Cribbage provides useful statistical analysis of situations you encounter in play, and I recommend that you take advantage of this in your games against the Cribbage King. On each deal, after you've looked at your six cards and selected a toss, ask Royal Cribbage for its suggestion. If it differs from your intended discard, try to determine the reason behind the computer's choice. Continue with your original toss and play the hand out as usual. Afterwards, consider what would have happened if you had made the suggested discard instead. Would things have turned out better or worse for you? Was there something in the program's analysis that you can learn from, perhaps a new tactic that you hadn't thought of before? Follow the same procedure when you're confronted with a tricky pegging decision (it's too cumbersome to ask for advice every time you play a card). Don't treat Royal Cribbage's suggestions as gospel — they're often wrong! Rather, use them to stimulate your thinking and to find new ideas. You'll get the most benefit from the program by taking this kind of active approach, rather than mindlessly clicking through a few games against the Cribbage King.

One of the most useful "features" of Royal Cribbage is actually a side effect of its creation: Schempp's table of pegging averages for the 1,820 four-card cribbage hands (independent of suit). The accuracy of these figures is limited by imperfections in the algorithm used to generate them, but they're still the most comprehensive effort to date to answer one of cribbage's most challenging questions: how to objectively assess a hand's pegging potential.

It seems I'm still waiting for my dream cribbage program to arrive. But with the release of Royal Cribbage 3.1, I'm a little closer to that goal. If you're a devoted cribbage player who has access to a PC, then you owe it to yourself to download this program today.

- April 2001


 
<--prior article | Cribbage Forum home | next article-->
Schellsburg home

 

Cribbage Forum features articles on cribbage strategy and tactics by Michael Schell.
Original Material and HTML Coding Copyright 2001 by Michael Schell. All Rights Reserved.