Today's update on GitHub contains:
- all the rules and functions necessary to look for 1-step and 2-step solutions. Most of it is written in generic form, but the applications are currently only for Sudoku.
Notice that this shows (for those who might still be confused about it) that the same resolution rules used in the standard CSP-Rules simplest-first strategy work in a way totally independent of it.
- an updated version of the User manual with detailed explanations of how to use these new features. I've already given examples in the "Puzzles" forum, but the updated Manual gives the reference procedure.
- an updated version of the graphics in this Manual and their explanations, so as to avoid confusion about what is part of the definition of a whip and what is not part of it (and only plays a momentarily role when checking the whip property in a particular resolution state).
- A few more goodies:
- shuffle functions (see the Goodies folder of SudoRules): permute rows, columns, floors, towers, digits.
- pretty-print functions. Examples should make it clear:
(pretty-print-sudoku-string "1..5....2.2.7...3...3.6.1..........8.4..5..9.6.2........6...4...5...3.7.8....4..9")
gives:
- Code: Select all
+-------+-------+-------+
! 1 . . ! 5 . . ! . . 2 !
! . 2 . ! 7 . . ! . 3 . !
! . . 3 ! . 6 . ! 1 . . !
+-------+-------+-------+
! . . . ! . . . ! . . 8 !
! . 4 . ! . 5 . ! . 9 . !
! 6 . 2 ! . . . ! . . . !
+-------+-------+-------+
! . . 6 ! . . . ! 4 . . !
! . 5 . ! . . 3 ! . 7 . !
! 8 . . ! . . 4 ! . . 9 !
+-------+-------+-------+
(pretty-print-sukaku-list
1 6 4789 5 3 89 789 48 2 459 2 4589 7 1489 189 5689 3 456 4579 789 3 2489 6 289 1 458 457 3579 1379 1579 12349 1249 12679 2367 1246 8 37 4 178 1238 5 12678 2367 9 1367 6 13789 2 13489 1489 1789 357 145 13457 2379 1379 6 1289 12789 5 4 128 13 249 5 149 12689 1289 3 268 7 16 8 137 17 126 127 4 2356 1256 9)
gives:
- Code: Select all
+-------------------+-------------------+-------------------+
! 1 6 4789 ! 5 3 89 ! 789 48 2 !
! 459 2 4589 ! 7 1489 189 ! 5689 3 456 !
! 4579 789 3 ! 2489 6 289 ! 1 458 457 !
+-------------------+-------------------+-------------------+
! 3579 1379 1579 ! 12349 1249 12679 ! 2367 1246 8 !
! 37 4 178 ! 1238 5 12678 ! 2367 9 1367 !
! 6 13789 2 ! 13489 1489 1789 ! 357 145 13457 !
+-------------------+-------------------+-------------------+
! 2379 1379 6 ! 1289 12789 5 ! 4 128 13 !
! 249 5 149 ! 12689 1289 3 ! 268 7 16 !
! 8 137 17 ! 126 127 4 ! 2356 1256 9 !
+-------------------+-------------------+-------------------+
Width is automatically adapted to the largest number of candidates in a cell.