AI approaches

Weak Heuristic Approaches

Our first attempt to create agents resulted in two very simple hard-coded agents with opposite approaches. The first always tries to play the highest card below the current high card of the trick, in an attempt to lose as many tricks as possible. The second always tries to play the lowest card above the current high card in an attempt to win as many tricks as possible. The goal with creating these agents was to familiarize ourself with the the code base and create a simple baseline to test future agents against. Ultimately, the first agent is very strong and the second agent is relatively weak.

Strong Heuristic

Although our weak heuristic agents were designed for simplicity over strength, we believed that a hard-coded approach could result in a strong overall agent. By researching high level hearts play and creating a set of around 20 rules for the agent to follow, we were able to create a strong heuristic agent which performed very well. It employs the strategy of creating a 'void' in which it attempts set up its hand to not have any cards in some suit. This allows it to dump dangerous or high point value cards like the queen of spades.

Case-Based-Reasoning

Our Case-Based-Reasoning (CBR) agent attempts to use strategies that have worked in previous games of Hearts. It draws from a database of games and finds a game with a similar board state to the current one. It then applies the strategy that that game used to win. Although this approach did not result in the strongest agent, we believe that it did create a particularly fun agent to play against. Because the CBR agent draws from a variety of games, it utilzes a variety of play patterns and games against the CBR agent are always a little bit different.

Monte-Carlo Tree Search

MCTS is an algorithm that attempts to make optimal future decisions. We used it by comparing all the different possible trick combinations with the current playable cards to choose the best playable card. It runs for 3 seconds with a focus on finding the card that will be played for the least amount of possible points. Although this agent had limited success, the self-imposed time limit of 3 seconds hampered its ability to go deep into the search tree.

About Us

Barin Nwike

Barin is a computer science major with an interset in full-stack software development. Outside of school, Barin enjoys cooking, new experiences, and reading fiction.

Breanna Lefevers-Scott

Breanna is a Computer Science and Psychology major who loves a hot cup of tea and a good board game.

Elaina Boyle

Elaina built graphics to play a full game of Hearts on the computer against our AI agents. He also helped to create Mary Sue, our Case-Based Reasoning agent, and rewrote a significant portion of the game implementation to increase robustness. Elaina is a Computer Science and Theater double major.

Elek Thomas-Toth

Elek Thomas-Toth is a Senior computer science major always looking for new puzzles to solve. He has worked in a variety of educational settings and is interested in teaching. Outside of work, he enjoys playing Ultimate Frisbee, captaining the Carleton CHOP.