champagne wrote:Unhappily, I can't do anything
That's quite all right! I have a means by which I can read it, no need for you to do anything.
And I do intend to have a look at your solver(s) as soon as I can spare some time!
Cheers
MM
champagne wrote:Unhappily, I can't do anything
champagne wrote:I promised to produce a new variant of the brute force if I had something of interest.
I already stated that benchmarking of the brute force with small improvements is difficult, however, my feeling is that this version is significantly faster than the previous one.
The original code is located within my new skmpp2 frame, I prepared a stand alone version with (at least in the brute force files) only the necessary code to run a basic brute force;
In this variant, the best improvement is IMO the selection of the bi-value cell to apply.
I introduced also a quite new way to guess, all “one digit” potential solutions.
I suspect that we have still here some room for improvement, but I have to focus on the 17 clues search for the next weeks.
The code is stored in a specific repository here
And I prepared comments on this variant available here
Normally, this code can work with LINUX, but I only verified than gcc can compile it.
Serg wrote:
It would be interesting to try your SK_BFORCE solver, but I did't managed to understand the way to produce your solver. Too many files are placed in GitHub. What files are necessary for SK_BFORCE? How those files can be loaded? (I have no experience in GitHub usage.)
If I would make your solver, I could compare it with JCZsolve on by own benchmark, containing puzzles from real exhaustive search project (almost all of them have multiple solutions).
Serg
Mathimagics wrote:I'm pretty sure that Serg is running Windows on a laptop ...
champagne wrote:To compile with gcc, I used the command
gcc -march=native sk_t.cpp sk_bitfields.cpp main.cpp sk_bforce.cpp 2> error.txt 1> cout.txt
Serg wrote:Hi, champagne!
Thank you for your help!
I am using Windows 7 (32-bit) in my notebook and I am using gcc (all my code is written on traditional C).champagne wrote:To compile with gcc, I used the command
gcc -march=native sk_t.cpp sk_bitfields.cpp main.cpp sk_bforce.cpp 2> error.txt 1> cout.txt
I downloaded zip-file and got directory "skmpp2-master".
Then I went to this directory (in command line window), executed command
gcc -march=native sk_t.cpp sk_bitfields.cpp main.cpp sk_bforce.cpp
and got error message "gcc: error: CreateProcess: No such file or directory".
Maybe gpp is necessary? (I didn't install it.)
Serg
Serg wrote:Hi, champagne!
I looked through your code. It is rather complicated for me. It's very likely that your solver provides extreme performance for modern CPUs only. I have rather out-of-date computer, so I decided not to waste time trying to assemble working in my environment variant of your solver. The best is the enemy of the good - JCZsolver is quite good.
Serg
{ // select band with more unsolved cells
uint32_t nfreecells = 0, nw;
if (zh_g.pairs.bf.u32[0]) {
nfreecells = _popcnt32(cells_unsolved.bf.u32[0]);
}
if (zh_g.pairs.bf.u32[1]) {
if (nfreecells) {
nw = _popcnt32(cells_unsolved.bf.u32[1]);
if (nw > nfreecells) {
nfreecells = nw;
zh_g.pairs.bf.u32[0] = 0;
}
}
else nfreecells = _popcnt32(cells_unsolved.bf.u32[1]);
}
if (zh_g.pairs.bf.u32[2]) {
if (nfreecells) {
nw = _popcnt32(cells_unsolved.bf.u32[2]);
if (nw > nfreecells) {
nfreecells = nw;
zh_g.pairs.bf.u32[0] = 0;
zh_g.pairs.bf.u32[1] = 0;
}
}
}
}
champagne wrote:In the released code, the cell is taken in the band having the highest residual count of unsolved cells.
sk_bforce -c11 -i30x_hard375.txt
emerentius_ wrote:Also, I could compile your new solver, but I can't get it to actually process any sudokus. Is this not the correct syntax?
- Code: Select all
sk_bforce -c11 -i30x_hard375.txt
emerentius_ wrote:
I've adapted this change to my codebase and I'm seeing a slight downgrade for the most part, possibly a sidegrade on some datasets. Are you using the same fallback guessing procedure if no bivalue exists as jczsolve? If you really do get a speedup from that change, I suspect that the change I did to the heuristic in GuessFirstCell has a similar effect on focusing the work on the bands that are most fruitful, at least in the statistical aggregate of many sudokus.
Mathimagics wrote:Hi Serg,
What CPU do you actually have on that laptop??
You can use the free software tool "CPU-Z" to identify it, and that will tell you exactly what instruction sets / extensions that it supports.
Processors Information
-------------------------------------------------------------------------
Number of cores 2 (max 2)
Number of threads 2 (max 2)
Name Intel Mobile Core 2 Duo T8300
Codename Penryn
Specification Intel(R) Core(TM)2 Duo CPU T8300 @ 2.40GHz
Package (platform ID) Socket P (478) (0x7)
CPUID 6.7.6
Extended CPUID 6.17
Core Stepping M0
Technology 45 nm
Core Speed 2493.6 MHz
Multiplier x Bus Speed 12.5 x 199.5 MHz
Base frequency (cores) 199.5 MHz
Base frequency (ext.) 199.5 MHz
Rated Bus speed 798.0 MHz
Stock frequency 2400 MHz
Instructions sets MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, EM64T, VT-x
Microcode Revision 0x60F
L1 Data cache 2 x 32 KBytes, 8-way set associative, 64-byte line size
L1 Instruction cache 2 x 32 KBytes, 8-way set associative, 64-byte line size
L2 cache 3072 KBytes, 12-way set associative, 64-byte line size
Max CPUID level 0000000Ah
Max CPUID ext. level 80000008h
Cache descriptor Level 1, D, 32 KB, 1 thread(s)
Cache descriptor Level 1, I, 32 KB, 1 thread(s)
Cache descriptor Level 2, U, 3 MB, 2 thread(s)
FID/VID Control yes
FID range 6.0x - 12.0x
Max VID 1.138 V
IBRS not supported
IBPB not supported
STIBP not supported
RDCL_NO no
IBRS_ALL not supported
Temperature 0 39 degC (102 degF) (Core #0)
Temperature 1 37 degC (98 degF) (Core #1)
Clock Speed 0 n.a. (Core #0)
Clock Speed 1 n.a. (Core #1)