Machine Learning Based Heuristic Search Algorithms to Solve Birds of a Feather Card Game

Bryon Kucharski, Azad Deihim, Mehmet ErgezerAAAI 2019

Abstract

This research was conducted by an interdisciplinary team of two undergraduate students and a faculty to explore solutions to the Birds of a Feather (BoF) Research Challenge. BoF is a newly-designed perfect-information solitaire-type game. The focus of the study was to design and implement different algorithms and evaluate their effectiveness. The team compared the provided depth-first search (DFS) to heuristic algorithms such as Monte Carlo tree search (MCTS), as well as a novel heuristic search algorithm guided by machine learning. Since all of the studied algorithms converge to a solution from a solvable deal, effectiveness of each approach was measured by how quickly a solution was reached, and how many nodes were traversed until a solution was reached. The employed methods have a potential to provide artificial intelligence enthusiasts with a better understanding of BoF and novel ways to solve perfect-information games and puzzles in general. The results indicate that the proposed heuristic search algorithms guided by machine learning provide a significant improvement in terms of number of nodes traversed over the provided DFS algorithm.

Introduction

The "Birds of a Feather" (BoF) Research Challenge presents a complex solitaire-style game played on a 4x4 grid. As a perfect-information game, its difficulty lies in the vast decision tree. Standard "blind" search algorithms like Depth-First Search (DFS) or Breadth-First Search (BFS) are inefficient, often exploring thousands of dead-end paths before finding a solution. This research explores the design and implementation of heuristic search algorithms, specifically those guided by machine learning, to prune the search space and find solutions more effectively.

Methodology

The research team evaluated several search strategies to navigate the game's decision tree:

  1. Baseline DFS: A standard depth-first search.
  2. Monte Carlo Tree Search (MCTS): A randomized search using simulations to evaluate move values.
  3. Machine Learning Guided Search (LR): A novel approach using Linear Regression with third-order polynomial features (e.g., number of valid moves, suit frequency) to predict a "solvability score."
  4. Hybrid Models (LR16+DFS, LR8+DFS): These models use the ML heuristic for the initial moves—when the search space is largest—and then transition to standard DFS.

The models were trained on a dataset of 10,000 unique game seeds and evaluated against a standardized set of 50 random seeds to ensure consistency in difficulty across all tests.

Results and Discussion

Node Exploration Efficiency

The primary metric for effectiveness was the number of nodes traversed. The ML-guided models significantly outperformed the baseline DFS. The "LR only" model reduced the median number of nodes explored by approximately 88.6% compared to standard DFS, demonstrating the power of using solvability as a compass for search.

Comparison of nodes explored across 50 random seeds for various search algorithms.

Computational Performance and Trade-offs

While ML models reduced node exploration, they introduced computational overhead due to feature extraction and inference. Consequently, the pure LR model was slightly slower in wall-clock time than the baseline DFS (1.23s vs 1.10s median). However, the hybrid LR16+DFS model achieved the best balance, solving games nearly twice as fast as DFS by using the heuristic only for the critical first move.

Comparison of execution times (median, mean, and standard deviation) for different search algorithms.

In contrast, while MCTS found solutions with the absolute minimum number of nodes, it was computationally expensive, taking an average of 23 minutes per seed—far too slow for real-time play.

Model Selection and Simplicity

Despite testing more complex architectures like Neural Networks and Random Forests, Linear Regression with polynomial features proved most effective due to its balance of accuracy and simplicity. This suggests that for BoF, identifying "solvability" early in the game is a powerful heuristic that prunes the search tree effectively without the high computational cost of more complex models.

Conclusion

Guiding traditional search algorithms with machine learning heuristics provides a significant improvement in solving the Birds of a Feather game. The LR16+DFS hybrid model emerges as a highly efficient solution, demonstrating that even minimal ML intervention at critical branching points can drastically enhance search performance. Future work may involve porting the implementation to lower-level languages to further reduce execution time and exploring evolutionary algorithms for feature discovery.

Summary updated

BibTeX
@inproceedings{kucharski2019machine,
  author = {Bryon Kucharski and Azad Deihim and Mehmet Ergezer},
  title = {{Machine Learning Based Heuristic Search Algorithms to Solve Birds of a Feather Card Game}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2019},
  url = {https://openreview.net/forum?id=a8YPhHAoau},
}
Figure