AI Solves Logic-Based Puzzles with Graph Neural Networks

Friday 21 March 2025


A team of researchers has developed a new approach to solving logic-based puzzles, using a type of artificial intelligence that can learn and adapt as it goes along. The system, which uses graph neural networks (GNNs) to model the puzzles, was trained on a dataset of over 40,000 unique puzzle configurations.


The puzzles in question are a subset of those found in Simon Tatham’s Portable Puzzle Collection, a popular online resource that features over 40 different types of logic-based challenges. The researchers chose these puzzles because they provide a good testbed for their approach, which involves using GNNs to model the relationships between the puzzle pieces and then using reinforcement learning to find a solution.


The GNNs used in this research are designed to learn about the relationships between the puzzle pieces as they go along, rather than being trained on a specific set of rules or patterns. This means that they can adapt to new puzzles and solve them even if they have never seen anything like it before.


To train the GNNs, the researchers used a dataset of over 40,000 unique puzzle configurations, which were generated using a combination of human-designed puzzles and randomly generated ones. The GNNs were then trained on this dataset using reinforcement learning, with the goal of finding a solution to each puzzle.


The results are impressive: the GNNs were able to solve over 90% of the puzzles in the training set, and were able to transfer their knowledge to new, unseen puzzles with ease. This suggests that the approach has real potential for solving complex logic-based problems, and could be used in a wide range of applications.


One of the key advantages of this approach is its ability to learn and adapt as it goes along. This means that it can solve puzzles that are more complex than those it was trained on, and can even handle puzzles that have been designed specifically to test its abilities. This makes it a powerful tool for solving logic-based problems, and could potentially be used in fields such as computer science, mathematics, and engineering.


The researchers also experimented with different architectures for the GNNs, including a transformer architecture that was able to solve puzzles more quickly than the traditional GNN architecture. This suggests that there may be opportunities for further improvement by experimenting with different architectures and training methods.


Overall, this research demonstrates the potential of graph neural networks and reinforcement learning for solving complex logic-based problems.


Cite this article: “AI Solves Logic-Based Puzzles with Graph Neural Networks”, The Science Archive, 2025.


Artificial Intelligence, Logic-Based Puzzles, Graph Neural Networks, Reinforcement Learning, Puzzle Solving, Machine Learning, Gnns, Transformer Architecture, Complex Problems, Problem-Solving


Reference: Niccolò Grillo, Andrea Toccaceli, Joël Mathys, Benjamin Estermann, Stefania Fresca, Roger Wattenhofer, “Beyond Interpolation: Extrapolative Reasoning with Reinforcement Learning and Graph Neural Networks” (2025).


Leave a Reply