Psellos
Contemporary Development With Functional Programming

The Schnapsen Log

August 13, 2012

A Theory Concerning the Last Trick

Martin Tompa

While we are on a break from our normal format, I’d like to tell you about another very elegant result by the mathematician Johan Wästlund, closely related to his results on the game of symmetric whist. Today’s topic is an optimal strategy for the sole purpose of winning the last trick. Since a reasonable fraction of Schnapsen outcomes are decided by who wins the last trick when the stock is exhausted, this question has a clear connection to Schnapsen strategy.

The paper of Wästlund that contains this result is “The Strange Algebra of Combinatorial Games”, written in 2009. This paper discusses several different sorts of games. The results we will discuss today are just from the paper’s Section 7.2, which deals with a version of the traditional Swedish card game Femkort (“Five-card”), in which the winner of the game is the player who wins the last trick.

The good news is that Wästlund’s results on Femkort are much simpler than his results on symmetric whist that we discussed in the previous column. Before diving in, though, let me make a few comments on how Wästlund’s game of Femkort differs from Schnapsen.

  1. As in the previous column, in Wästlund’s version of Femkort, the card deck can consist of any number of suits, with an arbitrary number of cards in each suit. In this sense, it is far more general than Schnapsen.

  2. Wästlund assumes that all the cards in the deck are dealt out to two players, and each player knows exactly what cards the other is holding. It doesn’t matter how many tricks or trick points each player captures; all that matter is who wins the last trick. This means that the connection to Schnapsen will be in Schnapsen’s endgame when the stock is exhausted and neither player reaches 66 trick points.

  3. The most important difference between Femkort and this type of Schnapsen endgame is that there is no trump suit in Femkort. This means that the main application of Wästlund’s Femkort results to Schnapsen will be in those cases when the players cannot trump, either because the trumps are gone or because both players have the same number of cards remaining in each suit. In practice, though, Schnapsen’s struggle for the last trick usually revolves around the trump suit and the players’ use of a forcing defense, and today’s results don’t apply to that situation.

As in the previous column, we will call the two players West and East. Wästlund’s procedure for figuring out who will win makes use of something he calls the trace of a deal, defined as follows. Start with the trace set to 0. In each suit separately, compare the highest card in West’s hand to the highest card in East’s hand, then the second highest card in West’s hand to the second highest card in East’s hand, etc. For each comparison, add 1 to the trace if West’s card is higher, and subtract 1 from the trace if East’s card is higher. If you run out of cards in this suit in one player’s hand, ignore all the remaining cards in this suit in the other player’s hand. (Let’s call these ignored cards “excess”.)

After you have processed all the suits in this way, the final value of the trace determines the outcome: West wins if the trace is positive, East wins if the trace is negative, and whichever player is initially on lead wins if the trace is zero.

Here is an example:

West:East:
AQ8 KJ9
♣ AQJ8♣ K9
KQ AJ98

West’s excess cards are ♣J8 and East’s excess cards are 98. In hearts, the trace is +1: A beats K, Q beats J, 8 loses to 9. After processing the clubs, the trace increases to +3: A beats K, Q beats 9. Finally, the diamonds leave the trace at +3: K loses to A, Q beats J. Therefore, West can win whichever player is on lead, since the final trace is positive.

Wästlund’s procedure for computing the trace tells us who will be the winner, but doesn’t yet provide a winning strategy for choosing the next play. Wästlund provides this too. Let’s assume that you are West, to simplify the description. In the following strategy, ignore any of the excess cards, except in rules 5 and 6 below.

  1. If you are on lead and have a card that lost in the comparison during the computation of the trace, lead any such card. (Doing this increases the trace for you, but this advantage is mitigated by the fact that the lead is transferred to East.)

  2. If you are on lead and all your cards won in the comparisons during the computation of the trace, lead the lowest (non-excess) card in any suit. (Regardless of whether this wins or loses the trick, you maintain the condition that all your remaining cards won in the comparisons.)

  3. If you are following to a lead and can win the trick, do so with the lowest card possible. (Doing this decreases the trace by 1, but this disadvantage is compensated by the fact that you gain the lead.)

  4. If you are following to a lead and cannot win the trick, discard the lowest card you have in the suit led. (Doing this increases the trace.)

  5. If you are on lead and have nothing remaining but excess cards, lead them one at a time. They are all winners.

  6. If you are following to the lead of an excess card and cannot follow suit, discard an excess card of your own.

Let’s try this out on the example deal shown above, where West should win, since the trace is positive. Suppose West is on lead, and suppose for simplicity that both players follow the optimal strategy given above.

For the first several tricks, West and East will be following rule 1 above, leading a card that lost the comparison in the computation of the trace. The order of choices in the sample game below is arbitrary.

  • West leads 8, won by 9.
  • East leads ♣K, won by ♣A.
  • West leads K, won by A.
  • East leads J, won by Q.

At this point, West has only comparison winners remaining and may lead Q, following rule 2 above. East wins with K, returns J to West’s A, and West’s remaining three clubs are all winners, starting with the non-excess ♣Q.

© 2012 Martin Tompa. All rights reserved.


Comments

blog comments powered by Disqus

About the Author

Martin Tompa

Martin Tompa (tompa@psellos.com)

I am a Professor of Computer Science & Engineering at the University of Washington, where I teach discrete mathematics, probability and statistics, design and analysis of algorithms, and other related courses. I have always loved playing games. Games are great tools for learning to think logically and are a wonderful component of happy family or social life.

Read about Winning Schnapsen, the very first and definitive book on the winning strategy for this fascinating game.

Subscribe

Getting Started

Links for Schnapsen and Sixty-Six

Links in German

Links in Hungarian

Recent Columns

April
Homework on Expected Values, Apr 26
March
Thoughtful Actions, Mar 25
Noble Sacrifice, Mar 4
February
Carpe Diem, Feb 10
The Glass is 9/10 Full, Feb 2
January
The Battle and the War, Jan 17

Archives

2017
2016
2015
2014
2013
2012