This repository contains example encodings for solving Sudoku, Seek Numbers, and Minotaur games with clingo. The encodings were created in a joint effort with Antonia Schmidt as part of the course "Advanced Problem Solving Techniques" at the University of Potsdam.
Contains sample test instances for all three problem encodings (these and more instances were provided during the course).
Contains the source code for all three problem encodings.
minotaur.lp
: problem encoding for various-size Theseus and the Minotaur riddles.
seeknumbers.lp
: problem encoding for various-size Seek Numbers riddles.
sudoku.lp
: problem encoding for 9x9 Sudokus (can be adapted to work with other parameters).
In order to run this code you need to have clingo installed on your system. Installation is possible via package managers or from source.
The encodings in this repository were tested against clingo version 5.5.0.
You can run the problem encodings, i.e. get solutions to the sample problem instances of the respective games, for example by running the following command in the terminal:
$ clingo ./instances/xxx.lp ./src/yyy.lp 0
where xxx
is the name of a test instance (e.g. sudoku1.lp
) and yyy
is the name of the corresponding problem encoding (e.g. sudoku.lp
).