4 Replies Latest reply on Aug 14, 2006 7:40 AM by Newsgroup_User

    Random letter grid - avoiding accidental words.

    Level 7
      I'm making a word-search game. While I have no problem positionning the
      words, the problem is that all letters NOT used by words are chosen
      randomly. This means that sometimes, just by chance, other words are
      accidentally spelled out in the puzzle. This can be frustrating to the
      player, as they may see a word and wonder why it won't highlight. (There is
      a list the player can look at that shows all the words that are in the
      puzzle, but not everybody will look at that.) Does anybody know an easy way
      to check the rest of the puzzle against a dictionary and make sure that
      there aren't any other words in it? Say, have it only check the
      horizontals, since that's what people are mostly likely to see by accident,
      and only check for words with 4-5 letters. (None of the target words are
      shorter than 4 letters, and the odds of a 6+ letter word appearing by
      accident are pretty slim.) In most cases, words which appear by accident
      have 1 or 2 letters which are not random. I'm already avoiding a small list
      of words (mostly swear words), but I'd like to have it be more
      comprehensive. It's either this or I'm stuck with non-random puzzles.


        • 1. Re: Random letter grid - avoiding accidental words.
          Level 7
          Just curious as to why you need to randomly generate the unused letters? Are
          you going to be generating multiple puzzles based on the same set of words?

          Sorry I can't offer a solution, but I would think that checking a huge list
          of words they way you currently are would take exponentially more time than
          it does with a relatively small list of swear words.


          • 2. Re: Random letter grid - avoiding accidental words.
            Level 7
            > Just curious as to why you need to randomly generate the unused letters?
            Are
            > you going to be generating multiple puzzles based on the same set of
            words?

            Yeah, there's a large pool of words to choose from. (180 total) The
            program takes 30 of them and arranges them on a 20x15 grid. That part
            already works. Problem is what to do with the remaining letters. I also
            have a system where I can forbid certain letters. For example, one word on
            the list is "Jellyfish". Now, all it takes is an "IT" randomly appearing at
            the end of that to make a swear word. So what I do is have the word listed
            in all-caps, as "JELLYFISH", with a lower case "it" after it, guaranteeing
            that the two letters that appear after the end of the word will be anything
            but 'I' and 'T'. Again, that already works. But I've had complaints from
            people (really just one person so far, but he claims it will annoy other
            people, so I'm doing this to appease his fears) that some other words
            appear, which may not be swears like the above example, but are still words,
            and not being able to select them is a frustrating distraction. In almost
            every case, the words that are accidentally generated involve no more than 2
            unused letters. "JELLYFISH" could just as easily have a "op" at the end of
            it. Now I don't think it's really that much of a problem, but if there's
            easy way to scan through and make sure that doesn't happen, I'd like to try.
            Again, it only matters with horizontals, because the eye isn't drawn to
            vertical and diagonal words the same way.

            > Sorry I can't offer a solution, but I would think that checking a huge
            list
            > of words they way you currently are would take exponentially more time
            than
            > it does with a relatively small list of swear words.

            That's what I'm thinking, and the other solution is to just NOT have the
            puzzles be random at all, but I put so much work into my beautiful random
            puzzle generator, it would be an awful shame to get rid of it...


            • 3. Re: Random letter grid - avoiding accidental words.
              Chunick Level 3
              Darrel,

              Don't get caught up in one person's opinion. While it may seem reasonable at first, let me assure you it is not. Here are the reasons why:

              1. Over the years I've done many word search puzzles and I've found countless words in them which are not part of the list. You cannot avoid that. Heck, 'a' is a word by strict definition.
              2. Check other word searches online or in books, newspapers, etc. and if you look hard enough you'll find words not in the list.
              3. What you may not realize is a word may, in actual fact, be a word. I also play Scrabble so my vocabulary may be better than someone elses'.
              4. There are english word lists on the net which contain approx. 125,000 words. Imagine trying to iterate through your 20x15 grid trying to match groups of letters to a word list of 125,000 just to make sure you don't have any other possible words in your grid that are not in your word list?.... that would be prohibitively slow.
              5. If your list is not being used or is ignored then make it more prominent... how do you find words in a word search otherwise?... that's sort of the whole point of a word search, I've always thought.. "Let's see, what words am I going to search for in this word search?... ah, there we go; the word list....well, the first word is 'pizza'... hmmmm..."

              In short, I think this person who's opinion you are concerned with needs to be educated. He obviously has a different opinion about word searches which hasn't been well thought out. The worst thing you can do is try to accomodate those poorly formed opinions. Educate.
              • 4. Re: Random letter grid - avoiding accidental words.
                Level 7
                I pretty much agree with you on all points. Only thing I'm concerned about
                is this:

                > 5. If your list is not being used or is ignored then make it more
                prominent...
                > how do you find words in a word search otherwise?... that's sort of the
                whole
                > point of a word search, I've always thought.. "Let's see, what words am I
                going
                > to search for in this word search?... ah, there we go; the word
                list....well,
                > the first word is 'pizza'... hmmmm..."

                Problem is, this program is made to run on a touch-screen kiosk, so I need
                to devote as much space to the actual playing field as possible to account
                for the innaccuracy that naturally results from using a touch-screen. If I
                broke off a chunk in order to make the word-list visible all the time, it
                would make the letters too small to be easily manipulable by finger.
                However, there is a prominant button right in the middle at the bottom of
                the screen marked "WORD LIST". If somebody chooses to ignore that, it's
                their perogative. Failing that, there's a "HINT" button which will randomly
                highlight the first or last letter of one of the words you haven't found.

                One partial fix that has helped a little bit is that I made it so that all
                of the randomly placed letters which are not part of words are consonants,
                not vowels. So words can only be formed where they cross over vowels in
                other words. Other than getting rid of the random factor altogether, I
                can't think of anything else I can reasonably do.