GFS code help

Programs which generate, solve, and analyze Sudoku puzzles

GFS code help

Postby coyote56 » Fri Aug 15, 2025 10:27 am

Good morning.
I frequently use the GFS generator to create my grids, and I find this, for example:
4..8..2....8..7....2..9...83..6...9...7.1.4...9...3..58...4..7....1..9....5..8..3 # 96532 FNBTHXYKOG C25.M/S4.da/M1.46.1
My question is if you could please tell me where I can find an explanation for the letters FNBTHXYKOG. I think it refers to solving techniques, but I'd like to know what each letter refers to.
Thank you very much for your help.
coyote56
 
Posts: 26
Joined: 04 September 2015

Re: GFS code help

Postby P.O. » Fri Aug 15, 2025 11:22 am

hi coyote56, is this the generator you're talking about?
P.O.
 
Posts: 2011
Joined: 07 June 2021

Re: GFS code help

Postby coyote56 » Fri Aug 15, 2025 1:12 pm

Hi Po
I appreciate your help.
When I generate boards based on a pattern and based on my knowledge of the methods, I use the following path:

sudoku -gt < layout.txt > generated.txt

where "layout" is the pattern, and "generated" gives me the answer. The problem is that I don't know exactly what each of those letters at the end of the generated sudoku code means.
For example, I'd say that F would be boards that require pairs to solve, N would require triplets, etc.
I'd like to know which solution methods each of those final letters refers to so I can choose the ones that best fit my learning curve.
Thanks
coyote56
 
Posts: 26
Joined: 04 September 2015

Re: GFS code help

Postby P.O. » Fri Aug 15, 2025 2:28 pm

the letters FNBTHXYKOG seem to be a reminder of the constraints used to generate the puzzle
from the user manual:

This solver uses a depth first search by default. Candidate cells with the
least amount of choices are checked first. The constraints are:

F Forced cell (naked single or T1): only one value possible.
N Only cell (hidden single or H1): only one value in row/col/box.
Bn Box claim: (2:boxline) candidates in box confined to one row/col.
(3:linebox) candidates in row/col confined to one box.
Tn (naked) tuple: order <= n (4) n exact n-tuples in row/col/box.
Hn (hidden) tuple: order <= n (4) n hidden n-tuples in row/col/box.
Wn Row/col claim: order <= n (4) pure x-wing/swordfish/jellyfish.
X Singleton cycle: strong and 1-weak edges. Requires B, included in Y.
Y Degree-2 cycle: strong, 1-weak and 0-weak (degree-2) edges. Includes X.
NOTE: y-edge (0-weak) path details are currently disabled pending
enhancement of the 2007-05-01 Y algorithm.
K Degree-2 singles knots (bivalue/location contradiction chains).
O Overlay: single digit 9-cell rookery templates (that WXY miss).
Zn Ronk's general fish finder. n is the max fish size, 2 <= n <= 8.
.m is the max number of fins, 1 <= m <= 3. Fish sizes in the range
2..n are searched. .m always denotes a fin count range from 0..m.
n.m.1 limits the size search to n.
The default is Z5.2.
Pn Constrained proposition net P(C) -- constraints C applied to candidate
propositions. n is the girth (constraint iteration) limit.
The default is 0 for no limit. .m is the candidate degree
(value/location) limit; propositions are only made on cells/values
with degree <= m, in order from least to most. The default is 0
for no limit. Degree 1 limits propositions to bivalue cells only.
The basic constraints are used if (C) is omitted. If singleton
propositions fail to advance the solution then: if P* or P..2
is specified then nested (paired) propositions are applied,
otherwise if G is enabled then normal backtrack logic is used.
-B is enabled and -S is disabled for this constraint. With -O
the minimum girth/degree that advances the solution is used,
and all propositions for that girth/degree are attempted and
counted. Without -O the minimum degree that advances the
solution is used. Related to error nets, 3D-medusa, T&E.
Qn Experimental constraints QX. Q prefix optional. Q stats account
for all Q constraints applied. X may be:
b: Red Ed's BR net which propagates 16 vertex-vertex boolean
relationships derived from strong (3) and weak (1,2) edges
by applying a triangle relationship on groups of the vertices.
Q2 is the number of sweeps, Q3 is the number of triangle
state changes. A sweep searches for triangle state changes.
Sweeps are repeated until there are no more state changes.
t(C): Michael McWilliams' red/green transport: select a degree 2
tuple and determine the common eliminations when one end and
then the other is assigned, using constraints C to propagate
(transport) the initial assignments. The quick constraints
(FN) are used if (C) is omitted. Related to the P constraint.
t1: test only bivalue cells, t2: test only bilocation cells.
Fails on puzzles matching -e 'P&&(P8!=1||P7!=2||V!=2)'.
Disables the XYKO constraints.
G Guess: backtrack search guess (T&E).

The -q option enables, disables, groups and orders constraints (G must
be explicitly disabled). The enabled constraints are called the constraint
set (default FNBTHWXYKOG). The THW constraints are further split
by size: T2H2W2T3H3W3T4H4W4.
P.O.
 
Posts: 2011
Joined: 07 June 2021

Re: GFS code help

Postby coyote56 » Fri Aug 15, 2025 3:31 pm

Thanks Po.
That's what I wanted to know. Now I'm clearer about where to look and what to look for.
coyote56
 
Posts: 26
Joined: 04 September 2015


Return to Software