Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for pencilmark Sudoku #12

Open
dudozermaks opened this issue Feb 15, 2024 · 5 comments
Open

Support for pencilmark Sudoku #12

dudozermaks opened this issue Feb 15, 2024 · 5 comments

Comments

@dudozermaks
Copy link

Hi! Thanks for beautiful crate!
Is there any way to add support for pencilmark Sudoku? Are you planning to do that?

@Emerentius
Copy link
Owner

The StrategySolver has the ability to read from and produce grids of possible numbers like the one below, if that's what you're asking about. If you are talking about a sudoku variant, I am not familiar with it.

┌──────────────────────────────┬──────────────────────────────┬──────────────────────────────┐
│ 1         2         3        │ 4         5         6        │ 7         8         _        │
│ 45678     45678     45678    │ 12378     12378     12378    │ 123456    123456    9        │
│ 456789    456789    456789   │ 123789    123789    123789   │ 123456    123456    123456   │
├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤
│ 23456789  13456789  12456789 │ 12356789  12346789  12345789 │ 12345689  12345679  12345678 │
│ 23456789  13456789  12456789 │ 12356789  12346789  12345789 │ 12345689  12345679  12345678 │
│ 23456789  13456789  12456789 │ 12356789  12346789  12345789 │ 12345689  12345679  12345678 │
├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤
│ 23456789  13456789  12456789 │ 12356789  12346789  12345789 │ 12345689  12345679  12345678 │
│ 23456789  13456789  12456789 │ 12356789  12346789  12345789 │ 12345689  12345679  12345678 │
│ 23456789  13456789  12456789 │ 12356789  12346789  12345789 │ 12345689  12345679  12345678 │
└──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘

The StrategySolver is quite unfinished however. There are many strategies beyond the ones that are currently implemented.

@dudozermaks
Copy link
Author

Oh, did not check StrategySolver, just checked Sudoku struct, sorry. Yeah, the first variant is correct, I mean grid of possible numbers.

StrategySolver is almost everything I need (in my case, just rate Sudoku by difficulty + check unique solution). But is it possible to implement this for Sudoku and SudokuSolver structs (to check for unique solution, for example)?

@Emerentius
Copy link
Owner

The StrategySolver can produce a regular Sudoku struct. Unless otherwise specified, the solution the library is looking for is always unique.
The library isn't really a good fit for rating sudokus currently. It would need more strategies to be implemented and I haven't had the motivation to add more.

@dudozermaks
Copy link
Author

I'll rephrase my question. Is it possible to implement a feature to load the grid of possible numbers (like above) into a Sudoku struct? And if yes, are you planning to do that?

@Emerentius
Copy link
Owner

The Sudoku struct only contains a list of clues so loading a pencilmark grid into it is not that useful.

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

No branches or pull requests

2 participants