Sudoku Programmers Forum Index

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log inLog in          Games  Calendar

Log in to check your private messagesLog in to check your private messages   

and now the 25*25
Goto page Previous  1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Puzzles
View previous topic :: View next topic  
Author Message
frisch

Joined: 16 Nov 2005
Posts: 55
:
Location: Paris, France

Items
PostPosted: Wed Nov 23, 2005 3:25 pm    Post subject: Reply with quote

Faster than what ?

I changed the benchmark methodology: the same process does all the puzzles in turn, thus avoiding startup time. Beforehand, I had a script calling the solver for each puzzle.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
frisch

Joined: 16 Nov 2005
Posts: 55
:
Location: Paris, France

Items
PostPosted: Wed Nov 23, 2005 3:27 pm    Post subject: Reply with quote

Here is a minimal 25x25 puzzle obtained from one in the list:

Code:

AM...L3.H...NI.9...C8B...
4.CDN5.7..3.9K.M...OJL...
.6.......C..8.G5.PFB.O.NE
...HFG...NMO..EI.AD25.31.
..P2.D....B......E..M4HC.
.GN.M..LAJ.P.D38....B....
..........2.M.A47.J6G9I.5
..5..27.I39K.......EL1...
..B6A..4.F7...J.G.5.....C
....3K...G......F.A.P...D
F8M.C7A.2.E....J1..3..B.9
..........P.A..G.6....C..
D..BK6I.9MO4.L2...N...8..
.3..I...DH69C............
.E25J.1......F..LI.....G.
.N.45.L.3A..E..7.D.P.K...
CF8.19.JN.A...L...BHDP2.3
.AE9.1M..KFG6.OC2....N.4.
B..I.8...E..DPN1.34......
.J.7.....P........I9.M5..
....4..K..5.IEFA..6.....B
.K6L.A9...JM....C2.5N..7.
H2.A..PB....LO...8..9.M..
J.D8..5..OG6H.B.I.KL.2.E.
.I.PB.C1.7D.4....MH.K..O.


-- Alain
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dukuso

Joined: 14 Jul 2005
Posts: 424
:
Location: germany

Items
PostPosted: Wed Nov 23, 2005 3:35 pm    Post subject: Reply with quote

6.3 times faster than mine.

possible reasons:
1) your program is faster than before
2) the instances were chosen to be hard for my solver
3) my learning heuristics is better on long runs, else there
is not enough to learn


I ran it again with stopping after the solution is found.
Was 1.8 times faster


Code:

                   corr.         my   sigma
----------------------------------------------
Alain        99  57  38  1315.34  1268.439   
Guenter      57  100  68  1547343  103992
Guenter2     38  68  100  858846.2  846251.4   



edit:
 1) 2)  3) 4)  my       sigma
 -----------------------------------------------
 99 69 57 38 1315.34    1268.439   1) Alain 1
 69 99 38 34 748.32     641.4436   2) Alain 2 (see below)
 57 38 99 68 1547343    1103992    3) Guenter 1
 38 34 68 99 858846.2   846251.4   4) Guenter 2





Last edited by dukuso on Wed Nov 23, 2005 3:44 pm; edited 2 times in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
frisch

Joined: 16 Nov 2005
Posts: 55
:
Location: Paris, France

Items
PostPosted: Wed Nov 23, 2005 3:38 pm    Post subject: Reply with quote

If I stop after the first solution:

Quote:

Puzzle 1: time: 190 ms
Puzzle 2: time: 2944 ms
Puzzle 3: time: 145 ms
Puzzle 4: time: 975 ms
Puzzle 5: time: 256 ms
Puzzle 6: time: 857 ms
Puzzle 7: time: 1068 ms
Puzzle 8: time: 1893 ms
Puzzle 9: time: 559 ms
Puzzle 10: time: 451 ms
Puzzle 11: time: 323 ms
Puzzle 12: time: 763 ms
Puzzle 13: time: 369 ms
Puzzle 14: time: 342 ms
Puzzle 15: time: 483 ms
Puzzle 16: time: 328 ms
Puzzle 17: time: 430 ms
Puzzle 18: time: 340 ms
Puzzle 19: time: 567 ms
Puzzle 20: time: 423 ms
Puzzle 21: time: 1363 ms
Puzzle 22: time: 102 ms
Puzzle 23: time: 228 ms
Puzzle 24: time: 178 ms
Puzzle 25: time: 528 ms
Puzzle 26: time: 169 ms
Puzzle 27: time: 917 ms
Puzzle 28: time: 672 ms
Puzzle 29: time: 750 ms
Puzzle 30: time: 484 ms
Puzzle 31: time: 918 ms
Puzzle 32: time: 291 ms
Puzzle 33: time: 617 ms
Puzzle 34: time: 135 ms
Puzzle 35: time: 802 ms
Puzzle 36: time: 559 ms
Puzzle 37: time: 2493 ms
Puzzle 38: time: 102 ms
Puzzle 39: time: 1894 ms
Puzzle 40: time: 688 ms
Puzzle 41: time: 124 ms
Puzzle 42: time: 1284 ms
Puzzle 43: time: 1287 ms
Puzzle 44: time: 2587 ms
Puzzle 45: time: 482 ms
Puzzle 46: time: 1093 ms
Puzzle 47: time: 889 ms
Puzzle 48: time: 531 ms
Puzzle 49: time: 1051 ms
Puzzle 50: time: 492 ms
Back to top
View user's profile Send private message Send e-mail Visit poster's website
frisch

Joined: 16 Nov 2005
Posts: 55
:
Location: Paris, France

Items
PostPosted: Wed Nov 23, 2005 5:42 pm    Post subject: Reply with quote

This one is quite hard for my solver. I don't know whether it is minimal or not:

Code:

37.4..F.O...B.A2E.18K.ML.
.C.O.EBA.D42.JH..FLP396..
.F...L.C...3.MO....N.....
..5...GN..C..P.I.M.J4.1..
..JDL...........9.....8GP
.L4..1C..OFB...A7.I.J.GK.
..O...4FD..H.....9N.....B
...B13.96E..K74.O.8....I.
.H.E75A.N.J6D....2...OL18
A.2....LB.P.I3.JC.G.H.F4.
IP..C.L.21N5.EJ...BF.739.
...GK.3.IH.A6..O.7..B.JF.
.17..D5B...CM..94J..N...2
....J.MGE....8.DI.....C..
NA.2B.789.G.....H.....K.L
1......ML..EN.......7..3K
7I....E....D9.C.M...1..J.
DKH..J.1.....O.EA.74.L...
.NB.M.6.......K5..F2.E...
8..A2...K.3J..F.....9I...
F.NI481...2...EK6GMC...7.
......I3F...C.DN1.....EO5
.O...HD..BL1.A.F23....46.
...137.6...N..5BD..H...AC
C.K6D.O...B.4...LE.5I..HG
[/code]
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dukuso

Joined: 14 Jul 2005
Posts: 424
:
Location: germany

Items
PostPosted: Thu Nov 24, 2005 10:02 am    Post subject: Reply with quote

that one took me 36 minutes.
Satz -s : 15 minutes
Satzoo -no-rand -no-static : 5 min.
for finding the solution. I go for this timing now, since the SAT solvers
only report whether an instance is solvable or not


I did another timing which clearly showed Alain,Satz,Satzoo
better than my program, don't know why my earlier measurements
were different.

Here is another set of 50 random QWHs of order 35 and 196 holes:
(I tested it before without switches for Satz,Satzoo)
http://magictour.free.fr/qwh35

I get worse timings than in the paper for Satz and Satzoo i.e. the
6Gcycles per puzzle for Satz, I can't reproduce.
Satz:42s
Satzoo:18s
Guenter:104s


Last edited by dukuso on Thu Nov 24, 2005 12:07 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
frisch

Joined: 16 Nov 2005
Posts: 55
:
Location: Paris, France

Items
PostPosted: Thu Nov 24, 2005 10:05 am    Post subject: Reply with quote

Btw, it took 38 minutes for my solver to solve the puzzle posted above (checking for all solutions).
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dukuso

Joined: 14 Jul 2005
Posts: 424
:
Location: germany

Items
PostPosted: Thu Nov 24, 2005 11:00 pm    Post subject: Reply with quote

my timings are worse now compared with Satz,Satzoo,Alain,xyzzy
maybe 2-10 times worth.
But let me briefly describe the simple method nevertheless:

Whenever I backtrack, I increment a counter N1[i][c]
where c is the used constraint (out of the 4*N*N for sudoku,
3*N*N for QWH) and i is the actual number of placements
=filled cells.

Then, when there are ties I prefer those constraints with
maximum counter for that number of filled cells.

Instead of i I take i/16=i>>4 or for N=25: i>>6,
so several numbers of givens are grouped into one counter

This is very easy to implement for DLX
Back to top
View user's profile Send private message Send e-mail Visit poster's website
frisch

Joined: 16 Nov 2005
Posts: 55
:
Location: Paris, France

Items
PostPosted: Fri Nov 25, 2005 6:40 am    Post subject: Reply with quote

It seems to me that our timings are rather close, aren't they?
36 minutes for you, 38 for me...

Here is my latest minimized 25x25 fresh from this night, with 273 clues:

Code:

...G...9..4.....6F..L8...
CEIN.HDM.OF.1L..A..9PJ.4.
.....A...L..JBN.2.D.1...H
P49...JB23.AD..7E..C5F...
A1H....F.N5....I.BL...26.
....7..C.6...H4B..1....I5
.F.P...I..B..7.5.L...9...
.L6A...5OF.8P...K.NE..734
B2.E..L...1J.5....O7.K.AP
O.5.CB1.P....3EM....2L.H.
2..MJ.A...9.3.7......P.8C
.....CF.DPG62N.E...OH.M.J
.DL..OM..IE.B8..NH...3..K
.CO1F.B.N.AH..P.78.JE...D
E..6.....H......4M.KIB9..
N.J..6......C..1.5.G..H..
...75LG...6..1..CI..4.E..
9K..6.....HGN.O2P.4......
.OA..IP849...2.K3...7GN..
..G....N...P.D9....A...C1
J...M.NAFE.4..23.7....8L.
.....J.H9CD1LP..GO....4ME
48NK..5.M......JL.......9
.I.OG....835.A.DH..P.....
35......L.J..E....8IG.67B


And here's another one:
Code:

D4K..LG.A..P1......H.....
..J.9.CP3.MKH..472...6G.F
P..3...B5..ED...A.F.1.8NM
I...E.8M.H.7....C..B...L.
15..M..94N...GFI.JD.P..EK
.I.F.6O..J.M.....4B..7.PH
....HB9..I5.....O..J..23N
.8N.L5.4..9..76.F.....1.G
6..7.K..M.DF2.J.G1......8
....BC1....H...D.I...K6..
.KF...5.2.....E3..69M.D.A
L9..OG.I.3.1A.K...8N.25..
...G.D.CP1J..48.L..O7...E
5D..87.K.....M.......O.J.
H3....4.N.7..F.M.....I...
F.1......M8.G..B.9....PD.
469.DF....E..1...8M5....3
.N8..H.3D.K.L.I...1.GE...
.E..3P.8B..A...L.G...4H.O
..C...7....6...KJOED.8.I.
9....E..O2.8.5.N1..MH.F.P
B..D..JLC...E..G.64FA.3.I
..M.G9.H..3..I.JD....1EB7
C1P.5....7.G.O..BHI..N4..
3.62.......J..D...7895...


A third one:
Code:

K..4.G7.9B...H.2F.J.....L
.6H.O..N...D...IB..3...9.
D8..........P6I.N...J1M.5
..........F.N.3..9KM42.A.
G.INL8...A.....41.HP...K.
..CB9K..586..N..P...L.3..
.....NDI..B..M..K1.......
.HAOK..1EP.9D.....I.N84BF
E5..2C..F...L..3..B.6...G
4.P.8...G.75..F...EO.D..9
.4K.....7.N.HG..9M..FJ..2
.E...BKA8.MI3O..H5..G..N.
69...1.H.2......L.8JIA...
1C.....6J.P..58D..7G9HL..
BG5..I4O.3EF...AC..6.K..8
.O.....LK.5G6...A.3.8I.PE
.MEJ.D..4FABI...GL9..O6.K
..F..5..A......P8...DM.H.
..1....C.G....KO4.D....L.
5...I...1..L.C......B...3
H.....5BN.D..179.AF..3...
3.B...F...C......H15.6..7
.7.F6..E....K.4..3.L.B.1.
....1.3..C2.E.PKMN....A..
.L.MC6JK....B...7D.4..G..


-- Alain
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dukuso

Joined: 14 Jul 2005
Posts: 424
:
Location: germany

Items
PostPosted: Fri Nov 25, 2005 6:54 am    Post subject: Reply with quote

thanks for the minimal 25*25 sudokus. Now we have 5 of them.

My other measurements suggest that my timings are worse,
the 36 minutes was only to find the solution and your's was
complete search. I did another run with a modified program which took
more than an hour. This was with the strategy described above,
the parameters can probably be improved.

It seems to me, that we just have to ensure some clustering
of the placements. It doesn't make sense to place the clues
homogeniously over the board, concentrate on regions and
complete these ! How can it be implemented best ?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
frisch

Joined: 16 Nov 2005
Posts: 55
:
Location: Paris, France

Items
PostPosted: Fri Nov 25, 2005 7:07 am    Post subject: Reply with quote

Quote:
It doesn't make sense to place the clues
homogeniously over the board, concentrate on regions and
complete these !


What do you mean? Do you want minimal sudokus with additional properties?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
frisch

Joined: 16 Nov 2005
Posts: 55
:
Location: Paris, France

Items
PostPosted: Fri Nov 25, 2005 12:34 pm    Post subject: Reply with quote

Some more:

Code:

.N..JG..O7591...8I....L..
FG.M.B8...P.E...CJ..H....
...........G.4.H.D.O.NJA2
.....J.EN4.L6MA.B.2......
HE..2..DC.....F4KMA.B.9O8
M....62...47C19......E5..
.I2.8M.JGL...ADN..K..3.F7
..H3.5..89....I.J.....NL.
1B..9.FAP.6.N....537.H..O
......1..N...O...LC.68.PG
KOA.FNBH.....7.C.....M..6
45.ECP.I..N.F.J1...MK.79.
I.L..8.O..9.P...A...2.1J.
..621.D.M.....B8LG..P..CH
.HP.N7E.L1....3..B..O.G45
....BIO....5.C.P...FN48E.
...FL.....2.DH..17..59O..
..I.MF..2G.N...A6O.HC.PB.
72.1..L...IM.96E.45G.....
..9...7M..A.O...I...L....
.C.JA.........1.....E.48.
O.BI.......PHL.6..1....5C
G6M...N4FI8...K..H.E.....
.L..4.917....BE.G8F.M.I..
8F......5.O3..4...9.....K


5.PC..7..J..I...3..H.M.2L
H.......F..DA..N.G...9..P
...3LCP2.54.71.B....J.8..
76M8...3A...H..C.D.FO....
...DK..GI..B.L.6.8.14....
A......M....D.6.N.P....O2
...E5BLF..92..3AJC..6I...
.PNJ.6..E7A.8..IM.OL1.G.C
.L3...O.N.5.KI.46.....9E.
.I.G.A..28.MBP...E..HJ3.7
J.74.L..D1O96.A3.M...GI..
E...1...K....J...P6.7.C.9
8M..A9JO.F.P..1...4.E3N6.
...I.3.7.......EL.CD..H..
....DE2..P...N.........K.
.O.7.FKI1..GJ.N.....9.P8.
.89..H..BNM73D.KFJ..I.6.A
PDBN...9M..C.....O.6..7..
.F.K...4..LA9B..C.E75..GN
G.A.....7.8.....H....O.3.
B...C...4......8K.3.P....
DHE5..FA...J.3..B.2.KC.98
...F...5....N..J9......I.
.J...P..O.BK....I.M.3..5.
9...8.B.6.D.M.I..H.5G.J4.

[/code]
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kranser

Joined: 18 Aug 2005
Posts: 35
:

Items
PostPosted: Fri Nov 25, 2005 4:52 pm    Post subject: Reply with quote

Thanks for all the difficult 25x25 puzzles!
One question though: For all of these puzzles, my solver finds basic patterns (hidden/naked singles, twins, triplets, etc...) and locked candidates, and then reports that it is unable to solve the puzzle without finding any X-Wings, Swordfishes, Forcing Chains, Colouring, XY-Wings. I've not implemented anything more advanced than these techniques yet though, but was wondering if it's normal for these puzzles not to require any advanced techniques (except the really advanced ones like Trial and Error!), or is my solver at fault?

Kranser.
Back to top
View user's profile Send private message
frisch

Joined: 16 Nov 2005
Posts: 55
:
Location: Paris, France

Items
PostPosted: Fri Nov 25, 2005 4:57 pm    Post subject: Reply with quote

I'm not sure to understand the question. The solver used to minimize the puzzles does not try to create puzzles which are still solvable with only "logic".

You are surprised that your solver does not find any "complex" patterns once all the basic patterns have been applied. Is that right? I have no explanation for this fact.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kranser

Joined: 18 Aug 2005
Posts: 35
:

Items
PostPosted: Fri Nov 25, 2005 5:21 pm    Post subject: Reply with quote

Yes that is correct frisch - I am puzzled that I was not able to find any advanced patterns in the puzzles you generated.

I would have expected a few XY wings and/or forcing chains to be found even if they did not lead to the solution of the puzzle.

Could this fact have anything to do with how they were generated, or am I wrong and they are in fact some XY wings in the puzzles listed?

Kranser.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Puzzles All times are GMT
Goto page Previous  1, 2, 3, 4, 5  Next
Page 3 of 5

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Sudoku Programmers topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group

Igloo Theme Version 1.0 :: Created By: Andrew Charron