Friday, July 11, 2025

When AI Learned to Play Hearts: A Study Using World of Card Games Data



We're excited to share some fascinating research that recently emerged from Carleton College, where a team of computer science students used data from World of Card Games to train artificial intelligence agents to play Hearts. The study, titled "Breaking Hearts: AI approaches to the trick-based card game" offers compelling insights into how different AI strategies perform in this classic trick-taking game.

The Challenge: Teaching AI to Master Hearts

Hearts presents unique challenges for AI development. Unlike many card games, Hearts requires players to think defensively (avoiding penalty cards) while also considering aggressive strategies like "shooting the moon." The Carleton team, led by Professor Dave Musicant and consisting of students Barin Nwike, Breanna Lefevers-Scott, Elaina Boyle, and Elek Thomas-Toth, set out to create AI agents that could compete against intermediate to advanced human players while remaining fun to play against.

Four Different AI Approaches

The research team developed four distinct AI agents, each employing different strategies:

Weak Heuristic Agents: Two simple baseline agents with opposite philosophies - one always trying to play the highest card below the current high card (to lose tricks), and another always trying to play the lowest card above the current high card (to win tricks). Interestingly, the first approach proved surprisingly strong.

Strong Heuristic Agent: This hard-coded agent followed approximately 20 rules based on high-level Hearts strategy research. It focused on creating "voids" - deliberately running out of cards in certain suits to safely dump dangerous cards like the Queen of Spades. This agent emerged as the clear winner, taking over 50% of games.

Case-Based Reasoning (CBR) Agent: Perhaps the most intriguing approach, this agent learned from a database of actual games, finding similar board states and applying previously successful strategies. While not the strongest performer, it created varied and unpredictable gameplay.

Monte Carlo Tree Search (MCTS) Agent: This agent used a more computational approach, running 3-second searches to evaluate possible future scenarios and select the card likely to result in the fewest penalty points.

The team needed a substantial database of actual Hearts games to train their Case-Based Reasoning agent, and we were happy to provide them with 5,000 games of anonymized training data from World of Card Games.

Surprising Results

The study's results reveal some fascinating insights about AI and Hearts strategy:

  • Traditional beats cutting-edge: The rule-based Strong Heuristic agent significantly outperformed the more sophisticated Monte Carlo Tree Search approach
  • Simple can be effective: One of the basic Weak Heuristic agents performed better than the complex CBR and MCTS agents
  • Fun factor matters: The CBR agent, while not the strongest, provided the most varied and engaging gameplay experience

What This Means for Hearts Players

This research validates what experienced Hearts players already know - the game requires a deep understanding of risk management, card counting, and strategic thinking. The success of the heuristic approaches suggests that traditional Hearts wisdom and established strategies remain highly effective, even when competing against sophisticated AI algorithms.

For players on World of Card Games, this study offers some interesting strategic insights:

  1. Defensive play works: The success of the "play high cards to lose tricks" strategy confirms that avoiding penalty cards is often more important than winning tricks
  2. Suit management is crucial: The Strong Heuristic agent's focus on creating voids demonstrates the importance of suit distribution strategy
  3. Adaptability has value: The CBR agent's varied approach, while not always optimal, created more engaging games

The Future of AI in Card Games

This research represents an important step in understanding how AI can approach complex card games. While the study focused on Hearts, the methodologies and insights could apply to other trick-taking games and card games in general.

The team's emphasis on creating "fun" AI opponents, not just strong ones, also highlights an important consideration for game developers - sometimes the most engaging AI isn't necessarily the strongest one.

The researchers noted in their acknowledgments: "Having played a multitude of games on his website for research, we can highly recommend it to anyone looking to experience how Hearts is played." We're honored that our platform served both as a research tool and a training ground for understanding high-level Hearts strategy, and that anonymized data from our games contributed to this important research.

Try Your Skills Against AI

While you can't yet play against these specific AI agents, you can test your Hearts skills against our existing computer opponents on World of Card Games. Understanding the strategies these researchers identified might just give you an edge in your next game!

The full study provides fascinating technical details about AI approaches to card games, and we're proud that World of Card Games data contributed to this important research. It's a reminder that every game played on our platform contributes to a broader understanding of these timeless card games.


Want to put your Hearts skills to the test? Play Hearts and dozens of other card games at World of Card Games. Whether you're a beginner learning the ropes or an expert looking to refine your strategy, we have games and opponents for every skill level.