Re: crossword project works
- From: "Malcolm McLean" <regniztar@xxxxxxxxxxxxxx>
- Date: Tue, 29 Jan 2008 18:16:29 -0000
"Bartc" <bc@xxxxxxxxxx> wrote in message
"Malcolm McLean" <regniztar@xxxxxxxxxxxxxx> wrote in messageIt maintains a pad variable between 0 and 5, and a list of words. It then put the first word on the list that will fit into the across position, using the pad. It then goes down the list, finding the first word that will fit, which must be down. It then finds the next word which will fit, which could be down or across. It then finds the next word. If it can make it cross in two positions, which is now possible, it places it at that position. It continues until the list is exhausted.
I would have thought that made it considerably easier, to be supplied with a
grid. For one thing, you can immediately see the minimum and maximum word lengths, and know how many of each length are needed. I can't see why symmetry would hurt though.
Or does your algorithm work by fitting the words on an unbounded Scrabble-like board then fixing the edges of the crossword around the used
squares?
Then it scores its solution by counting blank squares and giving itself a penalty of one for every blank.
The list is then permuted by exchanging two elements, and the process run again. This is fed into a search strategy called simulated annealing. Basically we always accept a better solution, but initaly we also sometiems accept worse solutions, to prevent the search getting stuck.
The problem with the user-supplied grid idea is that you then need a big dictionary. When I was doing the biochemistry crossword, it was easy to think up some answers, like the names of the amino acids, but I was beginnning to run out of ideas after about fifty lines. A general crossword doesn't have this problem, but then the clues have to be cryptic, unless it is a really easy children's puzzle.
My idea is that teachers might use it for little fun exercises - I'd hate to see any real educational importance attached to it, but for end of term it could be just the thing. Or website designers might use the applet to add a bit of interest to their sites.
--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm
.
- References:
- crossword project works
- From: Malcolm McLean
- Re: crossword project works
- From: Malcolm McLean
- Re: crossword project works
- From: Bartc
- Re: crossword project works
- From: Malcolm McLean
- Re: crossword project works
- From: Bartc
- crossword project works
- Prev by Date: Re: crossword project works
- Next by Date: Preorder/Postorder Traversal of Multiway Search Tree (B-Tree)
- Previous by thread: Re: crossword project works
- Next by thread: Re: crossword project works
- Index(es):
Relevant Pages
|