[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Jotto puzzle: first five guesses



On Thu, Jul 22, 1999 at 11:35:12AM -0700, Matthew Wickline wrote:
> a month or so ago, someone showed me how to play jotto. It's
> sort of a word-game version of Mastermind (for those of you
> familiar with Mastermind).

Woo, jotto!!

> As a first example, I wanted to share the game with someone
> in another state, and it wasn't very fun over phone or
> e-mail, so I put up a cgi version so he could see how fun it
> is.
> 
> If you're interested, (it ain't pretty, or well-documented)
>     http://wickline.org/saog/
> This is only the one-way version. One day when I've ammased
> a whole pile of juicy tuits, I'll go for a head-to-head
> version. Initially, it had a too-small dictionary of five
> letter words (about 3,000). The few folks playing complained
> that too many of their guesses were not found in the
> dictionary. So, (more fun with perl) I ramped it up to over
> 10,000. Now, folks complain that too many of the target
> words are things they've never heard of. I've gotton some
> stats on how common each of the words are according to
> altavista (more fun with perl) and will one day be
> incorporating a user-config to allow folks to say that words
> which are of such-and-such rarity should not be allowable as
> the target word.

I have a multi-player telnet version of Jotto.  It works pretty well, but I
haven't done any development on it recently.  It is not permanently
running, but I could display it if people are interested.


My jotto dictionary contains about 4000 words.  Note that I play jotto with
the rule that words are not allowed to have repeated letters; all five
letters in a word must be unique.  I also took some time to remove words
that were too rare or slangy.


I'm surprised by the 10,000 number.  That's a _lot_ of five letter words.
The ENABLE word list, which contains some very rare words, has fewer than
9,000 five letter words.  Where did you come up with over 10,000 of them?


> If you play a bit of jotto, you may see that one decent
> initial strategy is to guess a series of words which don't
> share any words in common. This brings us to the subject of
> this message. Given a dictionary of about 10,000 five letter
> words, how can one efficiently determine all sets (if any
> exist) of five words which use up twenty five unique letters
> of the alphabet.

The farthest I've ever gone in this direction is to make a short list by
hand of five-letter words containing only one vowel.  :)

Now I'll obviously have to put some effort into an actual Perl solution,
because of the inspiration of your challenge!


> Let's assume that you've first pre-processed that dictionary
> to reduce any anagrams and to remove any words which contain
> more than one vowel (a, e, i, o, or u... not counting y as a
> vowel here) to get shorter file of just under 1600
> non-anagramatic words which don't use up multiple vowels. We
> can't remove words which use up a 'u' without a 'q' because
> there was one word with a 'q' but no 'u' in the dictionary.

Hmm, I don't have that word in my list.  What word is it?


If you're going to leave in all the 'u' no 'q' words, then you should leave
in all the two vowel words to go with words like 'crypt' and 'lynch'.


> How can you efficiently find all sets of five words from
> that list which use up 25 unique letters of the alphabet.
> 
> What's the fastest code with unlimited RAM?
> 
> What's the fastest code with minimal RAM use (probably lots
> of disk use)?
> 
> Any takers?

Expect to hear more from me as I get going on this!


> My approach was very brute force and ran in the background
> for quite a while (many hours). First build a list of all
> pairs of words which don't duplicate any letters. Call this
> the "pairs list", with each entry being one such pair. Now,
> find all pairs of pairs which don't duplicate letters. Call
> this the "quads list". Finally, find all combinations of a
> quad with an entry from the inial list of 1600 words which
> don't duplicate any letters.

Could you put your dictionary on the web and post the URL?  Otherwise we
won't be able to have a basis for comparison of our own code.

Ronald

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe