Question: Implement the isConsistent method of the class Grid. It shall perform the consistency check described above. Implement the actual search procedure in the solve method

Implement the isConsistent method of the class Grid. It shall perform the consistency check described above.
Implement the actual search procedure in the solve method of the object Solver.
The assignment code provides a very naive cell selection heuristics function getBestCellSimple, which returns the "first" cell having no value. To (hopefully) reduce the number of sub-instances that have to be generated and checked, it is usually a good idea to select cells in a way that minimizes the number of immediate sub-instances that are consistent. To achieve this, implement the better cell selection heuristics method getBestCellGreedy. Try running the instances provided in the unit tests to see if this heuristics works better than the simple one.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!