projects skfr-fast-rating and sudoku-multi-purpose-program

Programs which generate, solve, and analyze Sudoku puzzles

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby ronk » Wed Oct 31, 2012 4:22 pm

champagne wrote:
coloin wrote:i have a dual core so suppose the setting to 2

I wanted just to send a warning because I locked my computer with a use of skfr with other batches in competition.
limiting the number of threads to 2 is equivalent to doing nothing with a dual core.

Hmm. To most people, I think "dual-core" means two hardware cores which, with hyper-threading, would mean four threads.
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

why console?

Postby dobrichev » Wed Oct 31, 2012 5:24 pm

coloin wrote:anyhow what matters is .....
the program works in window dos box .......just type skfr -ifile and press enter

There are no plans to write GUI (graphical user interface).
If you expect functionalities that explain the solution path, then there are some, but they are written mostly for debugging purposes. Champagne could provide details.
In other words, skfr code is not designed for dumping the chosen solution path and alternative paths.
dobrichev
2016 Supporter
 
Posts: 1850
Joined: 24 May 2010

Re: why console?

Postby champagne » Wed Oct 31, 2012 6:14 pm

dobrichev wrote:If you expect functionalities that explain the solution path, then there are some, but they are written mostly for debugging purposes. Champagne could provide details.
In other words, skfr code is not designed for dumping the chosen solution path and alternative paths.


Hi Mladen,

I think coloin's remark was "positive".

skfr is supposed to "nearly clone" serate. Sudoku Explainer, the parent supplier of serate has a good tutorial GUI interface.

The target was to divide say by 100 the runtime. Not to create new paths or a new tutorial. For me, we reached the target and we have in skmpp a significant improvement potential for a second run. The question is more is there a demand to justify the corresponding investment.

As you say, the log file existing in skfr has only a debugging role. It has not been designed to be used as a user's file.
Moreover, as I am up to now the only one having worked in the process, I accepted prints nobody would dig in.

champagne
champagne
2017 Supporter
 
Posts: 7356
Joined: 02 August 2007
Location: France Brittany

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby champagne » Wed Jul 09, 2014 3:54 pm

Hi all,

After years, Sudoku Explainer ratings remain the reference despite all drawbacks.

For puzzles builders, the main drawback of Sudoku Explainer is the rating time. (I am speaking of the "serate" version used in the pattern game).

skfr widely discussed in that thread produces ratings several times faster than serate (say 1:100 as an order of magnitude) and the ratings are usually close enough to "serate" to be used as an alternative.

skfr has a multi-thread potential and a dll version has been produced.

I continued to work during the last years on a new design of the code keeping as a target the general lay-out of "serate". I did that within my new version of code in a new repository skmpp and cousins code

In that code, I introduced the code published by zhouyundong_2012 see here

I also changed skfr's design and worked in a mode closer to "serate's" design.

I recently prepared a move to a new version of skfr, but the design as of to-day is not ready for a multi-thread processing nor for a dll generation and has nearly no options in the command line. (and the last levels for nested chains are not yet ready but this is of no use for sk_gsplit)

I have in the repository 2 different programs

sk_serate supposed to be the future base for a new version of skfr
sk_gsplit a pre-processor for puzzles specially designed for the pattern game.

I made a comparison on a lot of 2 million puzzles out of the game 232 and I got the following results:

sk_serate is nearly 5 times faster than skfr (less than 6 hours versus more than 25 hours to rate the entire file)
sk_gsplit is about 2 times faster than sk_serate.


the split made by sk_gsplit is the following (chains give only one rating per level in serate):

-puzzles rating below serate ER=62
-puzzles "diamond" with the rating done
-puzzles pearl with the rating done
-puzzles passing the dynamic plus mode
-other puzzles

this is a quite useful tool in the pattern game.


No print is given in these programs, but the same process can be done in skmpp with outputs explaining the path followed

the 2 programs share files starting by the prefix V2 in the repository.

Code: Select all
V2bitfields    a modified version of the same file in skfr
V2sk_tables   collecting nearly all tables in use in the program. Most tables are currently created at the start of the program
V2skfrtype    short file with maily #define and  typedef
V2Solver_step the main file for the process
V2t_128  basically the file supplied by mladen dobrichev for skfr processing 128 bits fields
V2utilities  general functions or classes compiled in a separate run
V2ZhouSolver   all the code derived from zhouyundong_2012's code


The ratings I got in that run deviate at most by 0.2 from skfr ratings.
I have 7400 such puzzles to check in a triple comparison serate;skfr;sk_rating

The results will come in a separate post
champagne
2017 Supporter
 
Posts: 7356
Joined: 02 August 2007
Location: France Brittany

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby dobrichev » Thu Jul 10, 2014 6:28 am

Good job!
dobrichev
2016 Supporter
 
Posts: 1850
Joined: 24 May 2010

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby champagne » Thu Jul 10, 2014 7:38 am

dobrichev wrote:Good job!


Thank you

What I intend to do here is to create separate programs that anybody can use (my own program, skmpp is a working tool that I can't share)

I need some more days to stabilize the current version (more debugging and/or optimization) and then, it should not change for a while.

I have some identified improvement to do at the XCHAIN level, but it will come later.

Just note that here the last level in serate (nested dynamic chain) is not yet implemented. The code is written, but not tested

Another point I have to see is the performance toward skfr at the dynamic plus level. Here, the process used in skfr, completely different, seems better than in sk_serate. But even if sk-serate is weaker at that point, I'll keep the current process, easier to extend to other objects.


Just for players in the game, a ratio 1 to 10 means that in one day, I can check more puzzles than in one week using skfr. This can explain some results.
champagne
2017 Supporter
 
Posts: 7356
Joined: 02 August 2007
Location: France Brittany

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby champagne » Fri Jul 25, 2014 2:23 pm

I made several tests and small improvements in the program sk-serate and in the program sk_gsplit I use in the pattern game.

Both program have reached what I could call a beta test level.

As it is not any more possible to up load files in the repository, I created an exe_files directory in my shared google drive and entered a compressed file containing 2 win32 .exe

sk_serate doing all ratings in a serate mood
sk_gsplit doing a fast rating and a split of the files;

I intend to work on the next game using these 2 programs.


location of the shared file in my google drive
champagne
2017 Supporter
 
Posts: 7356
Joined: 02 August 2007
Location: France Brittany

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby champagne » Sun Jul 27, 2014 2:51 pm

comparing results on huge files is not so easy.

I made a test on 2 000 000 puzzles out of the game 229 to compare serate, skfr and sk-serate.

I did the following

a) rating all the file with skfr and sk_serate (sk_serate is about 5 times faster)
extracting puzzles having different ratings (er ep ed)
I got a file of a little more than 6% of the total (126915 puzzles)

b) I selected in that file puzzles where the sk_serate ER rating was higher than skfr. I got 14017 puzzles

c) I rated using serate that file and compared sk_serate and skfr.
I have now only 287 puzzles where sk_serate rates more than serate.
The maximum deviation is 0.2, but for most of the puzzles, the deviation is 0.1.

I'll investigate these 287 puzzles to find the source of deviation and fix if necessary the code.

A preliminary conclusion, what I already knew, is that sk_serate rates closer to serate than skfr. BTW, I identified long ago bugs in skfr giving a lower rating, but as I intended to change the code, I did not try to fix them.
champagne
2017 Supporter
 
Posts: 7356
Joined: 02 August 2007
Location: France Brittany

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby dobrichev » Sun Jul 27, 2014 8:34 pm

Where is sk_serate.cpp file?
dobrichev
2016 Supporter
 
Posts: 1850
Joined: 24 May 2010

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby champagne » Sun Jul 27, 2014 11:22 pm

dobrichev wrote:Where is sk_serate.cpp file?


good remark, that small file was not in the repository. I added it, it is in the revision 154.

sk_serate is just the calling sequence, handling the command line and writing the results.

The process (function PM_GO::SolveSerate()) replicates without solution prints what is done in the same function in skmpp

that means that anybody willing to know what is done in the program should run skmpp with the relevant command line
champagne
2017 Supporter
 
Posts: 7356
Joined: 02 August 2007
Location: France Brittany

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby champagne » Sun Aug 03, 2014 3:42 pm

I loaded a new version of sk_serate and sk_gsplit (dated 2014_08_03)

This is the set of program I used at the end of the last game.

I fixed in the code a smalll deviation to serate in xloops.
In sk_gsplit, I cancelled the processing of dynamic plus (serate definition). This is not a good option for the game and it was not supposed to be active.

I have identified deviations in Nishio and dynamic mode where sk_serate is 0.1 above serate.
I look later to improve the nishio optimisation, but in dynamic mode, it would be very expensive to be always below or equal to serate, so I accept the 0.1 deviation.

Next step will be to check dynamic plus mode and nested mode toward serate.

The next update should come after these tests have been done.
champagne
2017 Supporter
 
Posts: 7356
Joined: 02 August 2007
Location: France Brittany

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby champagne » Fri Aug 22, 2014 3:16 pm

I loaded a new version of sk_serate and sk_gsplit (dated 2014_08_21)

This is the final code for these 2 programs. I only intend to fix bugs later;
sk_serate nos rates all known puzzles and follows the general design of serate.

deviations to serate are usually in the range -0.2 to +0.2 (usually sk_serate rates below serate)
champagne
2017 Supporter
 
Posts: 7356
Joined: 02 August 2007
Location: France Brittany

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby enxio27 » Fri Nov 10, 2017 4:51 pm

I'm not seeing any way to specify the output file for skfr. Can someone help?
User avatar
enxio27
 
Posts: 532
Joined: 13 November 2007

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby champagne » Fri Nov 10, 2017 6:06 pm

enxio27 wrote:I'm not seeing any way to specify the output file for skfr. Can someone help?


The output file is forced by the program as in many of my programs

entry -ixxx for a file xxx.txt
output
xxx_rat.txt for valid puzzles
xxx_N_rat.txt for non valid puzzles

so usually, the command line is

skfr -ixxx

that's it
champagne
2017 Supporter
 
Posts: 7356
Joined: 02 August 2007
Location: France Brittany

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby emerentius_ » Sun Jun 10, 2018 10:00 am

Google Code has gone down and with it all the links to source code in this thread. Could you make the code available again, champagne?

I've been working on extending my library with a human strategy solver for use in SudokuExplainer like programs as well as for fast rating. Maybe not as fast as a specialized rater, but fast nonetheless. It would be useful to compare my code to prior art.
emerentius_
 
Posts: 23
Joined: 09 January 2018

PreviousNext

Return to Software