I would create a main verb that takes just y as a list of 9 numbers, where 0 is 
an encoding for "unsolved cell" and return a list of 9 numbers that provides a 
template to update a sequence of 9 numbers it was taken from where 0s are 
updated with solved numbers or where a cell can contain a list of possible 
candidates that gets pruned by the function.






On Thursday, July 21, 2022 at 01:27:46 p.m. EDT, 'Viktor Grigorov' via 
Programming <[email protected]> wrote: 





Hey, all,
Looking through the code for my sudoku solver, I think I found the (or a) 
reason why it wasn't working. I keep tracking of all unsolved cells' possble 
values. If a cell gets solves, the cells of its face, row, column get updated 
by just removing the value just solved for using "e.". Each updated cell's 
face, row, column would then too need to be updated, and so on. I'm currently 
doing this with one global variable for the the just solved cell and loops, 
wherein the recursion is: if you remove the, say, "3" from the possibilities of 
"2 3" of one cell in the face or row or column a just solved with a "3" cell, 
the global value should assume the value of "2", within the context of just 
that recurssion, and then assume the "3" again.

This is partially the difficulty with working with at most 2 arguments (of the 
same type), right? What does one usually when encoutering such problem? Pass a 
box with >1 elements and interally assign private variables eachtime, and on 
each necessary recurssion pass everything as ordered list of boxes, or is there 
a way of editting the scope of a to-be-called verb (or part of sentence)?
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to