Output file in standard format for all moves made

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

Re: Output file in standard format for all moves made

Postby jco » Sun Sep 06, 2020 9:05 pm

Hello 1to9only,

Today I used again Sukaku Explainer new feature in a brand new puzzle Rita (created by coloin).
Hidden Text: Show
initially without PMs

CH=cross-hatching,
PP=pointing pair,
CP=conjugate pair
LC=locked candidates,
FH=full house,
NS=only possible candidate in the cell (naked single)
OPR(n; r)=only place n can go in row r
OPC(n; s)=only place n can go in column s
OPB(n; m)=only place n can go in block m


1. r4c7=6 (CH)
2. r7c1=4 (OPR(4;7))
3. r8c1=9 (in b9 a 9 can go only at r9c89, so by CH r8c1=9)
4. r8c6=7 (78 are the only possible candidates in r8c56 and r2c6=8)
5. r8c5=8 (FH in r8)
6. r6c4=8 (by CH the only places 8 can go in b6 is r5c89, so by CH r6c4=8)
7. r9c1=7 (OPC(7;1))
8. r5c3=7 (CH)
9. r5c2=3 (CH)
10. r6c1=2 (OCC)
11. r1c1=3 (FH)
12. r9c3=3 (CH)
13. r4c6=3 (OPC(3;6))
turning candidates list on
14. r6c5<>9 (LP 59 in r6b4)
15. r6c6<>9 (LP 59 in r6b4)
16. r6c5<>5 (LP 59 in r6b4)
17. r5c6<>4 (LP 46 in b5 and r6)
18. r5c5<>4 (LP 46 in b5 and r6)
19. r5c4<>4 (LP 46 in b5 and r6)
20. r1c8<>1 (CP 1s in r79c8)
21. r5c9<>9 (LC 259 in b6p234)
22. r5c9<>5 (LC 259 in b6p234)
23. r5c9<>2 (LC 259 in b6p234)
24. r5c8<>2 (LC 259 in b6p234)
25. r5c8<>9 (LC 259 in b6p234)
26. r4c4<>2 (PP of 2s in r4c89)
27. r4c5<>2 (PP of 2s in r4c89)
28. W-wing in 89:
Code: Select all
+----------------------+----------------------+----------------------+
| 3      289   *89     | 12467  124679 12469  | 159    249    245-9  |
| 5      7      4      | 12     1239   8      | 19     6      239    |
| 1      29     6      | 24     2349   5      | 8      7      2349   |
+----------------------+----------------------+----------------------+
| 8      4      1      | 57     579    3      | 6      29     259    |
| 6      3      7      | 125    1259   129    | 59     48     48     |
| 2      59     59     | 8      46     46     | 7      3      1      |
+----------------------+----------------------+----------------------+
| 4      6     *58     | 9      125    12     | 3     *18     7      |
| 9      1      2      | 3      8      7      | 4      5      6      |
| 7      58     3      | 1456   1456   146    | 2      189   *89     |
+----------------------+----------------------+----------------------+

W-wing (9=8)r1c3-r7c3=r7c8-(8=9)r9c9 => r1c9<>9
29. Finned Swordfish in 9

Code: Select all
+----------------------+----------------------+----------------------+
| 3      289    89     | 12467  124679 12469  | 159    24-9   2459   |
| 5      7      4      | 12    *1239   8      |#19     6     *239    |
| 1      29     6      | 24     2349   5      | 8      7      234-9  |
+----------------------+----------------------+----------------------+
| 8      4      1      | 57    *579    3      | 6     *29    *259    |
| 6      3      7      | 125    1259   129    | 59     48     48     |
| 2      59     59     | 8      46     46     | 7      3      1      |
+----------------------+----------------------+----------------------+
| 4      6      58     | 9      125    12     | 3      18     7      |
| 9      1      2      | 3      8      7      | 4      5      6      |
| 7      58     3      | 1456   1456   146    | 2     *189   *89     |
+----------------------+----------------------+----------------------+

Finned Swordfish in 9 with r249 c589, fin at r2c7 => -9 r1c8,r3c9
(the fin r2c7 can see both r1c8, r3c9)

30. W-Wing with 4 eliminations

Code: Select all
+----------------------+-----------------------+----------------------+
| 3     b289    89     | 12-467 12-4679 12-469 | 159   a24     2459   |
| 5      7      4      | 12     1239    8      | 19     6      239    |
| 1     c29     6      |d24     2349    5      | 8      7      23-4   |
+----------------------+-----------------------+----------------------+
| 8      4      1      | 57     579     3      | 6      29     259    |
| 6      3      7      | 125    1259    129    | 59     48     48     |
| 2      59     59     | 8      46      46     | 7      3      1      |
+----------------------+-----------------------+----------------------+
| 4      6      58     | 9      125     12     | 3      18     7      |
| 9      1      2      | 3      8       7      | 4      5      6      |
| 7      58     3      | 1456   1456    146    | 2      189    89     |
+----------------------+-----------------------+----------------------+

w-wing (4=2) r1c8-r1c2=r3c2-(2=4)r3c4 => -4 r1c456, r3c9
31. An AIC

Code: Select all
+----------------------+-----------------------+----------------------+
| 3     -289    89     | 1267   12679   1269   | 159   g24    f2459   |
| 5      7      4      | 12     1239    8      | 19     6      239    |
| 1     a29     6      | 24     2349    5      | 8      7     -23     |
+----------------------+-----------------------+----------------------+
| 8      4      1      | 57     579     3      | 6      29     259    |
| 6      3      7      | 125    1259    129    | 59     48    e48     |
| 2     b59     59     | 8      46      46     | 7      3      1      |
+----------------------+-----------------------+----------------------+
| 4      6      58     | 9      125     12     | 3      18     7      |
| 9      1      2      | 3      8       7      | 4      5      6      |
| 7     c58     3      | 1456   1456    146    | 2      189   d89     |
+----------------------+-----------------------+----------------------+

(2=9)r3c2-(9=5)r6c2-(5=8)r9c2-r9c9=(8-4)r5c9=(4)r1c9-(4=2)r1c8 => -2 r1c2,r3c9 (+3r3c9);
32. PP 89 in r1c23, b1 => -9 r1c5679, -9r3c2 (+2r3c2)
33. r2c5=3 (OPB(3;2))
34. r3c5=9 (OPB(9;2)) and -9 r45c5
35. LP 57 in r4, b5 => -5 r5c45, r4c9
36. LP 29 in b6 => -9 r5c7 (+5r9c7)
37. r1c7=1 (NS)
38. r2c7=9 (NS)
39. r2c9=2 (NS)
40. r1c8=4 (NS)
41. r1c9=5 (NS)
42. r4c9=9 (NS)
43. r9c9=8 (NS)
44. r5c9=4 (NS)
45. r4c8=2 (NS)
46. r5c8=8 (NS)
47. r3c4=4 (NS)
49. r7c8=1 (NS)
50. r9c8=9 (NS)
51. r2c4=1 (FH)
52. r7c6=2 (NS)
53. r9c2=5 (NS)
54. r7c3=8 (FH)
55. r7c5=5 (FH)
56. r5c4=2 (NS)
57. r1c6=6 (NS)
58. r6c2=9 (NS)
59. r1c2=8 (FH)
60. r1c3=9 (FH)
61. r6c3=5 (FH)
62. r9c4=6 (NS)
63. r4c5=7 (NS)
64. r4c4=5 (FH)
65. r1c4=7 (FH)
66. r1c5=2 (FH)
67. r5c5=1 (NS)
68. r5c6=9 (FH)
69. r6c6=4 (NS)
70. r6c5=6 (FH)
71. r9c5=4 (FH)
72. r9c6=1 (FH)
end

* SE sends the list of moves made with diagrams for every move as show in the link given. I removed the diagrams and added comments for each move. The solution path was produced for the moves up to move 13 and for the moves 32 to 72. Notice that for instance Hodoku does not produce the solution path created by the user, only the ones that are part of the possible solution paths in the code.

I started in SE and had plans to keep going even after turning on the candidates list (any elimination listed in solution path would be latter justified by myself, for instance, if it was a result of turbot fish elimination). Unfortunately when a candidate is eliminated, it is written in the solution path as if the candidate was placed in the cell. I guess this happens because that feature was supposed to be used when solving puzzles completely without PMs.

Regards,
jco
[Edit: added name of the creator of the puzzle]
Last edited by jco on Mon Sep 07, 2020 12:42 am, edited 2 times in total.
JCO
jco
 
Posts: 756
Joined: 09 June 2020

Re: Output file in standard format for all moves made

Postby 1to9only » Sun Sep 06, 2020 10:06 pm

jco wrote:Unfortunately when a candidate is eliminated, it is written in the solution path as if the candidate was placed in the cell.

yes. it's a bug. thanks for finding. lack of testing by me. i'll fix this soon.
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Re: Output file in standard format for all moves made

Postby 1to9only » Mon Sep 07, 2020 7:26 am

1to9only wrote:
jco wrote:Unfortunately when a candidate is eliminated, it is written in the solution path as if the candidate was placed in the cell.

yes. it's a bug. thanks for finding. lack of testing by me. i'll fix this soon.

I've fixed this and the (pre-release) SE jar (zipped) is available here.
[Edit: 16 Sep] The pre-release is no longer available. Just go: here, and download the latest release.
Last edited by 1to9only on Wed Sep 16, 2020 8:49 pm, edited 1 time in total.
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Re: Output file in standard format for all moves made

Postby jco » Wed Sep 09, 2020 5:48 pm

Hello, 1to9only

1to9only wrote:
1to9only wrote:
jco wrote:Unfortunately when a candidate is eliminated, it is written in the solution path as if the candidate was placed in the cell.

yes. it's a bug. thanks for finding. lack of testing by me. i'll fix this soon.

I've fixed this and the (pre-release) SE jar (zipped) is available here.


I download the file and have been using it without problems. Thank you!
I was going to suggest that the moves could appear numbered, but realized that it is not useful in practice because "mouse slips" by the player introduce moves that need to be erased when the player reviews the log file, and so all numbering needs to the shifted.
Anyway, very nice to solve puzzles knowing that every move is being recorded exactly as made by the player.

Regards,
jco.
JCO
jco
 
Posts: 756
Joined: 09 June 2020

Re: Output file in standard format for all moves made

Postby jco » Thu Sep 10, 2020 6:27 pm

Hello,

The information on the solution path created by a human solver is an important information in many situations. However, when this information is automatically generated and available for the user to access it later, there is a way to get even more out of this information. An important, difficult puzzle can be solved/analyzed using a computer program (not the solver) that allows the user to access the user-made solution path in the sense already described. Let's call this part 1 of the process. If the user later quickly adds a comment after every move (in the next line) like shown in the hidden mode,
Hidden Text: Show
35. -5r6c2, -5r6c9
[AIC: (5=4)r6c3-r6c9=(4-7)r4c8=7r4c5-(7=5)r6c5]

then the following scenario would be possible (part 2). This or another user could use the computer code to load the new .txt file and see the game being played, the computer screen would display at every move both the move made (in the board) and also the comment written by the user.
In an ideal situation, the computer code implementation could allow the user to add such comments when making the moves in part 1. The .txt produced would be ready for this or another user to load it using the same computer code to see every move being displayed in the board with the corresponding comment written somewhere in the screen.
Clearly, many computer codes already display the moves listed in a solution path and the text with comments justifying the eliminations is also displayed, but in all situations that I know, that moves were taken from the solution path of the computer solver.

Regards,
jco.
JCO
jco
 
Posts: 756
Joined: 09 June 2020

Re: Output file in standard format for all moves made

Postby 1to9only » Thu Sep 17, 2020 9:47 am

I have an idea to use the (unmodified) saved solution path (partial or complete) to 'replay' the sudoku! This is related to other ideas I'm usually mulling upon...
jco's annotations (from examples posted) would probably not work, as (currently) I think parsing eureka-like notation would be problematic (i.e. too much work!), especially the multiple candidates elimination format.
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Re: Output file in standard format for all moves made

Postby jco » Thu Sep 17, 2020 12:19 pm

Hello, 1to9only,

1to9only wrote:I have an idea to use the (unmodified) saved solution path (partial or complete) to 'replay' the sudoku! This is related to other ideas I'm usually mulling upon...(...).


This is excellent news to me! I wonder if in the output has a blank line after each move (to be filled out later with comments by the player) and when the program reads such output it plays every more and displays the string of characters written by the player somewhere (in the screen). If this is possible*, it will not matter the content of the comment by the user (it might be Eureka notation, ou just some words to describe a move), since it will be used as only a string of characters to be read by the program and displayed (together with the move played). I may have missed something here because I don't know the meaning of 'parsing'.
In the example I've shown, I grouped elimination in one move, but that is not necessary. If, for instance, when making eliminations using a X-wing move, the several eliminations made by the player would be displayed one by one (each elimination move followed by a blank line where later the player would simply write: X-wing elimination). So, there is no need to group eliminations in one move as I did in the example.

Regards,
jco.

*probably the user will have a restriction on the amount, i.e. length, of information given for each move, but this is ok.
[Edit: added paragraph at the end on multiple eliminations]
JCO
jco
 
Posts: 756
Joined: 09 June 2020

Re: Output file in standard format for all moves made

Postby 1to9only » Thu Sep 17, 2020 1:34 pm

The idea comes from the observation that some sukakus (pencilmarks sudokus), 16x16 and 25x25 sudokus can take a very long time to rate/solve - the idea is to save a partial solution (I can have SE create a hints file for the solution steps), and later replay this to carry on rating/solving the puzzle.

I have not given this idea anything more that random thoughts, apart from trying to figure out how to replay the hints file or the unmodified saved solution path, but some standards will be necessary:

- if 1st character is not alphabetic, line is ignored - so grids, pencilmarks, etc. will be ignored.

- if 1st character is alphabetic, line will need parsing (scanning) for possible number placements or candidate eliminations.

- currently a ':' marker precedes number placements and candidate eliminations - I'll keep this. This may mean your solution annotation to change from '1. r4c7=6 (CH)' to '1: r4c7=6 (CH)'. This change would be easier for you to make, rather than me write code to cope with various scenarios!

- for my purposes, replay would be at full speed, but an interval (0s/0.5s/1s/2s) can be made selectable.

- annotations (comments) could appear in the Explanations window:
- if 1st character = '#', e.g. '#W-wing (9=8)r1c3-r7c3=r7c8-(8=9)r9c9 => r1c9<>9'

- an alternative could be:
- 1st character = '!' for display and action , e.g. '!4: r8c6=7 (78 are the only possible candidates in r8c56 and r2c6=8)'.

Nothing more beyond this. I'll let this cook for a while.

jco wrote:the output has a blank line after each move (to be filled out later with comments by the player)

I think I inserted blank lines to make the file more readable.

jco wrote:*probably the user will have a restriction on the amount, i.e. length, of information given for each move, but this is ok.

Yes. Any new code I add will likely limit this to 1000 or 2000 characters. Anything above this would be undefined, and will probably be untested by me.
.
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Re: Output file in standard format for all moves made

Postby 1to9only » Wed Jan 13, 2021 2:19 pm

I've updated my version of SukakuExplainer, download: here.
New options are:
'Add a Note...' to add freeform text to the solution path, and
'Show Solution Path (hints only)' to display the hints applied in the Explanations pane.
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Re: Output file in standard format for all moves made

Postby jco » Wed Jan 13, 2021 5:00 pm

Hello 1to9only,

Thank you for providing the link for the update with these (very useful!) new options.

Regards,
jco
JCO
jco
 
Posts: 756
Joined: 09 June 2020

Previous

Return to General