SudokuMonster / SukakuExplainer

Modification to Sudoku Explainer (SE) by Nicolas Juillerat to accommodate Sukaku (Pencilmark) Sudoku puzzles
GNU Lesser General Public License v2.1
65 stars 14 forks source link

Formatting in batch mode #59

Open dobrichev opened 5 years ago

dobrichev commented 5 years ago

After the introduction of batch mode solving (command-line parameter -B) the solving process in fact changes from sequence of applied techniques and their respective eliminations, to a graph of techniques which forks at the beginning of the batch and merges back after.

This causes problems in, or at least in interpretation of the solving path output.

Trivial example is that the sum of step times would exceed the total time.

Fortunately at the moment afterHint doesn't allow printing of grid state before the step. If such functionality is added, then the state should be cached in the body of beforeHint as it is currently done for stepBeginTime.

Using existing functionality and format --start="%m" --after="%r%t%s%l%m" --format="%g%t%r/%p/%d%t%S" prints sequence of

initial grid state
first applied technique
next grid state
next applied technique
next grid state
next applied technique
...
next grid state
last applied technique
puzzle summary

This result is easy to be misinterpreted when batch technique is applied. In such case the grid state before the technique in fact isn't the state over which the technique is determined/rated but the state after applying the previous technique from the same batch. The actual before-state is somewhere above and is undistinguishable because we don't print batch markers.

Proposal: Do nothing now, but in the future allow batch markers.

SudokuMonster commented 4 years ago

I'll make a note in our Wiki documentation about this