1. Ömer Faruk Şaylan
  2. İlker Uluseri



With this project, we aim to make it easier for people to understand logic grid puzzles. We are trying to achieve this goal by solving said puzzles using a computer. It is expected that this project will make these puzzles more accessible. To achieve this, we developed a program that can solve logic grid puzzles automatically. Prolog was used to program the automatic solver and Python was used to create a user interface. While programming, we made progress systematically and always made sure every small step worked. To solve logic grid puzzles, we first transformed the clues needed to solve the puzzle into the logical form used by Prolog. After that, we prepared a user interface using Python and used this interface to take inputs from the user regarding the clues needed. Lastly, we used a Python library called PySWIP to take the inputs given by the user using the interface to the Prolog code and solved the puzzles. With this project, we found that to solve logic grid puzzles using a computer, a logic-based programming language like Prolog is required. We also understood that the hardest and the most important part of solving this problem is getting the clues into a state which the program can use. Besides, the difficulty of establishing a connection between Python and Prolog, languages based on two different bases, and the importance of choosing the right data structures were noticed.

Key Words: Logic Grid Puzzles, Prolog, Logic Programming, Python