Skip to content

Conversation

@IronicJuice
Copy link
Collaborator

Added Solver.IsSatisfactory and tests.

Also moved the success condition in SolveRec to happen earlier.
Also changed SolverTests by moving the easy board creation to its' own function, and making it satisfactory.

/// </summary>
/// <param name="board"></param>
/// <returns>True if the board can be solved without trial and error guessing.</returns>
public static bool IsSatisfactory(Board board) // Certain methods for eliminating candidates using inference are not currently implemented. Implementing them would make this function more acurate.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented on this already in #79

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Satisfactory means you can get the solutions without guess-work. Proper is when there is only one solution.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we discussed in the report both of those actually mean the same thing. If you dont need guess work you can always arrive at the single solution. The only time you would ever need guess work is if there is more than one solution.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A sudoku with a single solution does not have to be satisfactory. It depends how you define satisfactory. How much inference is enough to make it unsatisfactory? I feel like using this method as a qualifier for satisfaction is fine, since the IsProper method is separate anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants