BigSdk 4-Grid Sudoku "Perfect Player" Software source code

Programs which generate, solve, and analyze Sudoku puzzles

BigSdk 4-Grid Sudoku "Perfect Player" Software source code

Postby RichardGoodrich » Mon Jan 22, 2024 9:27 pm

Big's
BigSdk
Python source code for his 4-grid Sudoku (ala' Denis Berthier) may be found on my dropbox at:

https://www.dropbox.com/scl/fo/usiwk90hd14b405ry2h9y/h?rlkey=tn0oygefkwmi5g3lnlfxsjtyq&dl=0
Big1952
RichardGoodrich
 
Posts: 70
Joined: 12 December 2012
Location: Josephine, TX

Postby 1to9only » Tue Jan 23, 2024 11:04 am

In canonical.py, there is one bug that needs fixing:
In perm_copy():
Change 'next_map = 0'
To 'next_map = 1'
Code: Select all
000000075000080094000500600010000200000900057006003040001000023080000006063240000
000000000000001023000020140000040000003000050060700080020008000605900402907650800 <- canonical form
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Postby 1to9only » Tue Jan 23, 2024 9:25 pm

From another thread.
RichardGoodrich wrote:... 2nd best is just to find a MinLex program I can actually run. So far I have tried only one and even though it was a jar file, I could not get it to run!

canonical.py does calculate the (true) minlex of a sudoku grid.
It is slow (about 2s for a sudoku grid, 4s for a solved sudoku grid, 32s for an empty sudoku grid).
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Re:

Postby RichardGoodrich » Wed Jan 24, 2024 9:26 pm

1to9only wrote:From another thread.
RichardGoodrich wrote:canonical.py does calculate the (true) minlex of a sudoku grid.
It is slow (about 2s for a sudoku grid, 4s for a solved sudoku grid, 32s for an empty sudoku grid).



Thanks so much! If I can only learn to read! And forgive me for getting your "moniker" on the forum wrong - it is NOT "1and9only"
I had not noticed carefully your times. How did you measure it?
Big1952
RichardGoodrich
 
Posts: 70
Joined: 12 December 2012
Location: Josephine, TX

Postby 1to9only » Thu Jan 25, 2024 2:05 pm

RichardGoodrich wrote:How did you measure it?

I am using (my own) slightly modified version of the code posted by 1c982d from here.

In you pasted the code into a file named 'ptime.cpp' and compiled it to 'ptime.exe', usage is: ptime.exe canonical.py

If python.exe is not in PATH, then it has to be invoked to run the code, usage is: ptime.exe [path\]python.exe canonical.py
[path\] is wherever you installed python.

Ditto for any other program where you want to measure execution time, e.g. ptime.exe [program] [parameters]
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018


Return to Software