


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



Computer Science Department 1
You are asked to build a coloring puzzle solver by using the first order logic to CNF as described below: Given a matrix of size 𝑚 × 𝑛, where each cell will be a non-negative integer or zero (empty cell). Each cell is considered to be adjacent to itself and 8 surrounding cells. Your puzzle needs to color all the cells of the matrix with either blue or red, so that the number inside each cell corresponds to the number of blue squares adjacent to that cell (see Figure 1 ) Figure 1 An example of input matrix (left) and output matrix (right) In order to solve this problem, you can consider some steps:
Computer Science Department 2 Figure 2 A Sample GUI for coloring puzzle o When the user presses the Start button, runs the A* algorithm, at each step, the state of the current State is displayed on the form, the step order and the current State's heuristic value are also displayed on the form (you can find a demo video at here.) o Students can use Python's tkinter library to create GUI REQUIREMENTS:
1. Collaboration Policy You can work individually or in groups. Each group has maximum 3 students. 2. Submitted documents
Computer Science Department 4 Grading Policy: We have some rubric for assessing your work. No. Criteria % 1 Solution description Describe the logical principles for generating CNFs correctly. 30 % 2 Implementation: Generate CNFs automatically ( 1 0%) Use pysat library to solve CNFs correctly ( 10 %) Apply A* to solve CNFs without a library ( 10 %) Program brute-force algorithm to compare with A* (speed) (5%) Program backtracking algorithm to compare with A* (speed) (5%) Graphic interface (10%)
Documents and other resources: Give at least 5 testcases with difference sizes (5x5, 9x9, 11x11, 15x15, 20x20…) to check your solution ( 10 %) Thoroughness in analysis and experimentation ( 5 %) Comparing results and performance ( 5 %) Comply with the regulations of submission requirements ( 10 %) 30 % Note: