CSP-Rules, SudoRules, KakuRules...

Programs which generate, solve, and analyze Sudoku puzzles

Re: CSP-Rules, SudoRules, KakuRules...

Postby denis_berthier » Sat Nov 02, 2024 9:50 am

.
Until now, there were functions to permute the rows, columns, bands (floors) and stacks (towers).
I've added functions to permute the digits (relabelling). Their output is a puzzle (in standard string format).

(relabel-9x9-puzzle-with-permutation(?puzzle-string ?perm)
;;; number ?i in the given puzzle becomes perm(?i) in the new puzzle

(random-relabel-9x9-puzzle ?puzzle-string)
;;; same, but with a random permutation

(random-isomorphic-9x9-puzzle ?puzzle-string)
;;; rows, columns, bands, stacks and digits randomly permuted (according to allowed isomorphisms).

.
denis_berthier
2010 Supporter
 
Posts: 4213
Joined: 19 June 2007
Location: Paris

Re: CSP-Rules, SudoRules, KakuRules...

Postby denis_berthier » Sat Nov 09, 2024 12:14 pm

.
In SudoRules, I've added the possibility to arbitrarily select any set of impossible patterns in eleven's list of 630 ones.

This is controlled by two new global variables in new sub-section 2.3.2c of the config file:
;;; First declare you want to make your own selection (compulsory)
;;; this will cancel all previous selections of Imp630 (but not the tridagons):
; (bind ?*Select-Imp630-list* TRUE)
;;; Then select impossbile patterns by their names, e.g.:
; (bind ?*Selected-Imp630-list* (create$ EL14c30 EL13c259))


You don't have to know in advance the names I've given to these patterns:
usually, you'll want to do this after running a larger selection and checking the patterns effectively used in the solution.
This will clean the resolution path of all the useless patterns.
.
denis_berthier
2010 Supporter
 
Posts: 4213
Joined: 19 June 2007
Location: Paris

Previous

Return to Software