YZF_Sudoku

Programs which generate, solve, and analyze Sudoku puzzles

Re: YZF_Sudoku

Postby axiel » Wed Feb 09, 2022 6:42 pm

yzfwsf wrote:5.Batch problem solving module, the first step specifies the input file, which should be a text file, each line contains a puzzle,


First I want to thank yzfwsf for all the effort they put into this solver/trainer. It's been an excellent resource for learning how some of the strategies work, and testing my own puzzles.

Something I've noticed when using the batch solver, it will sometimes 'skip' solve-able puzzles, I think it has something to do with puzzle symmetry as all the skipped puzzles have symmetry of some kind. If you paste the puzzle into the grid, it solves normally.

Here are a few examples that won't return anything in the batch solver:

Code: Select all
....6......62.84...9.4.3.1..198.765.5.......3.673.594..7.9.6.3...37.48......3....
.3.7.5.9.2..9.4..7....1....31.4.9.26..9...7..74.6.1.59....9....4..3.8..5.8.5.7.6.
...1.6.....95.82...5..3..6.39..5..18..59.36..26..1..95.7..6..5...63.51.....7.1...
...3.5.....2.1.8...864.213.2.7...3.1.5.....9.8.9...4.2.289.156...5.6.9.....5.4...
...7.8......512.....8.9.2..17..2..35.594.718.48..3..67..4.5.3.....273......9.4...


Thanks!
--- He's an IT guy, but like, with superpowers
User avatar
axiel
 
Posts: 5
Joined: 09 February 2022

Re: YZF_Sudoku

Postby yzfwsf » Fri Feb 11, 2022 3:27 pm

axiel wrote:Something I've noticed when using the batch solver, it will sometimes 'skip' solve-able puzzles, I think it has something to do with puzzle symmetry as all the skipped puzzles have symmetry of some kind. If you paste the puzzle into the grid, it solves normally.
Here are a few examples that won't return anything in the batch solver:

Thank you for submitting a bug. At that time, I copied other functions and forgot to modify the relevant parameters. As a result, the batch puzzle solving module only to solve the puzzles with the number of clues less than or equal to 30. It will be fixed in the next version.
yzfwsf
 
Posts: 921
Joined: 16 April 2019

Re: YZF_Sudoku

Postby hustlefan » Wed Mar 02, 2022 9:17 pm

I just tried your program for the first time and was wondering if you could make the number keys and the ab key work in the other views, RN, CN, and BN, instead of just in the RC view.
hustlefan
 
Posts: 1
Joined: 02 March 2022

Re: YZF_Sudoku

Postby yzfwsf » Tue Apr 12, 2022 6:21 am

Release version 624 on google drive, but not full test yet.
Image
Image
Image
Image
yzfwsf
 
Posts: 921
Joined: 16 April 2019

Re: YZF_Sudoku

Postby creint » Tue Apr 12, 2022 7:52 am

The AIC variant looks strange.
5 | 6 needed (both is impossible)
5 | 6 -> locked singles 9r23c1 -> -9r1457c1
This has more impact than the AIC

After this you can do the naked set 378r123c2 with the common exclusions
creint
 
Posts: 397
Joined: 20 January 2018

Re: YZF_Sudoku

Postby qprfan99 » Sun Jun 05, 2022 12:28 am

Where can I get it from. When you say your cloud drive I have no idea what you're talking about :) :)

Kind regards
Larry
qprfan99
 
Posts: 9
Joined: 04 May 2022

Re: YZF_Sudoku

Postby yzfwsf » Sun Jun 05, 2022 12:34 am

The download link is at the end of the first post.
yzfwsf
 
Posts: 921
Joined: 16 April 2019

Re: YZF_Sudoku

Postby qprfan99 » Sun Jun 05, 2022 1:14 am

Thx for that. Unfortunately I can't convert it to a zip file & I can't open it as a 7z file

Larry
qprfan99
 
Posts: 9
Joined: 04 May 2022

Re: YZF_Sudoku

Postby yzfwsf » Sun Jun 05, 2022 1:58 am

The latest version is YZF_Sudoku624.7z, if you can't open it as a 7z file, then please upgrade your compression management software (upgrade the 7zip program to the latest version for testing).
yzfwsf
 
Posts: 921
Joined: 16 April 2019

Re: YZF_Sudoku

Postby qprfan99 » Sun Jun 05, 2022 2:21 am

Thanks for your help but its all too difficult for my simple mind.

Tried to convert the file on CloudConvert but apparently I have insufficient permissions & I haven't got a clue what that means.

I'll stick with an application that I can just click on a link & it downloads. But thanks for trying

Larry
qprfan99
 
Posts: 9
Joined: 04 May 2022

Re: YZF_Sudoku

Postby yzfwsf » Sun Jun 05, 2022 3:41 am

I don't know what the difficulties are, but YZF Sudoku is an all-in-one green software that can be run directly without installation, just download the file and decompress it. If your 7-zip is not the latest version, you can go to the following website to download it.
https://www.7-zip.org/download.html
yzfwsf
 
Posts: 921
Joined: 16 April 2019

Re: YZF_Sudoku

Postby yzfwsf » Fri Jul 22, 2022 3:13 pm

Release Vesion 625
Gui added Pencile-paper mode
Added patterns game related modules
Added the function of judging whether a puzzle is the smallest puzzle
Added Memory Chain technique, similar to denis_berthier's whip, but I don't know the details and precise definition of whip. In order not to obscure people's understanding of whip, the name Memory Chain is used. And in my solver Like other chains, when searching for Memory Chain, there is no length limit by default, but there are items with length limit in the options, you can try to modify it, but the program will not save this setting, and the default will be unlimited next time.

Image
yzfwsf
 
Posts: 921
Joined: 16 April 2019

Re: YZF_Sudoku

Postby ghfick » Sat Sep 10, 2022 7:37 pm

A Brief Introduction To YZF_Sudoku

YZF_Sudoku is a Sudoku solver. It is a Sudoku creator. It is a Sudoku Solving Assistant. It can be used by people just beginning with Sudoku and it can be used, to advantage, by Sudoku experts as well.

Some Background
YZF_Sudoku is written by Yang Zhi Feng [ Yang, YZF or his forum name : yzfwsf ] . This project is ongoing and the solver is constantly being enhanced and improved. The user interface [ UI ] for YZF_Sudoku is modelled after HoDoKu [ by Bernhard Hobiger ] but YZF_Sudoku has been developed from the ground up using Free Basic within the MS Windows XP operating system [ OS ]. The last release of HoDoKu was in 2012 and Bernhard passed away several years ago. HoDoKu remains very fine software but it is now far from up to date. The Sudoku community continues to grow the techniques used to solve Sudoku puzzles. Many of these new methods are not included with HoDoKu. YZF_Sudoku contains a majority of the techniques in HoDoKu but YZF_Sudoku now contains a very long list of the new techniques and with every new release there are changes and additions implemented.

Finding, Downloading, Installing and Launching the Latest Release of YZF_Sudoku
YZF_Sudoku is to be found at Yang's Google Drive :
drive.google.com/drive/folders/1uk4CCzW2fabLCawCwpwsQga2LtniXLQo

Go to this site and move to the bottom of the page. There you will see the most recent release of YZF_Sudoku as a .7z file. 7z is an archiving program. If you do not have this program, you can find it on the net and it is safe to download using : https://www.7-zip.org/download.html
The archive contains four files. After unzipping these files using 7-zip, keep these four files in a folder.

If your OS is MS Windows, you should be able to run the YZF_Sudoku.exe file directly. You should see a window with a puzzle on the left side and an initially blank right side. You will see five drop-downs on the top left of the window and three tabs on the right hand side. At the bottom, there is an unnamed 'Explanation' window.

If your OS is Linux, you will need additional software to run YZF_Sudoku. The best option here is the Wine software at : https://www.winehq.org/
After installing Wine, you should be able to right click on the .exe file to obtain the option to launch YZF_Sudoku using Wine.

Then, you should see then a window quite similar to the window with the Windows OS.

If your OS is Mac, success with Wine to run YZF_Sudoku appears to be dependent on the version of your OS. Wine should work quite well with MacOS versions 10.8 to 10.14 to launch YZF_Sudoku. As mentioned at the beginning of this guide, YZF_Sudoku is very much a work in progress.

One may get crashes or unexpected responses from time to time. No need to be alarmed with such events. Maybe you will need to 'Force-Quit' and relaunch. Not a big deal.
There are alternatives to Wine that could be explored for the more recent versions of the MacOS.

Orientation to YZF_Sudoku
The solver has a main menu bar with File, Edit, Options, Tool and Help as 'drop-downs'. You can explore the various options with each of these drop-downs. There is quite a bit of content here. It is best to proceed gradually as you learn how YZF_Sudoku works.

Inputting a Puzzle
Perhaps you have been trying Sudoku puzzles from your local newspaper. The most basic way to see such puzzles in YZF_Sudoku is to enter them using the 'New Givens' tool. You can find 'New Givens' in the File drop-down.

After clicking on 'New Givens', you will see each of the 81 cells initially containing all 9 digits called the candidates. With your mouse, you can click on a digit to enter a given in that cell. You start with these givens as shown in your newspaper. There will be 17 or more givens. After you have entered each of the givens, you can click 'Play Game' from the File drop-down.

YZF_Sudoku will then show you the entered givens and it will show you the candidates in each of the remaining cells after applying the rules of Sudoku. The candidates appear as small numbers: 1,2 3 along the top, 4,5,6 along the middle and 7,8,9 along the bottom. Notice that the position determines the number. This so-called 'key-pad' notation for the candidates in a cell is the most widely seen. There are a number of other notations out there. If you would rather not see the candidates, you can toggle with 'Show Candidates' in the Options drop-down.

Solving your puzzle
Now you can begin to solve the puzzle. As you identify a solved cell, you either click on that candidate [ if 'Show Candidates' is on ] or your type the digit after positioning your mouse over the cell [ if 'Show Candidates' is off ]. The solved cells are shown in blue while the givens remain black.


Let us suppose that you have solved some of the cells but you are now stuck. First, make sure that 'Show Candidates' is on. Then, you can request a possible next step using 'Show Next Step' from the Tool drop-down.

The step will show the excluded candidates in red. There may be a quite elaborate visual showing the intricacies of the step. You can exclude candidates by right clicking the appropriate digits. Or you can let YZF_Sudoku do these exclusions for you by repeating 'Show Next Step'. YZF_Sudoku gives you a brief explanation of each step in the bottom 'Results' window. Notice that < > means 'not equal' or 'excluded' or 'eliminated'.

Let us now explore the right hand window in YZF_Sudoku. If you can use 'Auto Solve' from the Tools drop-down.

In the 'Solution Path' window, we will see an entire path to the solution of the entered puzzle. Techniques with a white background are considered 'Easy' steps while those techniques with a Green background are considered 'Medium'.
YZF_Sudoku assigns techniques with five different levels of difficulty : Easy, Medium, Hard using a yellow background, Unfair using an orange background and Extreme using a red background. Further, YZF_Sudoku assigns a level of difficulty for the puzzle as a whole. This level is displayed in the lower left corner of the main window along with a numerical score based on a variant of another solver called Sudoku Explainer [ SE ].
YZF_Sudoku assigns the very hardest puzzles an 'Insane' level based on the SE variant.
Thresholds for these levels have defaults set with the install of YZF_Sudoku. One can personalize these settings by making changes to the .ini file that comes with YZF_Sudoku.
With each step, one receives a brief explanation in the bottom 'Results' window. The visual of the step in the grid is often very helpful to learning how the step works. YZF_Sudoku uses names for the steps that are quite standard in the Sudoku literature and so you can often do an internet search to get more detailed explanations. The original HoDoKu site has quite detailed explanations:
http://hodoku.sourceforge.net/en/index.php
For levels of Unfair and Extreme, many of the steps are based on a class of methods called chains. The notation for such chains used by YZF_Sudoku is based around the 'Eureka' notation. Eureka is becoming quite standard now and has all but replaced the notation used in HoDoKu. You can search on Eureka notation for the details.
The sudopedia site is a good place for a wide range of Sudoku matters: http://sudopedia.enjoysudoku.com/
The sudopedia site was last modified in July of 2010. In the intervening years, there has been a number of important new techniques developed by the Sudoku community. Searching for detailed explanations of these new techniques can yield helpful results but often the resources are quite advanced and not for the 'faint of heart'.

At any stage in a puzzle path, there will be many possible steps available. You can obtain a list of the possible steps by using 'Find All Steps' from the Tools drop-down. Then, you can click on the 'All Possible Steps' tab.

YZF_Sudoku often identifies a quite long list of possible next steps for this puzzle. You can select specific techniques by using the drop-down on the right hand side of this window. By default, one sees 'All Types' but one can make any specific selection.

The third tab with this window is called 'Color Cell'. Color Cell provides the human solver with all kinds of ways to colour candidates or colour cells, draw arrows between candidates to build chains and otherwise assist the human solver with finding steps with a very wide range of techniques. One can also use the filter displayed just below the main menu to identify bi-value cells, conjugate pairs and much more. These filters are labelled 1 through 9 and ab .

Saving A Puzzle
There are many ways to save a puzzle. If you use 'Copy Givens' from the Edit drop-down, then the puzzle is copied to the clipboard of your computer as an 81 digit string like:

..6.74.5.9..3.6.4.........8......52.49..8..71.17......8.........6.5.7..3.5.46.2..

This format is, by far, the most compact version. You can see that digits are saved first row 1, then row 2 and so on until row 9. One sees dot [ . ] for the cells that do not contain givens. One also sees this format with a zero [ 0 ] instead of a dot. YZF_Sudoku will receive such 81 digit versions of a puzzle from the clipboard using Paste in the Edit drop-down. YZF_Sudoku can receive puzzles in many other formats too. For example, maybe you have your puzzle in a text-like format in the clipboard :

Code: Select all
 123     23      6      | 8      7      4      | 139    5      29     
 9       278     1258   | 3      125    6      | 17     4      27     
 12357   2347    12345  | 129    1259   1259   | 13679  1369   8     
------------------------+----------------------+---------------------
 36      38      38     | 7      1349   139    | 5      2      469   
 4       9       235    | 26     8      235    | 36     7      1     
 2356    1       7      | 269    23459  2359   | 34689  3689   469   
------------------------+----------------------+---------------------
 8       2347    12349  | 129    1239   1239   | 14679  169    5     
 12      6       1249   | 5      129    7      | 1489   189    3     
 137     5       139    | 4      6      8      | 2      19     79     

Pasting a puzzle with this format is acceptable to YZF_Sudoku.

In addition, you can copy the current state of the puzzle with 'Copy With Cell State'. This format can be pasted back into YZF_Sudoku at another time. This format is quite concentrated like the 81 digit format.

You can also save a puzzle as a .txt file using 'Save Givens'. You will be prompted for a folder location and a file name to save the file.

You can save the currently displayed solution path. Right click on any step in the displayed path and then select 'Copy Solution Path'. This path is then saved to the clipboard.

Creating A Puzzle
YZF_Sudoku has a puzzle generator. First select the level for the desired puzzle. That drop-down is just below the main menu. Then click the icon just to the left of the drop-down. This icon contains the digits 8 9 6 7 with a red plus sign. You will then see your puzzle with the requested level of difficulty.

You can also generate puzzles that will contain specific techniques. You can use 'Batch Generate Puzzles' from the Tool drop-down. You receive a window to enter the details for your desired puzzles. When you are ready, click 'Generate'. The 'Batch' generation will continue until you click 'Cancel'.
ghfick
 
Posts: 233
Joined: 06 April 2016
Location: Calgary, Alberta, Canada youtube.com/@gordonfick

Re: YZF_Sudoku

Postby shye » Mon Nov 21, 2022 1:23 pm

sometimes the UR xy-wing techniques dont seem to get picked up

i noticed in this puzzle the solver doesnt detect the UR externals xy-wing when you run find all steps (after singles and basics)
however, once the UR test 7 elim is applied, it then finds the y-wing
Code: Select all
.---------------.-----------.--------------.
|*56  #69   4   | 1  2   8  | 3   7    59  |
| 578  279  58  | 3  49  6  | 29  1    459 |
| 1    2-9  3   | 7 #49  5  | 8  *24   6   |
:---------------+-----------+--------------:
| 3    5    6   | 9  1   4  | 7   8    2   |
| 28   1    28  | 6  5   7  | 4   9    3   |
| 9    4    7   | 2  8   3  | 6   5    1   |
:---------------+-----------+--------------:
| 25   8    259 | 4  6   1  | 29  3    7   |
|U46   3    1   | 8  7   29 | 5  U246  49  |
|U467  67   29  | 5  3   29 | 1  U46   8   |
'---------------'-----------'--------------'
generated puzzle
skfr 4.2
..4.2.3.....3.6...1.......635..1..82.1.6.7.9.9.7...6.1.8.4.1.3...1.7.5......3....

XSudo Input: Show
6 Truths = {4C18 6C18 1N2 3N5}
4 Links = {6r1 49r3 9c2}
AUR points {aur 4r8c1 6r9c8 }
1 Elimination --> r3c2<>9

and for this puzzle there is an UR internals xy-wing, but it doesnt seem to notice it at all (which is a shame, as it gives stte)
Code: Select all
.--------------.-----------.-----------------.
| 2    3   8   | 4   5  7  | 6     9     1   |
| 14   5   467 | 16  3  9  | 247   8     24  |
| 9   #17  467 | 16  8  2  |U457  U345   345 |
:--------------+-----------+-----------------:
| 3    2   5   | 8   9  4  | 1     6     7   |
| 7    4   9   | 5   1  6  | 3     2     8   |
| 8    6   1   | 7   2  3  |U45   U45    9   |
:--------------+-----------+-----------------:
| 145  89  34  | 2   7  18 | 459   1345  6   |
| 145  89  24  | 3   6  18 | 2459  7     245 |
| 6    7-1 237 | 9   4  5  | 8    #13    23  |
'--------------'-----------'-----------------'
generated puzzle
skfr 6.8
..845...1.5..39...9....2...3...9416.74.5.6.28.6172...9...2....6...36..7.6...458..

XSudo Input: Show
6 Truths = {3N2 36N7 369N8}
4 Links = {1r9 7r3 1c2 3c8}
AUR points {aur 5r3c8 4r6c7 }
1 Elimination --> r9c2<>1
User avatar
shye
 
Posts: 330
Joined: 12 June 2021

Re: YZF_Sudoku

Postby yzfwsf » Tue Nov 22, 2022 10:58 am

Thanks for reporting the bugs!
The first one is due to the design philosophy. At this stage, because the solver provides too many tricks to slow down, it uses a fixed order to find the elimination of each structure, and will quit when it finds a reasonable elimination, instead of finding another elimination for this structure. At this stage, the fixed order is as follows: Internal Guardian Type, Type 1,Type 2/5,Type 4,Type 3,XY/XYZ-Wing,WXYZ-Wing,6,Hidden Type,Type 7; External Guardian Class, Type 1,Type 3,Type 2/4,XY-Wing.
The second one is a real algorithm error, the previous definition rules are too strict, now fixed, but I can not upload the update program to google drive for now。
yzfwsf
 
Posts: 921
Joined: 16 April 2019

PreviousNext

Return to Software