Re: crossword project works
- From: "Malcolm McLean" <regniztar@xxxxxxxxxxxxxx>
- Date: Tue, 29 Jan 2008 13:01:42 -0000
"Randy Howard" <randyhoward@xxxxxxxxxxxxxxxxx> wrote in message
That's an inherent snag with simulated annealing. I needed about a million to regenerate the Times crossword from its clue list.
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.
It knocks out duplicate words in the raw files , the idea being you can pass it a novel or something.
It seems to handle duplicate clues.
The simulated annealing code takes 1024 iterations simply to decide the temperature regime. I should maybe make clear that you can't expect anything worthwhile from short regimes.
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.
Your regime is so short that it never even gets a short word into first place in the list for the first clue. That can be fixed, however.
If you pick small values for height and width (say 4), you just get a
black image and blank clue lists.
That's exactly the sort of testing you tend not to do yourself. Thanks a lot. This can be fixed of course.
Then I gave it a clue file by concatenating the times and biochemistry
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:
I'm off work at present so I don't have gcc. I'm using the MS freebie compiler that warns on every prinf() as unsafe because it doesn't take a string length parameter. So that's helpful. Unfortunately I cannot then see if my changes have made the problems go away.
gcc -Wall -W -O2 -ansi -pedantic -c -o anneal.o anneal.c
gcc -Wall -W -O2 -ansi -pedantic -c -o cluefile.o cluefile.c
Thanks anyway for looking at it.
--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm
.
- Follow-Ups:
- Re: crossword project works
- From: Randy Howard
- 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
- crossword project works
- Prev by Date: Re: Decision Tables
- 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
|