Learning to Slide: Cross-Size Graph Neural Heuristics for Optimal Puzzle Solving
Abstract
Heuristic techniques such as A* and IDA* with Manhattan distance or linear conflict as heuristics fall short for larger sliding-tile puzzles. This is quite unfortunate as the sliding-tile puzzle is often used as a heuristic search benchmark. We introduce PuzzleGNN, a size-adaptive graph neural network that learns cross-size heuristics for puzzles ranging from 3× 3 to 7 × 7. By encapsulating tiles and adjacencies as graph nodes and edges and embedding the board size into the model, PuzzleGNN functions as a predictor of optimal step counts for puzzles. After being trained on solutions generated by IDA*, PuzzleGNN achieved R2 ≥ 0.85 within its trained range, performing 10 to 30 times faster in inference compared to A*, and excelling on mid-sized boards with a mean absolute error (MAE) of 0.62 on 6 × 6. Nonetheless, while generalizing PuzzleGNN to unseen configurations remains challenging, a promising approach is to fuse neural and admissible heuristics as a means to achieving optimal, scalable search in combinatorial domains.
References
- Korf, R. E. (1985). Iterative-Deepening A*. Artificial Intelligence, 27(1), 97–109.
- Hansson, O., Mayer, A., & Valtorta, M. (1992). A new result on the complexity of heuristic estimates for the A* algorithm. Artificial Intelligence, 55(1), 129–143.
- Culberson, J. C., & Schaeffer, J. (1998). Pattern databases. Computational Intelligence, 14(3), 318–334.
- Felner, A., Korf, R. E., & Hanan, S. (2004). Additive pattern database heuristics. Journal of Artificial Intelligence Research, 22, 279–318.
- Zhou, R., & Hansen, E. A. (2012). Parallel structured duplicate detection for A* graph search. AAAI Conference on Artificial Intelligence.
- Agostinelli, F., McAleer, S., Shmakov, A., & Baldi, P. (2019). Solving the Rubik's Cube with Deep Reinforcement Learning and Search. Nature Machine Intelligence, 1(8), 356–363.
- Kipf, T. N., & Welling, M. (2017). Semi-Supervised Classification with Graph Convolutional Networks. International Conference on Learning Representations (ICLR).
- Hart, P. E., Nilsson, N. J., & Raphael, B. (1968). A Formal Basis for the Heuristic Determination of Minimum Cost Paths. IEEE Transactions on Systems Science and Cybernetics, 4(2), 100–107.
- Korf, R. E., & Reid, M. (1997). Complexity Analysis of Admissible Heuristic Search. AAAI/IAAI, 305–310.
- Thayer, J. T., Dionne, A. J., & Ruml, W. (2009). Learning Inadmissible Heuristics During Search. ICAPS.
- Yang, F., Culberson, J., Holte, R., Zahavi, U., & Felner, A. (2011). A general theory of additive state space abstractions. Journal of Artificial Intelligence Research, 32, 631–662.
- Arora, S., et al. (2019). Theoretical limitations of self-attention in neural sequence models. Transactions of the Association for Computational Linguistics.
- Bershatsky, D., et al. (2022). Generalization in graph neural networks: Improved PAC-Bayesian bounds on graph diffusion. NeurIPS.
- Liu, J., et al. (2020). Certified robustness of graph neural networks against adversarial structural perturbation. KDD.