A game invented by 2 Japanese people, which goal is to recover the picture with information given at the side of the grid.
For clear details: Nonogram.
We will try to solve a puzzle with size m x n (0 < m,n < 30). The puzzle can be unsolvable, has single answer or multiple answers.
Create a text file for the input called input.txt
, the input includes:
- First line is the size of the test (mxn).
- Next m lines is the row information.
- Next n lines is the column information.
Download and run the file run.py
.
For example you can download file input.txt
of us, then copy and paste the value from datasets
.
You can generate random tests and adjust the size by file PuzzleGenerator.py
.
We are K66 of Hanoi University of Science and Technology, major in Data Science and Artificial Intelligence. Under the guidance of our lecturer, Nguyen Nhat Quang, we work together on this problem.
- Phan Duc Hung
- Nguyen Viet Minh
- Pham Quang Trung
- Truong Gia Bach
read_input.py
: read the input from text file to collect information.
PuzzleGenerator.py
: generate random puzzle.
algorithms\ConstraintProgramming.py
: use Constraint Programming to solve.
algorithms\DFS(BackTracking).py
: use BackTracking to solve.
algorithms\LogicalBackTrack.py
: use Logical BackTrack to solve.
algorithms\SimulatedAnnealing.py
: use Simulated Annealing to solve.
datasets
: folder with available tests that we use to test all algorithms.
input.py
: input file, already filled for example.
input.txt
: the text file to collect input.
run.py
: solve the input