The solution of a 6x6 and a 9x9 puzzles with "strange cages"
Author |
Message |
pnm
Posted on: Tue Nov 15, 2011 8:46 pm
Posts: 3305 Joined: Thu May 12, 2011 11:58 pm
|
Re: The solution of a 6x6 and a 9x9 puzzles with "strange ca
clm wrote: We could try your idea and see what happens, I broke (in my solution) a big cage into two parts:
That cut it considerably: 15 seconds to find all 350 solutions Patrick
|
|
|
|
clm
Posted on: Tue Nov 15, 2011 9:32 pm
Posts: 857 Joined: Fri May 13, 2011 6:51 pm
|
Re: The solution of a 6x6 and a 9x9 puzzles with "strange ca
pnm wrote: clm wrote: We could try your idea and see what happens, I broke (in my solution) a big cage into two parts:
That cut it considerably: 15 seconds to find all 350 solutions Patrick An additional restriction, breaking another cage: 6 31,+,a1b1c1a2c2a3b3c3 2,+,b2 150,x,d1d2d3e3f3 4,+,e2 2,-,e1f1f2 3600,x,a4b4c4a5c5a6b6c6 3,+,b5 19,+,d4e4f4f5f6 3,-,d5d6e6 5,+,e5 Here is the graphic with the new splitting
|
|
|
|
pnm
Posted on: Tue Nov 15, 2011 10:39 pm
Posts: 3305 Joined: Thu May 12, 2011 11:58 pm
|
Re: The solution of a 6x6 and a 9x9 puzzles with "strange ca
Bombarding my solver with puzzles helps: I found an annoying bug that only crops up for cages with 8 or more cells (!)
In this case, this caused the solver to state there were no solutions for your last puzzle, when clearly there is at least one.
I fixed the bug, and reran the solver on versions a, b, and c (as I called them):
a: 42672 solutions, found after 495 seconds b: 4280 solutions, found after 87 seconds c: 512 solutions, found after 7.3 seconds
Patrick
|
|
|
|
clm
Posted on: Wed Nov 16, 2011 12:24 am
Posts: 857 Joined: Fri May 13, 2011 6:51 pm
|
Re: The solution of a 6x6 and a 9x9 puzzles with "strange ca
pnm wrote: Bombarding my solver with puzzles helps: I found an annoying bug that only crops up for cages with 8 or more cells (!)
In this case, this caused the solver to state there were no solutions for your last puzzle, when clearly there is at least one.
I fixed the bug, and reran the solver on versions a, b, and c (as I called them):
a: 42672 solutions, found after 495 seconds b: 4280 solutions, found after 87 seconds c: 512 solutions, found after 7.3 seconds
Patrick It looks like your version a is the faster (and the better also considering that probably as the solutions are being found it becomes more difficult to find new ones). Once the bug is fixed we must rethink everything, that is, the original result of 6492 solutions in half an hour for the 6x6 is not longer valid, now with that proportion it will go to 150000 solutions in half an hour or so (version a) and with more time who knows... if there are more...what would be the real number...?. Perhaps we may load again the original puzzle with the four "strange cages", without restrictions, and see what happens. In the other hand, the 9x9... perhaps now, that the solver is fixed and faster, it may find in one hour some solution... and If it founds many we could initiate the restriction process... but your HAL software may protest for so much bombarding!!!
|
|
|
|
pnm
Posted on: Wed Nov 16, 2011 10:08 am
Posts: 3305 Joined: Thu May 12, 2011 11:58 pm
|
Re: The solution of a 6x6 and a 9x9 puzzles with "strange ca
clm wrote: there are more...what would be the real number...? I didn't make that clear: those are the real numbers, i.e. the total number of solutions. Patrick
|
|
|
|
clm
Posted on: Wed Nov 16, 2011 11:49 am
Posts: 857 Joined: Fri May 13, 2011 6:51 pm
|
Re: The solution of a 6x6 and a 9x9 puzzles with "strange ca
pnm wrote: clm wrote: there are more...what would be the real number...? I didn't make that clear: those are the real numbers, i.e. the total number of solutions. Patrick Sorry, I thought you was just testing the versions and stopped running the software. Thanks. However, then, why those big differences in the results between the versions? why version c stops at 7.3 seconds with 512 solutions, i.e, while version a continues finding solutions up to 495 seconds and 42672? I believe you use different techniques for the loops that look for the solutions, right?. Anyway here is a third broken cage: 6 15,+,a1b1c1c2c3 2,+,b2 16,+,a2a3b3 150,x,d1d2d3e3f3 4,+,e2 2,-,e1f1f2 3600,x,a4b4c4a5c5a6b6c6 3,+,b5 19,+,d4e4f4f5f6 3,-,d5d6e6 5,+,e5
|
|
|
|
pnm
Posted on: Wed Nov 16, 2011 11:54 am
Posts: 3305 Joined: Thu May 12, 2011 11:58 pm
|
Re: The solution of a 6x6 and a 9x9 puzzles with "strange ca
clm wrote: Sorry, I thought you was just testing the versions and stopped running the software. Thanks. However, then, why those big differences in the results between the versions? why version c stops at 7.3 seconds with 512 solutions, i.e, while version a continues finding solutions up to 495 seconds and 42672? I believe you use different techniques for the loops that look for the solutions, right?. No, sorry, again I should have been more clear: the versions refer to the puzzle versions: so version (a) is the first 6x6, version (b) the 6x6 with the single "split", version (c) the 6x6 with 2 splits. clm wrote: Anyway here is a third broken cage: So this will become version (d)... Patrick
|
|
|
|
pnm
Posted on: Wed Nov 16, 2011 12:50 pm
Posts: 3305 Joined: Thu May 12, 2011 11:58 pm
|
Re: The solution of a 6x6 and a 9x9 puzzles with "strange ca
clm wrote: Anyway here is a third broken cage:
That last one ("version d") has 66 solutions, computed in about 0.1 seconds. Patrick
|
|
|
|
clm
Posted on: Wed Nov 16, 2011 9:50 pm
Posts: 857 Joined: Fri May 13, 2011 6:51 pm
|
Re: The solution of a 6x6 and a 9x9 puzzles with "strange ca
pnm wrote: clm wrote: Anyway here is a third broken cage:
That last one ("version d") has 66 solutions, computed in about 0.1 seconds. Patrick Ok, thanks, now it is clear. As we introduce restrictions we reduce the number of solutions. Let's try now the "version e" (all four big cages broken): 6 15,+,a1b1c1c2c3 2,+,b2 16,+,a2a3b3 150,x,d1d2d3e3f3 4,+,e2 2,-,e1f1f2 450,x,a4a5a6b6c6 1,-,b4c4c5 3,+,b5 19,+,d4e4f4f5f6 3,-,d5d6e6 5,+,e5 And the corresponding graphic:
|
|
|
|
pnm
Posted on: Wed Nov 16, 2011 9:59 pm
Posts: 3305 Joined: Thu May 12, 2011 11:58 pm
|
Re: The solution of a 6x6 and a 9x9 puzzles with "strange ca
That last one ("version e") had 9 solutions, computed in 0.03 seconds.
You see how hard it is to create puzzles with a single solution: especially for the larger puzzles I like to add more large cages, but they (1) increase solving time, and (2) make it more likely there is more than one solution. Also, generally, puzzles with more symmetry are more likely to have more than one solution (can't prove this, only intuition confirmed).
Another cheap way of reducing the number of solutions is by adding single cell cages (e.g. split a double cell, or remove one from a larger cell).
|
|
|
|
|
|
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
|
|