Bitwise/Boolean Sudoku Solver

Programs which generate, solve, and analyze Sudoku puzzles

Re: Bitwise/Boolean Sudoku Solver

Postby rjamil » Fri Nov 17, 2017 5:17 pm

Hi,

Pleased to share latest RJSolBit.c and RJSolBit.cpp program.

In this release:
Minor bug fix: In line # 41, replace bits to digits value from 378 to 678 at first position as typo error. It only effects debug pencil mark output of cells that contain 678 as clues.

Added: Empty Rectangle strategy.

R. Jamil
Attachments
RJSolBit.cpp
C++ Language
(83.07 KiB) Downloaded 36 times
RJSolBit.c
C Language
(83.19 KiB) Downloaded 39 times
rjamil
 
Posts: 210
Joined: 15 October 2014
Location: Karachi, Pakistan

Re: Bitwise/Boolean Sudoku Solver

Postby rjamil » Sun May 20, 2018 8:07 pm

Hi all,

Pleased to share attached herewith the latest RJSolBit.c program (after half year). This time, discontinued development in C++ version of the same.

Now, this version search strategies as per following order:
1) Zero State check;
2) Hidden Single;
3) Naked Single (or guess from minimum clue cell position);
4) Naked & Hidden Tuples (pair, triplet & quad);
5) Locked Candidate 1 & 2;
6) Basic Fishes (X-Wing, Sword Fish & Jelly Fish);
7) Skyscraper & Grouped Skyscraper;
8) 2-String Kite and Grouped 2-String Kite;
9) Empty Rectangle, Dual Linked Empty Rectangle, Grouped Empty Rectangle & Dual Linked Grouped Empty Rectangle;
10) XY-Wings Type 1 (Row-Column wise) & XY-Wings Type 1 Transport;
11) XY-Wings Type 2 (Box-Line wise), XYZ-Wings & XYZ-Wings Hybrid Type 1 & 2;
12) W-Wings Type 1 & 2;
13) WXYZ-Wings Type 1 (Row-Column wise); and
14) WXYZ-Wings Type 2a, 2b, 3, 4a & 4b (Box-Line wise).

Note:-
a) I have switched hidden single routine search before naked single routine. By doing this, add 2 more Ruud's 50K puzzles solved without guess.
b) Now, the solver is able to solve 7267 out of Ruud's 50K puzzles without guess.

R. Jamil

Added on 20180608:
Noticed that few Naked Singles are reported as Hidden Singles due routines switched. Therefore, adding following one line to distinguish them as Naked Single:

Replace line 403:
y = 1; // 1 Represent Hidden single Cell position
With Line 403 and 404:
if (B[g[r[a]]] > 1)
y = 1; // 1 Represent Hidden single Cell position
Attachments
RJSolBit.c
(169.75 KiB) Downloaded 10 times
rjamil
 
Posts: 210
Joined: 15 October 2014
Location: Karachi, Pakistan

Previous

Return to Software