Thursday, 28th March 2024
Puzzles Solved Yesterday: 124
Forum Index
 
Couple of questions
Dan
Kwon-Tom Fan
Puzzles: 38
Best Total: 48m 20s
Posted - 2005.11.28 22:14:06
These questions are probably more for the owner of this site, but...

1) Is there a simple way to download all or at least many of the older puzzles all at once for use offline? (Any text based format would be fine, I could convert it to what I could use.)

2) What is the algorithm used for developing & grading the puzzles?


I am fairly new to this site (about 2 weeks), and got hooked on these types of puzzles from the October edition of Games magazine. (Which featured Looney Labs... I'm one of their Mad Lab Rabbits.) From there I checked out the infamous Japan site (www.puzzle.jp/index.html.en) and have now downloaded and solved most all of the puzzles there. (I downloaded and use a modified version of their applet to work the puzzles offline.) I found this site while looking for more of the puzzles to solve.

Thanks for any info you can give. Cool site.

P.S.> Another question... Is there any way to check out your own or others times on puzzles older then 7 days?
foilman
Kwon-Tom Admin
Puzzles: 3383
Best Total: 24m 6s
Posted - 2005.11.29 01:07:35
Hi Dan,

Good questions!

1) At the moment there's no easy way to do that, though it wouldn't be that difficult for me to knock together some kind of "export all puzzles in text format" option. If you're ok with converting any old format, I could look into sending you a straight dump of all the puzzles to date...

2) The algorithm... hehe well it's a huge mess of C++ code, originally written to solve the puzzles but then I figured I could use it to create them too. It's got all my favourite "patterns" programmed in, so it solves them pretty much the same way that I do. I gave each of the patterns a rank, so simple things (corners etc) get lower scores and complex stuff gets higher scores. The difficulty is then dependent on a combination of average and maximum ranking - if that makes any sense?

Where it does have trouble is in situations where we humans just look at it and go "oh it's obvious the line has to go that way" but there's no simple rule to reflect that. It's also not so good at spotting odd numbers of lines going into large areas. That's why sometimes it ranks a puzzle as very hard yet we all solve it quite quickly...

Who knows, maybe I'll improve it to handle those situations too, but most tinkering I do results in puzzles that can't be solved so I've not touched the code for a while!!!

On your PS question about puzzles older than 7 days... no, there's no way to see the times; to keep the database small & efficient I only store a week's worth of times, then they drop off forever.

You might also be interested to know that I'm currently generating some bigger-than-big puzzles specifically for off-line use, as soon as I can figure out a simple way for people to print them off (displaying them like the daily puzzles & hitting print results in more than one page...)
astrokath
Kwon-Tom Obsessive
Puzzles: 3258
Best Total: 13m 42s
Posted - 2005.12.01 15:21:24
Quote:
Originally Posted by foilman

2) The algorithm... hehe well it's a huge mess of C++ code, originally written to solve the puzzles but then I figured I could use it to create them too. It's got all my favourite "patterns" programmed in, so it solves them pretty much the same way that I do. I gave each of the patterns a rank, so simple things (corners etc) get lower scores and complex stuff gets higher scores. The difficulty is then dependent on a combination of average and maximum ranking - if that makes any sense?

Where it does have trouble is in situations where we humans just look at it and go "oh it's obvious the line has to go that way" but there's no simple rule to reflect that. It's also not so good at spotting odd numbers of lines going into large areas. That's why sometimes it ranks a puzzle as very hard yet we all solve it quite quickly...

Interesting to know how it works.

It seems like the code is generating a few of the "oh, it's obvious" puzzles this week - either that or we're all just getting more expert at them! (Or maybe it just seems that way after the rather tricky ones last week and the week before.)  Anyway, it's nice to see so many people completing all 7 in under an hour this week - I remember being thrilled to bits the first time I broke that barrier, and it's still my benchmark for a good weekly time.  My current goal is to get a clean sweep on the daily leaderboard, but the rest of you keep thwarting me!

As for the very big puzzles - I'd like to see them on-line, if possible, even if they don't print out well.  I'm not too bothered by scrolling the screen now and then. (Unless we're talking hundreds of boxes wide - how big are you making them?)
Last edited by astrokath - 2005.12.01 15:27:09
drnull
Kwon-Tom Obsessive
Puzzles: 1053
Best Total: 23m 25s
Posted - 2005.12.01 15:28:51
Quote:
Originally Posted by astrokath
My current goal is to get a clean sweep on the daily leaderboard, but the rest of you keep thwarting me!

Why you cocky little ...  oohh, stink, did that actually come out of my mouth? 

Agreed, though, things have seemed to get a bit easier after a rough few weeks there.  Or maybe we are just getting better?  Watch, I'll probably score a 20 minute on Friday with this much bad karma.

And while we're on the subject of "improvements", is there any browser independent way to make the javascript recognize a right click, and we could map that to an "x" so we don't have to double click?  I'm gonna wear out my mouse.  I guess I could just try to exercise my brain a bit more and just not use x's, but, well, I'm not to that point yet.
Last edited by drnull - 2005.12.01 15:31:53
astrokath
Kwon-Tom Obsessive
Puzzles: 3258
Best Total: 13m 42s
Posted - 2005.12.01 15:37:48
Quote:
Originally Posted by drnull

Why you cocky little ...  oohh, stink, did that actually come out of my mouth? 


'fraid so.

Still, it's not like it's likely to happen.  I know Foilman has done it in the past (and probably could again), but the site has a lot more quick players now and none of us will find it easy!

Quote:
Originally Posted by drnull

Agreed, though, things have seemed to get a bit easier after a rough few weeks there.  Or maybe we are just getting better?  Watch, I'll probably score a 20 minute on Friday with this much bad karma.

Friday puzzles are the toughest, I think.  I quite often get tangled up or waste too much time with bad guesses with those ones, and end up in the lower half of the top ten for the day (or out of it completely).

Still, I see I'm not the only one clicking my way towards RSI!  (I generally ALWAYS use the x option.)
Last edited by astrokath - 2005.12.01 15:39:00
drnull
Kwon-Tom Obsessive
Puzzles: 1053
Best Total: 23m 25s
Posted - 2005.12.01 15:45:42
Quote:
Originally Posted by astrokath
Still, it's not like it's likely to happen.  I know Foilman has done it in the past (and probably could again), but the site has a lot more quick players now and none of us will find it easy!

Aww, come on, you're only one day off.  I bet you get it fairly soon.  I was just tickled when my name showed up on the "Best Ever Champions Total" (even if I did only contribute one day's time, and I only stayed on the list for a few days...)  Amazing that time is below 30 minutes.  When I started doing these puzzles on this site, a Friday could push me past 30 minutes (and the weekenders could last hours).

Quote:
Originally Posted by astrokath
Friday puzzles are the toughest, I think.  I quite often get tangled up or waste too much time with bad guesses with those ones, and end up in the lower half of the top ten for the day (or out of it completely).

I actually have more trouble with the weekenders.  I really don't understand how they are done so quickly.  I can complete one, and feel pretty good about it, and still end up at twice the top time.  Maybe I am wasting time x'ing too much when it's just intuitive.

<goes to practice a puzzle while trying to refrain from x'ing around every single zero...>
foilman
Kwon-Tom Admin
Puzzles: 3383
Best Total: 24m 6s
Posted - 2005.12.01 15:50:37
Quote:
Originally Posted by astrokath
As for the very big puzzles - I'd like to see them on-line, if possible, even if they don't print out well.  I'm not too bothered by scrolling the screen now and then. (Unless we're talking hundreds of boxes wide - how big are you making them?)

They're bigger than the current big ones, but not hundreds of boxes wide!! The trouble with displaying them in Javascript (which is how they're done now) is some browsers go really slow once you get beyond a certain size. Which is why (unless I completely rewrite it in Flash or something) they'll have to be print-and-play only when I do them.

As for things getting easier, I'm sure it's a combination of us getting better and it choosing some on the easier side of the scale (eg I say "hard" is rank 50-90 and today's was 51...)
Dan
Kwon-Tom Fan
Puzzles: 38
Best Total: 48m 20s
Posted - 2005.12.02 17:01:07
Quote:
Originally Posted by foilman

1) At the moment there's no easy way to do that, though it wouldn't be that difficult for me to knock together some kind of "export all puzzles in text format" option. If you're ok with converting any old format, I could look into sending you a straight dump of all the puzzles to date...

That sounds fine by me. I am practically an expert on text reformatting. However, I wouldn't want you to go through the trouble just for me. Would it be useful to others as well?

Quote:
Originally Posted by foilman

2) The algorithm... hehe well it's a huge mess of C++ code, originally written to solve the puzzles but then I figured I could use it to create them too. It's got all my favourite "patterns" programmed in, so it solves them pretty much the same way that I do. I gave each of the patterns a rank, so simple things (corners etc) get lower scores and complex stuff gets higher scores. The difficulty is then dependent on a combination of average and maximum ranking - if that makes any sense?

So does it start by generating a random fence in the area, and then populate it with numbers in selected spots to give it it's difficulty? Or does it generate the fence and the numbers at the same time? Or am I off on both accounts? I have always been curious about how to create puzzles, and for these ones, I don't know how you determine best places to put the numbers. Also, would it ever generate a puzzle that had more then one solution?

Quote:
Originally Posted by foilman

You might also be interested to know that I'm currently generating some bigger-than-big puzzles specifically for off-line use, as soon as I can figure out a simple way for people to print them off (displaying them like the daily puzzles & hitting print results in more than one page...)

Perhaps if you supply a downloadable version of the puzzle tool (perhaps in Java) we could download the tool (once) and then download each of the bigger-then-big puzzles and still work them on the computer, but using the off-line tool. Perhaps it could also be used to print the puzzles for paper-&-pencil solving. Perhaps this would be a reason others might also like to be able to download the archived puzzles. To solve them offline using the tool.

Alternately, you could look into generating the puzzles using either post-script which could be sent directly to the printer, or into pdf format. (Look into GhostScript if you want a free utility for converting post-script to PDF.)

By the way, I also believe that the puzzles have been getting quite a bit easier lately. Even though I have only been here 2-3 weeks, I can see quite a difference. It is not necessarily a bad thing. It's nice to have a refreshing break occasionally.
Last edited by Dan - 2005.12.02 17:07:43
foilman
Kwon-Tom Admin
Puzzles: 3383
Best Total: 24m 6s
Posted - 2005.12.02 18:35:07
Quote:
Originally Posted by dan
I am practically an expert on text reformatting. However, I wouldn't want you to go through the trouble just for me. Would it be useful to others as well?

It wouldn't actually be a lot of trouble, all the puzzles are stored in a database on the web server, so I just have to do "select * from puzzletable"... I'll email you a selection & see what you think.

Quote:
Originally Posted by dan
So does it start by generating a random fence in the area, and then populate it with numbers in selected spots to give it it's difficulty? Or does it generate the fence and the numbers at the same time? Or am I off on both accounts? I have always been curious about how to create puzzles, and for these ones, I don't know how you determine best places to put the numbers. Also, would it ever generate a puzzle that had more then one solution?

It draws all the lines on first, then goes about putting numbers on until it's solvable. I only actually find out after it has created it what the difficulty is, so I can't say "give me an easy one"! The actual placement of the numbers is totally random, except for each number placed it also does either a "rotation" or "mirror" so the final puzzle ends up looking nice & not just a jumbled mess.

It's not possible for it to come up with a puzzle with more than one solution, as that wouldn't be considered "solvable" by my solver, so it would continue adding more numbers...

Quote:
Originally Posted by dan
Perhaps if you supply a downloadable version of the puzzle tool (perhaps in Java) we could download the tool (once) and then download each of the bigger-then-big puzzles and still work them on the computer, but using the off-line tool. Perhaps it could also be used to print the puzzles for paper-&-pencil solving. Perhaps this would be a reason others might also like to be able to download the archived puzzles. To solve them offline using the tool.

I might give that a go sometime...

Quote:
Originally Posted by dan
Alternately, you could look into generating the puzzles using either post-script which could be sent directly to the printer, or into pdf format. (Look into GhostScript if you want a free utility for converting post-script to PDF.)

I've actually already got that working so I do have some in PDF format, but as yet haven't found a simple way of stuffing them in the puzzle database. I might end up just dropping the files onto the web server and letting people download them directly.
drnull
Kwon-Tom Obsessive
Puzzles: 1053
Best Total: 23m 25s
Posted - 2005.12.02 20:25:40
Quote:
Originally Posted by dan
Also, would it ever generate a puzzle that had more then one solution?

Just thought I'd chime in a note here.  This is against the rules according to my understanding of this puzzle (slither-link, kwon-tom loop, number line, etc).  You can actually use that to your advantage, though you probably won't find it useful all that often.

Let's try this example.

You have a diagonal series of the numbers 121


Imagine (yeah, it's lame) that there aren't any other numbers to influence how you are picking the path.  There would be, but work with me here. 

You could start at the upper left and decide that the 1 should go out to the top left, creating a corner for the 2.  That creates a 2-in-a-corner-with-a-1-diagonal-from-it pattern, so we know that the 1 is crossed off adjacent to the 2 as well.


The problem is, since there is no other information to tell us which path the line should take through the 2, this solution will NOT work.  Therefore, we know it's



My $.02  (keep the change)
Dan
Kwon-Tom Fan
Puzzles: 38
Best Total: 48m 20s
Posted - 2005.12.03 02:34:05
drnull,

I don't think I understand quite what you are getting at in your post.

Perhaps you misunderstood my question. For simplicity sake, lets say a 3x3 puzzle is generated containing only a single number. A "3" in the center of the board. There are 16 different solutions to that puzzle. My question is, would the puzzle generating software recognize the multiple soluutions and therefore reject the puzzle (or simply never make such a puzzle) or not.

While solving puzzles, I have occasionally rejected some of the trial marks I have made because they left an area on the board where two points could be connected by any one of multiple unique paths and still not violate anything. If I run across this situation again, I can try to capture it to better explain the situation.
astrokath
Kwon-Tom Obsessive
Puzzles: 3258
Best Total: 13m 42s
Posted - 2005.12.03 09:43:37
It's just another of those rules, and a good way of figuring out if you've gone wrong somewhere in the larger puzzles. There can be only one unique solution, so if you find yourself in a spot where you cannot possibly rule out one of two (or more) routes, you've done something wrong with the rest of the puzzle.   The small puzzle he gave is an example of this - with those numbers alone, there's more than one possible route, so the puzzle is broken - unless you add an extra number somewhere else to constrain which route is actually intended.
procrastinator
Kwon-Tom Obsessive
Puzzles: 1083
Best Total: 12m 56s
Posted - 2006.01.21 03:20:05
Quote:
Originally Posted by foilman

They're bigger than the current big ones, but not hundreds of boxes wide!! The trouble with displaying them in Javascript (which is how they're done now) is some browsers go really slow once you get beyond a certain size. Which is why (unless I completely rewrite it in Flash or something) they'll have to be print-and-play only when I do them.

Perhaps you could put them up in this format, so we can roll our own with the applet from that site? I pushed it up to 100x100 with no discernible slow-down, and I have a relic of a machine.

Forum Index