IST Artificial Intelligence course's project (LEIC-A 2021/2022). Made by João Cardoso and José João Ferreira.
To fill the Takuzu board appropriately, the first line of the input file must have the number N
, where N
corresponds to the dimension of the N
× N
board, followed by the board itself, with both 0
's and 1
's representing a certain value and 2
's signaling empty cells.
You can check the files in the
tests
folder for reference.
python <path_to_takuzu.py> < <path_to_input_file>
python takuzu.py < tests/t_04_007.in
Optionally, if you prefer to save the output to a file, instead of having it being displayed on your terminal.
python takuzu.py < tests/t_04_007.in > tests/t_04_007.result
./test.sh [flags] <path_to_takuzu.py> <path_to_tests>
-d
flag shows in the terminal the "diff" of expect output with actual output-c
flag removes generated.result
files (instead of testing)-h
flag (as usual) shows this information
Navigate to your misc
folder and type on your terminal:
./test.sh -d ../takuzu.py ../tests
In addition to the tests in this repo, you can find more and their expected results here
We made the final report using Obsidian.
In order to keep consistency in this project, we use black
as a code formatter for Python files.
Alternatively, for the Markdown ones, we use prettier
.