about gsf[the C source file,or program that runs on win11]?

Programs which generate, solve, and analyze Sudoku puzzles

about gsf[the C source file,or program that runs on win11]?

Postby skysea575 » Sat Jun 06, 2026 3:05 pm

gsf is a classic command-line Sudoku solver/generator (sudoku.exe, known in the community as “gsf”) written by Glenn Fowler at AT&T Labs. It is a native 32-bit old C compiled single-file program. In the early days, it worked on WinXP/Win7/Win10, but largely fails on Win11.

gsf (Glenn Fowler, AT&T Bell Labs) — the original sudoku.c single C source file plus accompanying headers. The original AT&T official domain is now offline. Currently, two reliable source packages remain: the streamlined single-file sudoku.c version, and the full ast-sudoku source package (which includes sudz compression, minlex normalization, and complex logic).

Request: Could someone help provide the C source file, or provide a recompiled program that runs on Win11? Many thanks.
skysea575
 
Posts: 22
Joined: 24 July 2019

Postby 1to9only » Sat Jun 06, 2026 4:14 pm

User avatar
1to9only
 
Posts: 4232
Joined: 04 April 2018

Re:

Postby skysea575 » Sun Jun 07, 2026 8:57 am

1to9only wrote:gsf's source: https://github.com/1to9only/ast-sudoku.2012-08-01

some midifications by me + 64bit binaries: https://github.com/1to9only/gsf-s-sudoku.exe



sudoku64 -m -gt -n10 layout.txt Puzzles.TXT


I'm sorry, but I can't get gsf's source from here: https://github.com/1to9only/ast-sudoku.2012-08-01

Some modifications by me + 64bit binaries: https://github.com/1to9only/gsf-s-sudoku.exe downloaded.

But after downloading from https://github.com/1to9only/gsf-s-sudoku.exe/releases, when running commands in Windows 11-64bit, it cannot generate puzzles. I don't know why.

commands:sudoku64 -gt -n10 layout.TXT Puzzles.TXT

Also, can you upload the software or code as an attachment?

Thank you very much."
skysea575
 
Posts: 22
Joined: 24 July 2019

Postby 1to9only » Sun Jun 07, 2026 8:08 pm

skysea575 wrote:I'm sorry, but I can't get gsf's source from here: https://github.com/1to9only/ast-sudoku.2012-08-01

Strange! Try this: https://github.com/1to9only/ast-sudoku.2012-08-01/archive/refs/heads/master.zip

skysea575 wrote:sudoku64 -m -gt -n10 layout.txt Puzzles.TXT

The correct command is: sudoku64 -m -gt -n10 < layout.txt > Puzzles.TXT

The [input] file layout.txt MUST contain an 81-character sudoku puzzle to use as pattern to generate grids.
The [output] file Puzzles.TXT will contain the generated grids.
User avatar
1to9only
 
Posts: 4232
Joined: 04 April 2018

Re: about gsf[the C source file,or program that runs on win1

Postby skysea575 » Mon Jun 08, 2026 2:24 am

I can now download the code.
After compiling it with VSCode, the generated software `sudoku.exe` is 678 KB (695,144 bytes) in size.

However, when I run the command `sudoku -gt -n10 Layout.TXT Puzzles.TXT`, I do not get any results.

Layout.TXT
..O...O..
.O.....O.
O....O..O
.....O...
...OOO...
...O.....
O..O....O
.O.....O.
..O...O..


Even using your compiled version from `https://github.com/1to9only/gsf-s-sudoku.exe` fails to run.

The previous version was able to generate Sudoku puzzles when running on Windows 7. I’m not sure why it’s not working now.

ps:'sudoku --man' can run.

My system is Windows 11, 64-bit. I would really appreciate your guidance on this. Thank you very much.
Last edited by skysea575 on Mon Jun 08, 2026 2:34 am, edited 1 time in total.
skysea575
 
Posts: 22
Joined: 24 July 2019

Re: about gsf[the C source file,or program that runs on win1

Postby denis_berthier » Mon Jun 08, 2026 2:34 am

skysea575 wrote:I can now download the code.
After compiling it with VSCode, the generated software `sudoku.exe` is 678 KB (695,144 bytes) in size.
However, when I run the command `sudoku -gt -n100 Layout.TXT Puzzles.TXT`, I do not get any results.

Can you try the version included in CSP-Rules: https://github.com/denis-berthier/CSP-Rules-V2.1 folder XTERNS/GSF ?
.
denis_berthier
2010 Supporter
 
Posts: 4677
Joined: 19 June 2007
Location: Paris

Re: about gsf[the C source file,or program that runs on win1

Postby skysea575 » Mon Jun 08, 2026 2:44 am

My goal is to use sudoku.exe to generate Sudoku puzzles according to a specified pattern.

The previous version worked, but the old software can no longer be used on my Windows 11 64-bit computer.

The new version of the code and the downloaded program also fail to work. After compiling it myself, it still doesn't work.

I don't know where the problem is.

Additionally, are there any other software programs that can generate Sudoku puzzles according to a specified pattern?
just ike
layout.txt
..O...O..
.O.....O.
O....O..O
.....O...
...OOO...
...O.....
O..O....O
.O.....O.
..O...O..

Please let me know. Thank you very much.
skysea575
 
Posts: 22
Joined: 24 July 2019

Re: about gsf[the C source file,or program that runs on win1

Postby denis_berthier » Mon Jun 08, 2026 3:40 am

skysea575 wrote:My goal is to use sudoku.exe to generate Sudoku puzzles according to a specified pattern.

Additionally, are there any other software programs that can generate Sudoku puzzles according to a specified pattern?
just ike
layout.txt
..O...O..
.O.....O.
O....O..O
.....O...
...OOO...
...O.....
O..O....O
.O.....O.
..O...O..


You can do that with gsf's program: generate 10 unique minimal puzzles for each for each pattern in pattern.txt:
gsf.exe -n10 -gt -euniq()*(1==minimal) < pattern.txt > puzzles.txt
The patterns must be in line format.
Not sure the 0 will work; you may have to use 1 or X. (Usually, 0 and . are equivalent in gsf).
.
denis_berthier
2010 Supporter
 
Posts: 4677
Joined: 19 June 2007
Location: Paris

Postby 1to9only » Mon Jun 08, 2026 6:50 am

skysea575 wrote: I don't know where the problem is.
Additionally, are there any other software programs that can generate Sudoku puzzles according to a specified pattern?
just ike
layout.txt
..O...O..
.O.....O.
O....O..O
.....O...
...OOO...
...O.....
O..O....O
.O.....O.
..O...O..

This pattern does not produce any grids, or takes too long to find one.

Try the one given in this post: http://forum.enjoysudoku.com/post219180.html#p219180
User avatar
1to9only
 
Posts: 4232
Joined: 04 April 2018

Re:

Postby skysea575 » Mon Jun 08, 2026 10:47 am

1to9only wrote:
skysea575 wrote: I don't know where the problem is.
Additionally, are there any other software programs that can generate Sudoku puzzles according to a specified pattern?
just ike
layout.txt
..O...O..
.O.....O.
O....O..O
.....O...
...OOO...
...O.....
O..O....O
.O.....O.
..O...O..

This pattern does not produce any grids, or takes too long to find one.

Try the one given in this post: http://forum.enjoysudoku.com/post219180.html#p219180


Thanks, the previous mode was indeed too slow for generating Sudoku puzzles.

With the new mode, Sudoku puzzles can be generated quickly now.
skysea575
 
Posts: 22
Joined: 24 July 2019


Return to Software

cron