Code rewrite for AIC Chains

Programs which generate, solve, and analyze Sudoku puzzles

Code rewrite for AIC Chains

Postby Wepwawet » Sat Dec 13, 2025 10:32 am

I am contemplating a long overdue update of my code for Alternate Inference Chains in my solver and was wondering what the consensus is on the application of breadth and depth first. At what point should one should consider what strategy to use? I am considering using breadth first up to chains of 5 nodes length before switching to the depth option, is that sound, or efficient. What do you guys think?
Wept
User avatar
Wepwawet
 
Posts: 43
Joined: 19 November 2019

Re: Code rewrite for AIC Chains

Postby StrmCkr » Sat Dec 13, 2025 11:36 pm

I use breadth, on my
dual edge xor gate (strong links) nodal setup.

Build a list of weak inferences (nand) for each node.
. Then breath walk the nodes add in full but only to a depth of 10.(mutable value)

For how to build strong links
https://reddit.com/r/sudoku/w/C-terminology

some math for why this works:
https://reddit.com/r/sudoku/w/aic

After it runs I toss the output into a classifier

named-chains-wings-rings-structure-for-i-ding-in-code-t42435.html
Some do, some teach, the rest look it up.
stormdoku
User avatar
StrmCkr
 
Posts: 1483
Joined: 05 September 2006

Re: Code rewrite for AIC Chains

Postby yzfwsf » Sun Dec 14, 2025 4:11 am

StrmCkr wrote:I use breadth, on my
dual edge xor gate (strong links) nodal setup.

Why emphasize xor? In fact, the strong relationship in the chain is not necessarily xor, but can be true at the same time (accurate description cannot be false at the same time). The relationship between any two candidate numbers in ALS is a typical representative that cannot be both false but can be true at the same time.
yzfwsf
 
Posts: 963
Joined: 16 April 2019

Re: Code rewrite for AIC Chains

Postby Wepwawet » Sun Dec 14, 2025 3:32 pm

Well, I am unsure about the XOR or NAND application. My current AIC chain algorithms goes up to a depth of about 8 nodes, but as I am planning to revise it (as I want to incorporate missing algorithms, e.g. ALS, UR's, into the chains). As for creating a list of weak links, for the love of money, I cannot see, or found, a use for that. My current model for AIC's employs just strong links, the sees of one strong link to another strong link, are the weak links. So, a list of strong links must induce the weak links, unless, I am missing something here.

Anyway, I was more interested in thoughts/feedback on using breadth verses depth, pros and cons, not so much on the mechanisms to achieve it, but on the pragmatism (or lack of) employing one method over the other.

Edited and added: BTW my intention is to limit chains to a depth of 10 nodes.
Wept
User avatar
Wepwawet
 
Posts: 43
Joined: 19 November 2019

Re: Code rewrite for AIC Chains

Postby StrmCkr » Mon Dec 15, 2025 9:11 am

why the emphasis: cause they are all xor gates, including the ones for ALS:
XOR (LS, RCC)

xor by default via the construction limits of Sudoku space and construction rules.

single digit:
xor (mini sector A,mini sector B)

A.I.C the logic is Deterministic:

instead of a union of iteration of truth tables final results via "or" gates if that's the direction you think they are from, as this also works but doesn't respect the grid space.
Some do, some teach, the rest look it up.
stormdoku
User avatar
StrmCkr
 
Posts: 1483
Joined: 05 September 2006

Re: Code rewrite for AIC Chains

Postby yzfwsf » Mon Dec 15, 2025 3:50 pm

If I understand correctly, XOR (a, b) satisfies, then a and b are not only strong but also weak. Obviously, the strong edge of ALS cannot satisfy the inference that it becomes a weak relation.
yzfwsf
 
Posts: 963
Joined: 16 April 2019

Re: Code rewrite for AIC Chains

Postby blue » Mon Dec 15, 2025 6:30 pm

"XOR (LS, RCC)" is correct.
The "weak" part follows from "N cells can't hold more than N digits".
blue
 
Posts: 1096
Joined: 11 March 2013


Return to Software