Sudoku Explainer

Everything about Sudoku that doesn't fit in one of the other sections

Re: Sudoku Explainer

Postby urhegyi » Wed Mar 01, 2023 3:23 pm

Hajime wrote:In this topic http://forum.enjoysudoku.com/alphabet-xoup-k-t40988.html
I get an error from SukakuExplainer :

java.exe -Xrs -Xmx500m -cp SukakuExplainer.jar diuf.sudoku.test.serate --input=IN.txt --output=OUT.txt -X1

Exception in thread "main" java.lang.NullPointerException
at diuf.sudoku.solver.rules.unique.BivalueUniversalGrave.addBug3Hint(Unknown Source)
at diuf.sudoku.solver.rules.unique.BivalueUniversalGrave.getHints(Unknown Source)
at diuf.sudoku.solver.Solver.getDifficulty(Unknown Source)
at diuf.sudoku.test.serate.main(Unknown Source)

What to do?

Can you post the example you try to rate?
I allways use java -cp SukakuExplainer.jar diuf.sudoku.test.serate -X --input=IN.txt --output=OUT.txt
urhegyi
 
Posts: 743
Joined: 13 April 2020

Postby 1to9only » Wed Mar 01, 2023 3:32 pm

I'm pretty certain Hajime is using SudokuMonster's, and urheghi is using 1to9only's...
User avatar
1to9only
 
Posts: 4175
Joined: 04 April 2018

Re:

Postby urhegyi » Wed Mar 01, 2023 3:38 pm

1to9only wrote:I'm pretty certain Hajime is using SudokuMonster's, and urheghi is using 1to9only's...

Yes, I think in this version this bug has been fixed:
Code: Select all
https://github.com/1to9only/SukakuExplainer/releases/download/2023.2.1/SukakuExplainer.jar
urhegyi
 
Posts: 743
Joined: 13 April 2020

Postby 1to9only » Wed Mar 01, 2023 3:49 pm

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

Re: Sudoku Explainer

Postby Hajime » Wed Mar 01, 2023 5:05 pm

Thanks, both of you ...
User avatar
Hajime
 
Posts: 1350
Joined: 20 April 2018
Location: Fryslân

Re: Sudoku Explainer

Postby urhegyi » Thu Mar 02, 2023 7:15 pm

Question to 1to9only about sukakuexplainer:
How can I import this partial solved state in sukakuexplainer?
Code: Select all
.----------------.------------------.-------------.
| 13  2     49   | 49    8     36   | 5    7   16 |
| 6   178   1347 | 2345  2457  1257 | 28   19  89 |
| 5   178   789  | 29    2679  127  | 268  4   3  |
:----------------+------------------+-------------:
| 17  56    26   | 8     25    9    | 14   3   47 |
| 4   1578  127  | 6     3     257  | 17   59  89 |
| 9   3     78   | 1     57    4    | 68   56  2  |
:----------------+------------------+-------------:
| 2   9     5    | 7     46    8    | 3    16  14 |
| 8   167   167  | 349   49    36   | 47   2   5  |
| 37  4     36   | 25    1     25   | 9    8   67 |
'----------------'------------------'-------------'

Update:
Code: Select all
+----------------+----------------+----------------+
| 13   2    49   | 49   8    36   | 5    7    16   |
| 6    178  1347 | 2345 2457 1257 | 28   19   89   |
| 5    178  789  | 29   2679 127  | 268  4    3    |
+----------------+----------------+----------------+
| 17   56   26   | 8    25   9    | 14   3    47   |
| 4    1578 127  | 6    3    257  | 17   59   89   |
| 9    3    78   | 1    57   4    | 68   56   2    |
+----------------+----------------+----------------+
| 2    9    5    | 7    46   8    | 3    16   14   |
| 8    167  167  | 349  49   36   | 47   2    5    |
| 37   4    36   | 25   1    25   | 9    8    67   |
+----------------+----------------+----------------+

This works.
urhegyi
 
Posts: 743
Joined: 13 April 2020

Postby 1to9only » Fri Mar 03, 2023 9:56 am

urhegyi wrote:How can I import this partial solved state in sukakuexplainer?
Code: Select all
.----------------.------------------.-------------.


Problem is the 4 dots on the first line, these are parsed as empty cells.
User avatar
1to9only
 
Posts: 4175
Joined: 04 April 2018

Postby 1to9only » Fri Mar 03, 2023 8:17 pm

If you leave out the first line, the puzzle can be pasted into SE.
Code: Select all

| 13  2     49   | 49    8     36   | 5    7   16 |
| 6   178   1347 | 2345  2457  1257 | 28   19  89 |
| 5   178   789  | 29    2679  127  | 268  4   3  |
:----------------+------------------+-------------:
| 17  56    26   | 8     25    9    | 14   3   47 |
| 4   1578  127  | 6     3     257  | 17   59  89 |
| 9   3     78   | 1     57    4    | 68   56  2  |
:----------------+------------------+-------------:
| 2   9     5    | 7     46    8    | 3    16  14 |
| 8   167   167  | 349   49    36   | 47   2   5  |
| 37  4     36   | 25    1     25   | 9    8   67 |

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

Re: Sudoku Explainer

Postby Hajime » Tue Mar 21, 2023 4:11 pm

What is a Forcing Chain 7.1-7.5 ?
Is that the same as AIC?
User avatar
Hajime
 
Posts: 1350
Joined: 20 April 2018
Location: Fryslân

Re: Sudoku Explainer

Postby ghfick » Tue Mar 21, 2023 8:42 pm

There is much written about Forcing Chains. Have a look at:

www.philsfolly.net.au/forcing_help.htm

or the help sections on the various Forcing Chains in:

www.sudokuwiki.org/sudoku.htm

like:

www.sudokuwiki.org/Digit_Forcing_Chains

The explanations in SE are quite good too.
ghfick
 
Posts: 232
Joined: 06 April 2016
Location: Calgary, Alberta, Canada youtube.com/@gordonfick

Re: Sudoku Explainer

Postby Hajime » Thu Mar 23, 2023 12:50 pm

Thank you ghfick, but my question is ambiguous.
ghfick wrote:There is much written about Forcing Chains....

The forcing_help link example needs 2 or more AICs.

In http://forum.enjoysudoku.com/revision-of-se-ratings-and-resolution-rules-t36376-30.html?hilit=revision#p292744
the methods and SE-rating are listed.
X-chains an XY-chains are listed and are part of the AIC family. But a single AIC has more possibilities and is not listed.
See here http://forum.enjoysudoku.com/alphabet-xoup-r-t41032.html?hilit=Aic#p332261, a single AIC but not an X- or XY-chain.
Is the AIC method one of Forcing chain family?
Are "Digit Forcing Chain" and "Forcing Chain" the same? (Next to Nishio/Cell/Region Forcing Chains )
User avatar
Hajime
 
Posts: 1350
Joined: 20 April 2018
Location: Fryslân

Re: Sudoku Explainer

Postby eleven » Thu Mar 23, 2023 8:51 pm

Original 2 way forcing chains (starting from 2 digits, which are strongly linked) are equivalent to AIC's, which don't use ALS (multidigit) links. However they can be extended to use such links too (not by explainer afaik).
More way forcing chains (one of at least 3 starting points must be true) are something completely different as basic AIC's, which only use 2-way links.
Digit/Nishio/Cell/Region Forcing Chains only seem to be subsets, which describe, how the starting points are linked (and others are possible like the externals of a UR).
eleven
 
Posts: 3096
Joined: 10 February 2008

Re: Sudoku Explainer

Postby hendrik_monard » Wed Apr 19, 2023 11:34 am

Yogi wrote:Have now downloaded SukakuExplainer-1.18.1 but again I can’t make it work as a program.

Any ideas on where to find the starting exe file or how to activate it?

GitHub tells me I need to use the Command Line

java -cp SukakuExplainer.jar diuf.sudoku.test.serate –man

but it doesn’t work for me. Maybe I’m missing part of the instruction.

Hi Yogi,

Just discovered this thread.
I use Sudoku Explainer for SER(ating) on a Windows 10 laptop. In my scripts written in VBA, the script language for MS Office macros, I use the following command lines :
Code: Select all
Set wshShell = vba.CreateObject("WScript.Shell")
res = wshShell.Run("java.exe -Xrs -Xmx500m -cp SukakuExplainer.jar diuf.sudoku.test.serate --format=""%g ED=%r/%p/%d"" --input=invoer.txt --output=uitvoer.txt", 0, True)

I can run my scripts under MS Word or MS Excel.
The names of the input and output files can of course be changed. You put the puzzle(s) to be rated in the input file and the results are available in the output file. The last two arguments are for hiding the DOS window (0) and for waiting for the result before proceeding with the execution of the next VBA command (True)
This works perfectly for me.
I use a similar command line for skfr(ating):
Code: Select all
res = wshShell.Run("skfr_win32_v_2_0_1.exe", vbHide, True)

In this case the names of the input and output files are fixed.
This works perfectly as well. This rating tool is very fast compared tot SER, and can thus be used as a filter.

However, I have a problem with minlex calculation. As you probably know, you need one of two systems to check the originality of a new puzzle. I have been working with the maxlex system which was the norm until 2020. Nowadays, for reasons unclear to me, there seems to be a tendency towards using the minlex system, and mith is using it for actual and future inventories of new (high rated) puzzles in this forum. So I tried to switch to minlex as well. However, I have a problem with the minlex calculation command line:
Code: Select all
s = wshShell.Run("sudoku-64.exe -qFN -f%#mc puzzles.txt > minlex.txt", vbHide, True)

The file puzzles.txt is read and treated. I can see this when I change vbHide(= 0) to 1. Then a black DOS screen opens and a list of clearly minlexed puzzles rapidly runs over the screen. However, the output file minlex.txt remains empty. At first, I thought that this was due to the VBA environment, but that cannot be the case as SER and skfr calculations function normally in the same environment.
The result (s) = 0 (no problem occurred).
When I remove the file minlex.txt, the command returns s = 1. I consider this as an indication that sudoku-64.exe tests the presence of that output file and sees a problem. When the file is present, s = 0. Why does the output file remain empty?
Over the past months, I have tested this over and over again, but to no avail.
Perhaps one of the other members of this forum can be of help.
In the mean time, I continue with my maxlex based system.
BTW, I am preparing a batch of new high rated puzzles before the summer. The last time a posted such a list was on last September 28th
As usual, I will post the new list on the thread "The hardest sudokus (new thread)"

Hendrik
hendrik_monard
 
Posts: 83
Joined: 19 April 2021
Location: Leuven (Louvain) Belgium

Postby 1to9only » Wed Apr 19, 2023 2:51 pm

hendrik_monard wrote:
Code: Select all
s = wshShell.Run("sudoku-64.exe -qFN -f%#mc puzzles.txt > minlex.txt", vbHide, True)


Try this:
Code: Select all
s = wshShell.Run("cmd.exe /c sudoku-64.exe -qFN -f%#mc puzzles.txt > minlex.txt", vbHide, True)

I think there is a known bug in gpf's minlex routine - can't find a reference post for this!
swb01 has posted a MinLex Routine: http://forum.enjoysudoku.com/minlex-routine-t39261.html
I posted about the 3 'true' minlexing programs I know here: http://forum.enjoysudoku.com/post321580.html#p321580
User avatar
1to9only
 
Posts: 4175
Joined: 04 April 2018

Re: Sudoku Explainer

Postby JPF » Wed Apr 19, 2023 5:52 pm

1to9only wrote:I think there is a known bug in gpf's minlex routine - can't find a reference post for this!

Here is a link where this issue was raised for the programs of gsf and dobrichev. Both programs have the same bug.
Note, however, that dobrichev's program gives a canonical form, say can(), even if it is not always in minimal-lex order.

This means that for any set of digits x1x2...x81 [ 0<=xi<=9] and y1x2...y81 [ 0<=yi<=9]:
can(x1X2...x81) = can(y1y2...y81) if and only if there exists a Sudoku transformation f such that f(x1x2...x81) = y1y2...y81. The two sequences are said to be equivalent.

This works in particular for patterns (xi= 0 or 1) or for any set of digits that are not a subset of a Sudoku grid (invalid puzzles or other issues). So it can be used to eliminate equivalent puzzles or patterns.
To determine the true minlex form of a valid puzzle, you can use the program swb01. I use it as needed. Disadvantages: it does not process patterns or invalid puzzles.
I now have two questions to finish:
  • Which maxlex program do you use?
  • There are a huge number of canonicalizations of the set of matrices A with coefficients equal to 0,1,...,9 related to Sudoku transformations.
    Let's call STA the set of such matrices A.
    A canonicalization on STA is a mapping C from STA to STA such that for any A and A': C(A) = C(A') if and only if there exists a Sudoku transformation f such that A = f(A').
    MinLex and MaxLex are an example of these, easy to understand.
    But what are the fastest canonicalizations to compute by computer?

PS: sudoku transformation = one of the 2x6^8 x 9! transformations.

JPF
JPF
2017 Supporter
 
Posts: 6127
Joined: 06 December 2005
Location: Paris, France

PreviousNext

Return to General

cron