Skip to content

Add TwoLinesRequireColor heuristic. - #16

Merged
dschafer merged 1 commit into
mainfrom
issue-15-puzzle
Jul 30, 2026
Merged

Add TwoLinesRequireColor heuristic.#16
dschafer merged 1 commit into
mainfrom
issue-15-puzzle

Conversation

@dschafer

Copy link
Copy Markdown
Owner

Issue #15 identified a puzzle that wasn't solvable with our existing heuristics.

With some help from Codex / Sol, this adds a new heuristic: for any two adjacent lines, if all valid solutions use a given color, then we can safely x-out all instances of that color outside those two lines.

With this change, the puzzle in #15 can be solved, and that puzzle is added as a test case to validate the fix.

Resolves #15

Issue #15 identified a puzzle that wasn't solveable with our existing heuristics.

With some help from Codex / Sol, this adds a new heuristic: for any two adjacent lines, if
all valid solutions use a given color, then we can safely x-out all instances of that color
outside those two lines.

With this change, the puzzle in #15 can be solved, and that puzzle is added as a test case
to validate the fix.

Resolves #15
@dschafer
dschafer merged commit 08df335 into main Jul 30, 2026
1 check passed
@dschafer
dschafer deleted the issue-15-puzzle branch July 30, 2026 18:55
@dschafer
dschafer restored the issue-15-puzzle branch July 30, 2026 18:55
@dschafer
dschafer deleted the issue-15-puzzle branch July 30, 2026 18:55
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.

No solution found

1 participant