This is done as an assignment for the Artificial Intelligence course. This notebook includes an Aquarium puzzle, and a comparison of A* and CSP. OR-Tools was used in order to be able to create our cp_model. In aquarium_puzzle.py examples with different input combinations and difficulty levels can be found.
The puzzle contains blocks called "aquariums" and our aim is to fill the aquariums with a specific level of water. The specification of the level are made by the RowConstraints and ColumnConstraints. An example of this game can be seen in the image above taken from Aquarium Puzzle.
-
Blocks is a matrix which helps us to visualize the aquarium's state.
-
RowConstraints represents the number of required cells full of water in the rows.
-
ColumnConstraints represents the number of required cells full of water in the columns.
-
inputlength is the number of cells in rows and columns.
Written with StackEdit.