The main task of the assignment project is:
Implement an automated Cross-out puzzle solver using at least one of the formalisms covered in this module.
A cross-out puzzle consists of a rectangular grid of symbols.
For a solution, some symbols should be crossed out such that all of the following conditions are met:
1. No symbol should appear more than once in a row or a column (crossed-out occurrences do not count) .
2. Crossed-out symbols must not occur next to each other horizontally or vertically.
3. All symbols that are not crossed out should form a contiguous area (considering horizontal and vertical connections). That means that each non-crossed-out symbol must be reached from all other non-crossed-out symbols by moving only horizontally or vertically over non-crossed-out symbols.
Here is an example puzzle:
c e b b c
b e a d e
a d a c e
c a b e c
e b a a a
Its only solution is:
c e b b c
b e a d e
a d a c e
c a b e c
e b a a a
To illustrate the meaning of condition 3, consider this puzzle:
a a
a b
Its only solution is
a a
a b
The following satisfies condition 1 and 2, but not 3 (upper left and lower right cells are not reachable from each other using vertical and horizontal connections), and therefore is not a solution:
a a
a b
Please note that puzzles are always rectangular, but not necessarily square.
The most straightforward way of coming up with a solution is by using Answer Set Programming.
To get you going, I have created an ASP-Chef recipe that visualises input and output. It currently has the first example input and the solution to it hardcoded where you should instead put ASP rules. The input is a space separated representation of the puzzle that my recipe transforms in facts of the form cell(1,1,"c") . and so on. You can see them in the output. Your code should define a predicate crossedout/3. Some puzzles have more than one solution, for those there is a slider (currently it says "model 1 of 1" in red, and therefore cannot be moved). If there is more than one solution it will read "model 1 of n" where n is the number of solutions and they can then be viewed by dragging the slider.
It is also possible to solve the task using propositional or first-order logic, but less straightforward.
You should also write a brief essay, which documents your agent(s) and the development thereof. In particular, it should contain considerations on choosing the method(s), and on design, implementation, and testing. This should not be extensive, a few pages are more than sufficient.
The essay should also contain the following additional consideration on ethics: Imagine that a variant of your solver will be deployed not in a computer game, but in reality. Think whether there are any military settings in which such a tool could be useful. Starting from such a military scenario, discuss the deployment of AI methods in military applications from an ethical perspective. Providing this discussion on ethics is required for passing.
You should submit both your code and your essay before February 28th 2025 on moodle. We also recommend to make your code publically available in addition.
The agent has to run on an Ubuntu 24.04 system. You need to document any requirements for compiling and running your code on a fresh installation.
I would like to remind you of the university's code of conduct:
https://www.aau.at/en/research/research-profile/good-academic-practice/
In case you use any libraries or existing code for your agent, you need to clearly state that and in particular it has to be clear which code is by yourself . Similar considerations hold for the essay. It is also clear that your code has to be a significant and substantial addition to or modification of any reused code and that the crucial code has to be written by yourself. It is also clear that if you use any existing code, you need to have the rights to do so (just attributing the code may not be sufficient, depending on the license of the code). Similarly, you need to have the rights for any material, for example images, that is in your essay. The fact that an image is accessible on the internet does not automatically give you the right to use it in your essay!