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

Proposed preprocessing #20

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Proposed preprocessing #20

wants to merge 3 commits into from

Conversation

RobBEN93
Copy link
Collaborator

Preprocess a Sudoku puzzle from py-sudoku. Includes

pre_tuples: Extracts tuples from pre-filled cells in the Sudoku grid.
find_open_tuples: Identifies open cells and calculates potential values for each, considering row, column, and subgrid constraints.
fix_tuples: Filters out cells with a unique possible value from the list of open tuples.
preprocess: Iteratively fills cells with unique values and updates the puzzle state until no trivially solvable cells remain.

It also includes an example code.

RobBEN93 added 3 commits May 29, 2024 18:12
changed def fix_tuples(tuples) for def fix_tuples(open_tuples)
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.

1 participant