Saturday, July 18, 2020

Dave Computes Euchre Strategy

I recently got signed up for a Euchre tournament, having never played before. I searched the web in vain for a really simple strategy I could follow. Instead, I found a lot of complicated anecdotal advice. After losing the tournament, I wrote a machine learning program that simulated 2 billion games of Euchre to identify a simple evidence-based strategy. I'll get to that, but first ...


The Rules

1.  The game uses 24 cards:  9, 10, J, Q, K, A of each suit.

2.  There are 4 players, which I'll call player 1, 2, 3, and the dealer.

3.  Five cards are dealt to each player.

4.  Player 1 leads by playing any card from their hand. Then each of the other players take turns playing one card from their hand. If possible, they must play a card of the same suit as the one that was led. Otherwise, they can play any card. When four cards have been played, the player with the highest card takes the trick and then leads by playing any card from their hand, and so on.

5.  The cards of one suit, designated as trump, always beat cards in any other suit (even the suit led).

6.  The jack of trump is the highest card. The other jack of the same color is also considered to be trump, and so there are 7 trump cards. That jack is the second highest card, followed by A K Q 10 9 of trump, and then by A K Q J 10 9 of the suit led.

7.  At the start of each round, one of the 4 cards not dealt is turned up. Player 1 can name that suit as trump. If they pass, then player 2 can name that same suit as trump, then player 3, and then the dealer. No matter who names trump, the turned up card is given to the dealer, who must then discard a card before player 1 can lead. If the dealer passes, then the turned up card is removed from the game. Player 1 can name any suit but the original one as trump. If they pass, then player 2 can name any suit but the original one as trump, then player 3, and then the dealer. In the variation I play, the dealer is not allowed to pass at this time and must name trump.

8.  Players 1 and 3 are partners, as are players 2 and the dealer.

9.  If the partners that named trump take 3 or 4 tricks (combined), they earn 1 point. If they take all 5 tricks, they earn 2 points. If they fail to take at least 3 tricks, then the other team earns 2 points.

10.  The first team to earn 10 points wins.

11.  When a player names trump, they may announce that they are going alone. In that case, their partner does not play this round. If the player that named trump takes all 5 tricks, then their team earns 4 points (instead of 2). Otherwise, the scoring is the same.


Naming Trump:  Simple Way

Choosing whether to name trump or to pass is the most important decision in the game. My software identified very simple guidelines that even a beginner can follow.

1.  In general, name trump whenever you hold at least 3 trump cards.

2.  Count the jack of trump as 2 trump cards. (The jack in the same color only counts as 1.)

3.  If naming trump will send the turned up trump card into your opponent's hand, you must hold at least 4 trump cards.

4.  If you are the dealer, and naming trump will send the turned up card into your own hand, count that card as if it's already in your hand. (This does not apply to the dealer's partner, who must hold 3 trumps to name trump.)

These rules are summarized in the following table.  J indicates the jack of trump and T indicates any other trump card.

Player  J=2 T=1  Minimum Hands
1       4        JTT or TTTT
2       3        JT  or TTT
3       4        JTT or TTTT
Dealer  3        JT  or TTT (including turned up card)
1       3        JT  or TTT
2       3        JT  or TTT
3       3        JT  or TTT

Naming Trump:  Better Way

Here's the more detailed guide my program arrived at for choosing trump.

Player  Turned Up  J=7 T=4 A=1  Minimum Hands
1       J         20           TTTTT
1       T         15           JTT, TTTT
2       J          9           TTA
2       T         11           JT, TTT, TTAAA
3       J         15           TTTT
3       T         15           JTT, TTTT
Dealer           11           JT, TTT, TTAAA (including turned up card)
1       Same       8           TT, JA
1       Opposite   12           TTT, JTA
2       Same       11           JT, TTT, JAA, TTAAA
2       Opposite   9           JT, TTA, JAA, TAAA
3       Same       9           JT, TTA, JAA
3       Opposite   10           JT, TTT, TTAA

The Minimum Hands column shows the minimum hands the program identified as being playable in each situation. I wrote another program to identify numeric values for J, T, and A. The values J=7, T=4, and A=1 were the smallest values that reproduced the ordering of the vast majority of the identified hands. As before, J represents only the jack of trump, T is any other trump (including the other jack of the same color), and A is any non-trump ace. For example, JT is worth 7 + 4 = 11, TTT is worth 4 + 4 + 4 = 12, and TTAAA is worth 4 + 4 + 1 + 1 + 1 = 11, and so any of these hands can name trump in a situation that requires a minimum score of 11. (My software found it was not worth identifying more specific values for other cards. A non-trump king proved to be worth only slightly more than a non-trump 9, and a great deal less than a non-trump ace. Likewise, the value of the other jack of the same color proved to be closer to the value of any other trump than to the value of the jack of trumps. My software also originally kept track of the number of suits in the hand, but ultimately this information proved less valuable than the features identified in the table above.)

Let's walk through the findings in the table. For the most part, seats 1 and 3 require 15 points to play (e.g. JTT), while seats 2 and the dealer require only 11 points (e.g. JT). That's in line with the simpler table shown earlier. This new point system identifies that seat 2 and the dealer can now also play TTAAA for 11 points, but that's a very rare hand. When the turned up card is a jack, the table shows that player 1 must hold only trump in order to name trump. (I suspect that holding 4 trumps in that situation may be good enough to win, but can earn more by letting an opponent name trump.) The most common situation where the detailed table differs from the simpler one is that player 2 can now name trump with only TTA if the turned up card is a jack.

After the dealer has passed, the table identifies playable hands by whether the trump suit is the same color as the original turned up card or the opposite color. For example, if everyone passes on  then player 1 only needs 8 points to name , but 12 points to name  or . But by the time that player 3 plays, color doesn't matter nearly as much.


Discarding Cards as Dealer

When the turned up card's suit is named as trump, the dealer picks up that card and discards any card from their hand. There is broad agreement that you should hold onto any trump or ace, and discard the lowest card in your shortest suit--the suit you have the fewest of. In the case of a tie, prefer to discard the opposite color as trump.

In all examples, we'll assume that trump is .

Example #1
You hold J♣ 9♣ K♦ J♥ 9♥ 9♠. You should discard K♦. You're hoping now that diamonds are led so that you can take the trick with 9♣.

Example #2
You hold J♣ 9♣ A 9 K Q. You should discard either . You're hoping now that  is led so that you can take the trick with 9♣. However, if an opponent leads  and your partner plays A♠ or a low trump, then you can discard your other heart and let your partner take the trick. If your partner is paying attention and holds the right cards, they'll lead hearts now and you can take the trick with 9♣.


Playing Trash When Another Player Leads

Often, you'll have no choice of what to play, because you hold only one card in the suit led. Sometimes your choices are irrelevant, like when you can only play K or Q of the same suit. When you do have a meaningful choice, it will usually come down to which trash to play.

Example #1
Others played:  A 10 Q
You can play:  K 9
Because you can't win this trick, you should play your lowest card:  9♦

Example #2
Others played:  A 10 Q
You can play:  10 Q 10♥ K
Because you can't win this trick, and you hold trump, you should probably play your shortest suit:  K

Example #3
Others played:  A 10 Q
You can play:  Q 10♥ K
Because you can't win this trick, and you don't hold trump, you should play the card that is least likely to win a future trick:  10


Playing Last

The strategy is straightforward when you're the last person to play on a trick. Simply play the lowest card you can so that your team wins the trick. If you can't win, play trash, as described in the previous section.

Example #1
Others played:  10 9 Q
You can play:  A Q
You should play the lowest card that wins the trick:  Q♦

Example #2
Others played:  A 10 10
You can play:  J Q Q 10♥ K
You should play the lowest card that wins the trick:  Q (trump)

Example #3
Others played:  A 10♣ 10
You can play:  J Q Q 10♥ K
Because your partner is already winning this trick (with trump), you should play trash:  K


Playing Second or Third

The situation is more complicated when you're the second or third person to play on a trick. That's because you need to decide how strong your play needs to be to win the trick, given that you don't know what card your opponent will play. If trump is led, you should usually assume the trick will be won by the highest trump card still in play. Otherwise, you should usually assume an ace or low trump will win.

Example #1
Others played:  10 9
You can play:  A Q
Your Q is probably too weak to win the trick. Play A.

Example #2
Others played:  10 Q
You can play:  J 9 Q 10♥ K
Your partner's Q is probably too weak to win the trick. Play your lowest trump:  9

Example #3
Others played:  10 A
You can play:  J 9 Q 10♥ K
Your partner's A is probably strong enough to win the trick. Play trash:  K

Example #4
Others played:  Q♣
You can play:  J K
Your K is probably too weak to win the trick. Play your highest trump:  J


Leading:  Simple Way

Here are very simple rules for a beginner deciding which card to lead:

1.  J
2.  A
3.  x (trash)

In other words, lead with the cards that are most likely to take tricks. Always lead the jack of trump. Otherwise, lead an ace. Otherwise, lead with trash. Hold onto other trump cards as long as you can.


Leading:  Better Way

Here's the slightly more complex leading strategy that my machine learning software arrived at. I've found it to be quite effective in practice.

1.  JA / JTT
Lead the jack of trump to help remove your opponent's trump cards from play before you lead an ace or when you hold at least 2 other trumps.

2.  xJx
Otherwise, lead with trash if you have the jack of trump and at least one other trash card. Why not play the jack? You want to avoid taking a high trump from your partner or weak trump cards from your opponents. The second trash card means you won't be forced to play your jack before you find a better moment to pounce with it. To help force your opponents to play trump, prefer leading with trash in your longest suit or (in the case of a tie) in the same color as trump.

3.  J
Otherwise, you should lead the jack of trump as soon as you can.

4.  TAT / TTT / TAAA
Unless you have the jack of trump, you should avoid leading trump. However, there are occasions when your hand is strong enough that it's worth sacrificing a low trump card in order to take your opponents' trumps out of play. This occurs when you'll be left with an ace and a trump, 2 trumps, or (on very rare occasions) all 3 aces.

5.  A
Unless you've got the jack of trump or find yourself with TAT / TAAA, you should lead an ace as soon as you can. If you've got more than one, prefer to lead the ace in the shorter suit (to have the best chance of winning) or (in the case of a tie) in the same color as trump.

6.  x
Lead with trash whenever you don't have the jack of trump, an ace, or at least 3 trump cards. All things being equal, prefer to lead trash in your longest suit or (in the case of a tie) in the same color as trump. That will improve your chances of flushing out trump.

You should think of J here as the highest trump card in play. If the jack of trump has already been played (or wasn't picked up when naming trump), treat the other jack in the same color as if it were the jack of trump. If you know both jacks are out of play, then treat the ace of trump as if it were the jack, and so on. Likewise, if no one chose to pick up an ace when naming trump, you should play your king in that suit as if it were the A.

There are some possible exceptions that my summary above ignores. When your partner names trump, it may be best to lead trump even when you don't have TAT / TTT / TAAA. Also, because your partner will often discard trash in their shortest suit, you might consider leading in the suit your partner just discarded, to let them win a trick with trump.


Playing Equivalent Cards

If you hold both K and Q of some suit, then it doesn't matters which you play. The only reason K is usually stronger is that it beats Q, which you already know that none of your opponents hold. The same is true if you hold, for example, Q, 10, and 9 of trump.

If, like me, you have a terrible memory, you can use your choices in these situations to help you remember the strength of your remaining cards. For example, when deciding between playing 10 or 9 of some suit, consider playing 10. (If you play 9 first, you might forget that 10 can't possibly win a trick.) Likewise, if you hold both jacks of trump, consider playing the lower one first. Or, if you hold both A and K of some suit, you might consider playing A first to stop you from leading K later.


Going Alone

My machine learning did not consider going alone, but you should. Any time you're certain you can take at least 3 tricks by naming trump, you should go alone for the possibility of earning 4 points. Below are all the ways to guarantee 3 tricks. Again, we'll assume  is trump. Each highlighted region earns one of your 3 tricks. The grayed out cards are ones you don't hold.

1.  J J A
Go alone whenever you hold the highest 3 trump cards, since they're certain to take 3 tricks. If you don't hold all 3 of these, then you'll need at least 4 trumps to go alone.

2.  J J  
Whenever you hold 4 trump cards, you're certain to win at least one trick (because your opponent can't hold more than 3 trumps). So, if you hold the highest 2 trumps and you have a total of 4 trumps, you'll win at least 3 tricks.

3.  J J A K 
If you don't hold J♠, you'll need both A♣ and K♣ to make up for it (since one of them may be lost to J♠). As before, your 4th trump guarantees you'll win a trick.

4.  J    A
If you hold 4 trumps, you can usually count on winning another trick with a non-trump ace. (The problem here is if your opponent leads that suit and your other opponent trumps it.)

5.  J J A K 
If you don't hold J, you'll need both J♠ and A♣ to make up for it (since one of them may be lost to J). But then you can count on K♣ to earn a 2nd trick and a 4th trump to earn a 3rd trick.

6.  J J A   A
Again, J♠ and A♣ take one trick. The 4th trump takes another, as does the non-trump ace.

7.  J J A K Q  A
If you don't hold J or J♠, you'll need A♣ K♣ Q♣ to make up for it (since 2 of them may be lost to jacks). The 4th trump takes another trick, as does the non-trump ace.

8.      
When you hold any 5 trumps, your opponent can't hold more than 2. Even if both beat you, you'll still take 3 tricks with your remaining trumps. Therefore, you should always go alone with 5 trumps.