Hi all, I'm currently working on a basic sudoku solver in Free pascal. I'm inexperienced with objects, and don't intend to use them in this particular program since it would require rewriting most of it (I might do it later in another game) The program doesn't work the "traditional way"(It's not brute forcing through the sudoku, nor does it use a Gauss elimination on the 9x9 matrix), it's rather very "human like". What this means is that it is supposed to use common human strategies. It keeps track of what the candidates for each cell are, and it goes from simple elimination strategies to the more complex ones as each fails. For example, first it will check the grid for cells that only have 1 possible candidate because then it is surely a solution. Then when there aren't any more "naked singles" it will go on to find "Hidden Singles" and Pairs and Triples, X-wings, Jellyfish etc... I'm currently stuck with coding the XY-Wing strategy, I hope to find some help here because I don't intend to work with 4D matrixes and literally 9^6 loops for something like this that's not supposed to be so hard nor do I want 3 pointers operating through a 3D matrix within loops all over the place, it's nuts, there has to be an easier way.

It's purely a mathematical issue that I can't solve in an easy way.

Peace,

InStinct