Optimizing the 15 Puzzle with AI: Comparative analysis of breadth-first and depth-first search algorithms

Iryna Ivanochko, Michal Greguš, Silvia Treľová · Procedia Computer Science · 2025

Artificial intelligence is a powerful tool for addressing complex problems. This research investigates the use of artificial intelligence in solving the 15 Puzzle. Two primary graph traversal algorithms, Breadth-First Search and Depth-First Search, are employed to tackle this puzzle. Breadth-First Search and Depth-First Search are recursive algorithms for traversing a graph or tree data structure. Both algorithms are implemented in Python, utilizing key open-source libraries. Implementing these algorithms in Python showcases the language’s versatility and practicality for developing AI-driven solutions. The research presents a comparative analysis of the algorithms’ performance, emphasizing the most effective approach for solving the puzzle. This work offers valuable insights into AI and algorithmic problem-solving techniques while laying a foundation for future research in this field.

Read the paper · More papers on PaperTik