=================== Logical images The main goal is to come up with algorithms for solving logical images. We will use a lot of combinations of images solving techniques and with the help of certain heuristics we will try to put together a full algorithm that is not known at the beginning. If we manage to the end, we will try to optimize it. Maybe we will even use a graphic library.
Input: A text file in JSON format representing input data, e.g.
{
"sizeRows": 3,
"sizeCols": 3,
"cluesRows": [
[1, 1],
[2],
[1, 1]
],
"cluesCols": [
[1, 1],
[1],
[3]
]
}
Represents this board:
+------+
| 1 |
| 1 1 3|
+---+------+
|1 1|??????|
| 2|??????|
|1 1|??????|
+---+------+
Output: Text file with a solved board drawn with ASCII characters:
+------+
| 1 |
| 1 1 3|
+---+------+
|1 1|■■ ■■|
| 2| ■■■■|
|1 1|■■ ■■|
+---+------+
Assumptions: 3 field values - UNKNOWN, BLACK, WHITE with their representations in ASCII characters, values configured in the text file. Maximum number given in row or column: 99
Required functionalities, that must be met in this order:
- Processing the input file and parsing it to a suitable data structure
- Display of an empty board in ASCII format on the screen
- Saving the board in ASCII format to a file
- Solving images with 3x3 board size (all possible cases tested in TDD)
- Solving images with 3x4 and 4x3 board size (all possible cases tested in TDD)
- Solving images with 4x4 board size (all possible cases tested in TDD)
- Solving images with 4x5 and 5x4 board size
- Visualization of solving pictures step by step on the screen
Extra functionalities, order is important. Verification at least with the help of these samples:
- Solving examples with difficulty level 1 (according to the Logi Publishing House scale, to be verified with several examples of such pictures)
- Solving examples with difficulty level 2 (according to the Logi Publishing House scale, to be verified with several examples of such pictures)
- Solving examples with difficulty level 3 (according to the Logi Publishing House scale, to be verified with several examples of such pictures)
- Solving examples with difficulty level 4 (according to the Logi Publishing House scale, to be verified with several examples of such pictures - this is where the interesting algorithmic work starts)
- Solving examples with difficulty level 5 (according to the Logi Publishing House scale, to be verified with several examples of such pictures)
Extra functionalities, in any order, but after all required functionalities have been delivered:
- Visualization of solving pictures step by step using a graphics library (Qt or OpenCV)
- Loading pictures in a graphic form in addition to the text form - from a photo or from a scan and processing them to JSON format(could be in separate binary file)
- Optimization of algorithms in terms of time