This project is an assessed assignment from the module CS3243 (Introduction to Artificial Intelligence) in NUS. Requirements are to write a program that solves sudoku puzzles by modelling it as a constraint satisfaction problem (CSP). In the assignment, test cases used for assessing are guaranteed to be valid and well-formed.
This program employs the use of the backtracking algorithm to solve the puzzles. Input puzzles are pre-processed with a function that is a hybrid of the AC-3 algorithm and Forward Checking (for early failure detection). This function is used every time the backtracking algorithm does another assignment.The minimum remaining values (MRV) heuristic was also used in this program.