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
Human Strategies #2
Comments
The A strategy must support two operations:
Outlining of of the reasoning at each step can be added later. For now this will only solve the sudoku and give a sequence of strategies that were successful. This is enough for basic difficulty grading. |
Prior work:
|
A first prototype is now published. Future extensions and API improvements will still come, but this issue won't be open to cover this neverending task. |
The crate should contain a new public struct for solving sudokus like a human would. This struct is to contain additional information about the state of the sudoku, that allow efficient application of the various strategies. An example would be a cache of the possitions that are still possible for a certain number in a row, column or block so that one does not have to iterate over the entire grid.
It should be possible to supply a set of strategies at runtime i.e. as a
Vec<Strategy>
and have it solve the sudoku using only these and return the finished sudoku or however far it got.It should also be possible to simply get a hint, i.e. the result of one strategy being applied only once. The hint should carry the reason why the deduction is valid and not just a set of deduced entries or impossibilities.
I have started work on this in the
strategy_solver
branch. So far 8 strategies (8 structs) are implemented (not yet unit tested) and a solver that drives the sudoku to completion with the given strategies.Todo:
- [ ] Decide on function signature ofStrategy
traitAfter that comes the eternal task of implementing more strategies (here is an overview)
The text was updated successfully, but these errors were encountered: