rjamil wrote:My idea/question is to implement the techniques/methods in order to reduce the guess work and backtracking. And for that, first reduce the same from empty Sudoku grid, no matter how guess minimize, either by re-ordering the techniques or order of unsolved cell position picking technique (as in David solver case). The number of logical steps is inverse proportional to guess work. (As singleton and guess directly fill the cell position as compared to logical steps, which only reduce the chance of backtracking from next step.)

I tested again empty Sudoku grid for first solution with my solver by Naked/Hidden singles and guess-backtracking routine only (and commented rest of the techniques). It took only 81 steps to complete, including 47 trial-and-error steps. With added techniques, took same 47 trial-and-error steps but total 89 steps.

So, the only positive point to include any logical technique is to reduce the backtracking chances.

Am I going some wrong direction?

As before, that depends on what you are trying to do. If you are concerned with the speed of the code, you are indeed headed in the wrong direction. For standard 9x9 Sudoku, using anything more complex than locked candidates will only slow the whole process down. The largest speedups can be achieved by judicious choice of initial guess placement and optimizing the basic techniques so they are as fast as possible. David P Bird's approach gest a lot of placements without any chance of conflict, which minimizes the the chances of backtracking, while m_b_metcalf's approach allows you to simplify the basic techniques so they take as little time as possible.

Another way to say this is that your count of "steps" is not a good proxy for time taken. Thousands of very simple steps can be taken in the amount of time consumed by a single step using a more advanced technique.

On the other hand, if you are setting yourself a puzzle of how to minimize steps as you have defined them, then there are several questions you could ask next. It would be very useful to quantify how many steps are added by backtracking on average, and then compare that to how many steps can be saved on average by using each individual advanced technique.