Due Tuesday, May 11 at 11:59 PM via e-mail to BOTH vrastogi at u.northwestern.edu and ddowney at eecs.northwestern.edu. Use EECS 348 Homework 4 as the e-mail subject line. PDF format required. LATE ASSIGNMENTS WILL NOT BE GRADED.
Write a constraint satisfaction problem solver to solve sudoku puzzles
of varying size (see the link for the rules if you're unfamiliar with the puzzles). At least backtracking (BT) and forward checking (FC) must be implemented; other heuristics should be
implemented based on the number of students in the team (see note below).
The goal is to get a performance comparison of various CSP strategies. The input to the solver is a Sudoku board, and the output should be a complete solution, along with the
number of consistency checks utilized. We've supplied specific input puzzles you'll use for this assignment (thanks to Stef
Schoenmackers at Univ. of Washington for these). They have the following format:
Assignment
<board_size> - (board size will be 4, 9, 16, or 25)
<num_initial_values> - (The number of set cells in the initial state)
<row1> <col1> <value1> - value of the cell at row1, col1
<row2> <col2> <value2> - value of the cell at row2, col2
<row3> <col3> <value3> - value of the cell at row3, col3
... for a total of num_initial_values lines
Each row, col, and value is in the range [1, board_size].
This Example corresponds to the board:
2 2 3 4 4
Note: This assignment can be done in the same groups as for Homework 2 and 3. Each team member must however implement a different heuristic (e.g., arc consistency, min conflicts) on her own. Each student must also turn in her own homework write-up along with the code and should understand all key pieces of the code.
Turn in the following:Problem | Backtracking | Forward Checking | <other methods> |
4x4 | 1234 | 567 | ... |
9x9 | 23456 | 7890 | ... |
16x16 | 789K | 12K | ... |
25x25 | (> 1M) | 234K | ... |