Thursday, 18th January 2018
Puzzles Solved Yesterday: 149
Home | Register | Login | Current Puzzle | Archives | Leaderboard | Forum | Tutorial | FAQ
Forum Index
 
Page 1 of 212>
Loopy Format and user puzzles
Tilps
Kwon-Tom Obsessive
Puzzles: 4230
Best Total: 20m 22s
Posted - 2007.08.10 12:32:44
I'm trying to add loopy format support to my loop-de-loop program so that I can export puzzle and inport them into the user puzzles section.
However the user puzzles section keeps telling me that my puzzles don't appear to be in loopy format.

The files I am attempting to import have a single line of the format
<width>x<height>:<puzzle details>
where puzzle details is a list of numbers and lower case letters where a letter indicates a number of spaces and a number indicates a clue.  'a' indicates 1 space 'b' indicates 2.  The puzzle details are left to right, top to bottom.  I have tried with both combining spaces over line ends and without, but neither seem to be accepted.

Just as a test I attempted to load this months beast into the user puzzle section from a file save of the loopy format.  I expected that it would complain that the puzzle is too big, but I again got an error stating that it did not appear to be in loopy format.

What am I doing wrong?
Last edited by Tilps - 2007.08.10 13:13:26
foilman
Kwon-Tom Admin
Puzzles: 1718
Best Total: 24m 8s
Posted - 2007.08.10 12:43:49
Try loading a saved game file from Loopy... it's that format that it reads. The beast puzzles are instead in a format that Loopy needs for its "specific..." game option (the 1-line version).

I should probably standardise all that stuff!

Edit: forgot to mention that the saved file should include a solution!
Last edited by foilman - 2007.08.10 12:46:24
Tilps
Kwon-Tom Obsessive
Puzzles: 4230
Best Total: 20m 22s
Posted - 2007.08.10 13:15:32
You could add support to import the loop-de-loop save format... hint hint

Okay, i'll go download loopy so I can generate and find out what its file format is.
Naivoj
Kwon-Tom Addict
Puzzles: 314
Best Total: 33m 50s
Posted - 2008.02.23 03:16:29
Tilps,
I was wondering if you complete upgrading your program to support loopy format (string or save file)?
Also can you repost a link to your LoopDeLoop program, as I could not found it anymore in the forum: too many entries!
I downloaded it once back in September and was really impressed by the solving times of a few hard 10x10 puzzles I tested: lightning fast!
Tilps
Kwon-Tom Obsessive
Puzzles: 4230
Best Total: 20m 22s
Posted - 2008.02.23 06:11:09
The loopy format support is definitely incomplete in my latest code.
The latest non-loopy supporting version can be found here: LoopDeLoop.
Last edited by Tilps - 2008.02.23 06:12:18
Tilps
Kwon-Tom Obsessive
Puzzles: 4230
Best Total: 20m 22s
Posted - 2008.02.24 02:47:40
The above link has been updated - beta 25 adds support for loading/saving loopy files - both the compact puzzle description and the full loop save file.
Naivoj
Kwon-Tom Addict
Puzzles: 314
Best Total: 33m 50s
Posted - 2008.02.24 08:31:36
Thank you Tilps for this upgrade. I was able to load the "insane" user beast #18 into LoopDeloop, but after 1h30m it still hasn't solve it. There are several settings for "Puzzle Creation", but only one for "Puzzle Solver"(Visual). Is there a setting that will speedup solving large (beast) puzzle?
Tilps
Kwon-Tom Obsessive
Puzzles: 4230
Best Total: 20m 22s
Posted - 2008.02.24 10:15:43
turning off visual solver will speed up solving by a factor of about a million.  It will also hang the program until solving is complete.

However, your puzzles are 'unsolvable' (that is to say they require massive amounts of brute force) without cell coloring/advanced detection of loop closings.

I have a version of my program which I have added cell coloring too (need to add associated settings - and it currently only does the most trivial of cell coloring rules, outside edge and adjacent colors, next up is inferred edge coloring between diagonal colors and its converse and color counting round a number) - but it at least can solve your '#2' easy in a second or two rather than a few minutes.

I'll see if its any better at #18 now
(And the answer is ... not much)
Last edited by Tilps - 2008.02.24 10:52:58
Tilps
Kwon-Tom Obsessive
Puzzles: 4230
Best Total: 20m 22s
Posted - 2008.02.24 12:12:34
Beta 27 now includes rudimentry shading support (no more then mentioned in my previous post - but at least the configuration options are present)
Tilps
Kwon-Tom Obsessive
Puzzles: 4230
Best Total: 20m 22s
Posted - 2008.02.25 11:56:00
Beta 28 - can now solve #18 in less then a billion years.  Still got plenty of progress to go yet though.

Beta 29 - ~16 minutes on my (fast) machine - but its still resorting to brute force to finish it off.  I haven't added any more cell shading based logic yet though, I think that is definitely going to be a big win.
Last edited by Tilps - 2008.02.25 14:45:42
Naivoj
Kwon-Tom Addict
Puzzles: 314
Best Total: 33m 50s
Posted - 2008.02.29 01:57:32
I solved user beast #18 using LoopDeLoop Beta30 and it required 10 hours 42 mins of CPU time on a X86 Family 6 Intel 2.2 Mhz processor. So Tilps, your fast machine is about 40 times faster. Note that I only allocate LoopDeLoop to one of the 2 processors on my machine, because our solver can only use one processor.
Tilps
Kwon-Tom Obsessive
Puzzles: 4230
Best Total: 20m 22s
Posted - 2008.02.29 02:09:30
My machine only uses one processor.

What you are actually seeing is that beta 30 is Much slower.

The reason it is much slower is because the solver works in 3 phases.

First phase is using the simple localized solver on full power.

Second phase is using the simple localized solver on full power with nested guess turned on.

Third phase is using the full recursive solver on the final state.

Between beta 27 and beta 30 I made a change to the nested guess code.  Which made it far more aggressive, and it now considers Many more nested guess combinations (Most of which are a waste of time, but some of which Might be more useful than without the extra aggressiveness).

The net result is that for #18 - the second phase used to run in about 10minutes, and find just enough extra details to make the third phase significantly faster.  But now the second phase takes hours to run, and still doesn't complete the puzzle.
In fact I think that the second phase probably doesn't belong in the full solve anymore, since I have made so many improvements to the first phase it hardly finds anything in the second phase, so the third phase probably isn't being sped up anywhere near as much as it used to.
That doesn't escape the fact that the second phase (which can be useful for generating puzzles at lower difficulty levels with more 'interest') is far too aggressive now, and needs a much better heuristic for choosing pairs for consideration.
Naivoj
Kwon-Tom Addict
Puzzles: 314
Best Total: 33m 50s
Posted - 2008.03.01 08:10:09
I have a B29 version that have been running/solving #18 for almost 23 hours, which I am about to cancel to try again with B32. You first said that B29 solved it ~16 minutes on you fast machine, but you also said that nested guess code changes between beta 27 and beta 30 had slow down phase 2 from minutes to hours. Is B32 suppose to solve it in minutes?
Tilps
Kwon-Tom Obsessive
Puzzles: 4230
Best Total: 20m 22s
Posted - 2008.03.01 11:13:27
I think i meant between beta 29 and beta 30.  And hours was handwavy for I waited a good while and gave up.

Beta 32 I haven't tested.
Beta 33 (unreleased) rated it twice in 27minutes - so a little over half that for the full solve rating it did first.
If you haven't turned off visual solver - it will take forever - the timings I am giving is for the rating thread which runs in the background when you load the puzzle.
You can tell it has solved the puzzle when just above the top left of the puzzle says F - Depth:somenumber - Rating....  That message will be replaced with a different one as soon as the second rating code is processed (which depending on your settings will be a short or long time).

If visual solver is off - and you click the solve button - the entire application should stop responding and you should see nothing to indicate progress - and that should only change when the puzzle is solved - which could be 20minutes, could be longer.

Oh, and if you limit loopdeloop to a single cpu, you are actually giving your solver the advantage.  That is because LoopDeLoop can only use a single thread to solve a puzzle, but if you load a puzzle and then click solve - there are two threads which are both trying to solve the puzzle, one thread 'rating' the puzzle in the background and a second thread (which is the main UI thread if visual solve is turned off) solving the puzzle for display.
Last edited by Tilps - 2008.03.01 11:17:13
Naivoj
Kwon-Tom Addict
Puzzles: 314
Best Total: 33m 50s
Posted - 2008.03.01 14:32:01
Btw I never did any such tests with visual solver on. The B32 I launched a couple hours ago did solved it, but I don't know when since the CPU activity continue even after it solves. In part I suppose to maintain the timer, what else is the program doing?

Currently the CPU TIME (task manager) is at 5 hours 47 minutes, since the timer is at 17 minutes (and still counting) can I assume that it was solved in 5H30M = 5H47M - 17 mins?

About stopping the timer and any CPU activity once a puzzle is solved?

I will re-do a test with both processors assigned to LoopDeLoop, once you release B33.
Tilps
Kwon-Tom Obsessive
Puzzles: 4230
Best Total: 20m 22s
Posted - 2008.03.02 00:13:25
5 and a half hours - divided by ~2 because of the fact that the rating thread is sharing the cpu with the solver thread.

The timer would have started counting from the moment you loaded the puzzle, but because the solver thread hogs the main UI thread and timers use the UI thread - its probably only counted the time that the solver thread wasn't running.

As for stopping the rating thread - I'm not so sure - its kind of a feature to have it keep going in the background.

For reference my 'fast' computer the rating thread (which is what I use to time) is getting a single cpu on a Q6600 quad core 2.4 ghz core 2 architecture chip (fed by some decently fast ram).

Beta 33 adds color shading trials, which actually increases the number of trials performed by the solver - but may provide a potent increase in solving ability during the second phase leading to an overal decrease in time.

If you want to time based on leaving the program running and using the CPU time, don't click solve - just open the puzzle.  But first change your settings to remove all entries from the 'rating types to show'.  That way the only rating it will perform is the full solve to validate that the puzzle actually has a single solution.
Additionally this way you don't need to change it from a single cpu to dual cpu mode.  The only downside is that when its done you wont be able to visually inspect that the solution is correct, you'll just have to trust me .

Hrmm, thinking - now that I support shading trials, I should consider making the Full Recursive solver use them instead of edge trials, since so long as do trials near places already filled first, its at least as effective as edge trials, and has a significantly smaller maximum depth.

(Tried that, doesn't seem to have improved anything much - although the time without phase 2 (as described before) is about the same now - I think it was slower before.)
Last edited by Tilps - 2008.03.02 02:25:41
Tilps
Kwon-Tom Obsessive
Puzzles: 4230
Best Total: 20m 22s
Posted - 2008.03.02 03:36:57
Beta 33 is up - but don't bother testing it.

I realised I had introduced a bug during development which meant that phase 2 was  actually doing nothing (which explains why I didn't see any difference in times by turning it off) - Beta 33 is shipped with phase 2 on by default, and my testing shows that phase 2 makes things MUCH slower than without having phase 2 at all.

I'll turn phase 2 off in the next release (for the full solver, not as an option for the generator) unless I can come up with a far superior heuristic for choosing the trials which it uses.
Jankonyex
Kwon-Tom Obsessive
Puzzles: 3723
Best Total: 9m 35s
Posted - 2008.03.02 04:41:59
Quote:
Originally Posted by tilps
Beta ... it


Last edited by Jankonyex - 2008.03.02 04:42:36
Tilps
Kwon-Tom Obsessive
Puzzles: 4230
Best Total: 20m 22s
Posted - 2008.03.02 10:16:23
Thanks for the bug report, one of the new solving features I added in beta 33 is broken, I just have to work out how... (turning off cell shading allows things to work again, although the end user can't do that...)

Fixed in beta 34 (also turned off 'phase 2' as part of the default full solver.)
Last edited by Tilps - 2008.03.02 10:43:12
Jankonyex
Kwon-Tom Obsessive
Puzzles: 3723
Best Total: 9m 35s
Posted - 2008.03.02 13:14:11
Actions -> Undo and Redo are not allowed
fill in some lines or crosses
Ctrl + Z (Undo) is not work

Actions -> Undo is allowed, Redo is not allowed
Ctrl + Z (Undo) is work, then undo it till it meets the starting point
Ctrl + Y (Redo) is not work

Actions -> Redo is allowed, Undo is not allowed
Ctrl + Y (Redo) is work, then redo a few
Ctrl + Z (Undo) is not work

Actions -> Undo and Redo are allowed
Ctrl + Z (Undo) is work
Ctrl + Y (Redo) is work
Last edited by Jankonyex - 2008.03.02 22:50:11
Page 1 of 212>

Forum Index