Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 subinstances 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 subinstances 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started