Jump to content

  • Log In with Google      Sign In   
  • Create Account


Crossword generator


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 codeman_nz   Members   -  Reputation: 229

Like
0Likes
Like

Posted 13 December 2012 - 08:30 PM

Hi everyone,

I want to create a crossword generator which also minimizes the number of blank squares.

So it would take a list of words and place them where the number of blank squares was 40 or less.

But I have no idea how to go about this. Any ideas?

Sponsor:

#2 Khatharr   Crossbones+   -  Reputation: 2821

Like
0Likes
Like

Posted 13 December 2012 - 10:21 PM

First acquire a computer.

(IOW - what have you done so far)

Edited by Khatharr, 14 December 2012 - 01:44 AM.

void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.

#3 bluepig.man   Members   -  Reputation: 388

Like
0Likes
Like

Posted 13 December 2012 - 10:25 PM

First,you can think about what things you need,and then put them down on paper.

Edited by bluepig.man, 13 December 2012 - 10:25 PM.


#4 Riphath   Members   -  Reputation: 151

Like
0Likes
Like

Posted 14 December 2012 - 01:02 AM

I can think of a number of ways to make a crossword generator, but I'm not sure about that second qualification. Here's an article which talks about making a crossword puzzle, and it links to one written in C, which has the source if you want to look at it (if you can't read C, I only spent a short time looking so I'm positive there's something else out on the net, you'll just have to look).

But getting the least amount of blank spaces is a tough one for me. I know there's a way to do it, I just can't think of it right now. Sorry, but I hope that helps.

#5 Riphath   Members   -  Reputation: 151

Like
0Likes
Like

Posted 14 December 2012 - 01:30 AM

I should clarify, by blank spaces you mean the unused squares and you want the words to intersect as often as possible and use the space in the most efficient way, right? Because the only way I can think to do that would be brute-force, and that generator written in C does just that. But brute-force is probably not what you want, because that could take a very very long time. The article I linked you to even touches on that a little, but he doesn't mention how he solved it.

The best advice I could give you would be to try and find as many examples and bits of source code of crossword puzzle generators as you can find and look at how other people did it. I think this is one of those deceptively difficult problems, so you might want to find something else to try if you don't think you're up for the challenge. Otherwise, I wish you the best of luck!

#6 Poigahn   Crossbones+   -  Reputation: 516

Like
0Likes
Like

Posted 14 December 2012 - 05:11 AM

Years ago I wrote a word search puzzle generator in GW-Basic ( Did I say Many Years Ago ). Both a Crossword puzzle and word search are simular so Here is what I did, This May Help you. Let me know if it does....
First - You are going to need a large list of words with a set of clues. Example :
Apple
Clue 1 = Edible Fruit
Clue 2 = Grows on Trees
Clue 3 = Forbidden in the Garden of Edan
Get the idea.
Here I would create a stand alone program to enter and store this information, I would also include a small list of catagories attached to each word since most crosswords are theme based.
Next generate a 2 dimentional array to hold each letter of each word. (13,13) is a common size
Have the program start filling in the array. Then search for words that cross fill in the array. searching through each word to makesure it fits. I would use a number in the next subscript to indicate a noletter tile.
This would be a hefty challenge from scratch. Good Luck.

Your Brain contains the Best Program Ever Written : Manage Your Data Wisely !!





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS