This is a homework about Formulating a game called "Magnet Puzzle" into CSP, then using Backtracking, Forward Checking to solve it. Various heuristics such as MRV, LCV, Arc consistency (AC3) is used to improve the searching performance. This homework is a part of many projects in a Fundamentals to AI course @ FUM.
Magnet Puzzle game is explained in CSP project.pdf, the implementation of forward and backward checking, ac3 and heuristics is explained in Report.pdf result of MRV, LCV and AC3 are compared in Report.pdf aswell.