Re: crossword project works
- From: Randy Howard <randyhoward@xxxxxxxxxxxxxxxxx>
- Date: Tue, 29 Jan 2008 13:22:13 GMT
On Tue, 29 Jan 2008 07:01:42 -0600, Malcolm McLean wrote
(in article <QqSdnU-3v8Q2vgLanZ2dnUVZ8gOdnZ2d@xxxxxx>):
"Randy Howard" <randyhoward@xxxxxxxxxxxxxxxxx> wrote in message
That's an inherent snag with simulated annealing. I needed about a million
It takes a really long time to run with your recommended iteration
count, mainly because of the I/O to the console on each pass, even on
an unloaded 2GHz dual proc system.
to regenerate the Times crossword from its clue list.
My only point there was that a -shutup flag to skip all the I/O would
make it run a lot faster, especially in slow terminal emulators, but
probably in all cases.
It seems to handle duplicate clues.It knocks out duplicate words in the raw files , the idea being you can pass
it a novel or something.
The simulated annealing code takes 1024 iterations simply to decide the
Passing an iteration count of 100, generated output for 1125
iterations, but I didn't investigate further.
Passing an iteration count of 1000, generated output for 2525
iterations.
temperature regime. I should maybe make clear that you can't expect anything
worthwhile from short regimes.
I figured it had some minimum value that made sense, I just didn't work
out why the delta was different for the two cases.
If you pick small values for height and width (say 4), you just get aYour regime is so short that it never even gets a short word into first
black image and blank clue lists.
place in the list for the first clue. That can be fixed, however.
Deciding on a way to determine minimum valid hxw and warning on
attempts to use something that doesn't fit might be a nice feature.
Then I gave it a clue file by concatenating the times and biochemistryThat's exactly the sort of testing you tend not to do yourself. Thanks a
clues files then adding in a very few lines up top with some improperly
formed clues (they had one or more extra '/' chars in the clue portion
of the line). It generating a bunch lines looking like this:
lot. This can be fixed of course
This is exactly the sort of testing that I always do, (and a lot more
of it) to try and break the code before I drop it in somebody else's
lap. If you don't try and break your own code, somebody else will, and
quite often way down the road when it is painful to fix. It could be
really expensive, representing a lost customer, a lawsuit, or even
physical harm (think control software for things a lot more dangerous
than crossword puzzles). Doing it even on the toy problems is good
practice.
This is especially true when parsing file formats, with command line
arguments and tunable parameters, etc. Assume the user is evil, and
arm yourself :)
--
Randy Howard (2reply remove FOOBAR)
"The power of accurate observation is called cynicism by those
who have not got it." - George Bernard Shaw
.
- Follow-Ups:
- Re: crossword project works
- From: Malcolm McLean
- Re: crossword project works
- References:
- crossword project works
- From: Malcolm McLean
- Re: crossword project works
- From: Malcolm McLean
- Re: crossword project works
- From: Randy Howard
- Re: crossword project works
- From: Malcolm McLean
- crossword project works
- Prev by Date: Re: crossword project works
- Next by Date: Re: crossword project works
- Previous by thread: Re: crossword project works
- Next by thread: Re: crossword project works
- Index(es):
Relevant Pages
|