Lab Assignment #1
|
![]() |
![]() |
| Initial
configuration |
Solved puzzle |
The last two lines contain the numbers associated to
columns (first line) and rows (second line) separated by
blank spaces.
The following shows the input format for the initial
configuration above:
| ^R>> UR>D DDDv vvvv 3 2 1 1 1 3 2 1 |
| python3 encode.py dom01.txt
domain.lp |
| clingo 0 thermo.lp domain.lp |
| python3 decode.py thermo.lp
domain.lp |
| .x.. xx.x x.x. x... |
| unzip pics.zip python3 drawthermo.py dom01.txt output.txt |
As optional work (it may be used to increase the final
course grade with 2 pts), you can also consider the
variant of the puzle where thermometers are not
straight, but may also turn instead. This is an example
of this variant:
![]() |
![]() |
| Initial
configuration |
final configuration |
For this variant, we will extend the input files as
follows:
The initial state above would correspond to the input
file:
| 1212 ^vUv 02<L R3R> 2 2 2 1 1 1 3 2 |
Solutions are represented in the same way as before
(you can use the same decode.py program). In this case,
the puzzle solution would correspond to:
| ..x. ..x. xx.x xx.. |
NEW: examplesthermob.zip
contains four new domains (and their solutions) for the
curved version of the puzzle.
The maximum grade for this exercise is 15
points = 15% of the course. The deadline for
delivery is Monday, November
3rd, 2025 using the MOODLE assignment in
each University. Exercises can be made by groups of 2
students at most. If so, only one student is required to
deliver the files in moodle, but all source files must
contain the names of the two group members.
Delivery: upload all files in a .zip including a
README.txt with the student names and any additional
comment you consider relevant.