[Most Recent Entries]
Below are the 9 most recent journal entries recorded in
|Thursday, January 9th, 2003|
Well, not really using this journal for much, but I'll go ahead an post here. I had an article published in The Perl Review
. It was about how I used Jotto programming to teach myself Perl. The article is in Issue 7
of the magazine.
|Tuesday, December 3rd, 2002|
I should try posting here more. And I should update my Jotto Web page
. Anyway, here's a new variant, thanks to an idea by magid
The secret word can be anywhere from 3 to 8 letters, but you don't know how many letters. The game is the same otherwise. I've programmed it in Perl, and I've been playing it against the computer lately. I need to come up with easier versions of the dictionaries, like I have for the 5-letter words, so I don't end up getting words like yobbery
|Saturday, August 3rd, 2002|
Jotto by Email
There's still more that I want to do with it, but Jotto by Email appears to be working. Feel free to try it out and let me know what you think. Just send an email to firstname.lastname@example.org to play.
|Saturday, May 4th, 2002|
Jotto Version 0.3
Now has the 'status' command, which gives you all of your guesses and scores so far.
|Friday, May 3rd, 2002|
Jotto version 0.2
Jotto version 0.2 is up on jmac.org, reachable via ssh with username jotto and password playjotto.
Version 0.1 added the 'info' and 'quit' commands and indented the scores so are easier to see.
Version 0.2 adds the choice of dictionary.
Future plans for features:
- 'status' command to let you see all of your guesses and scores for the current game
- Being able to play an actual game, where the computer is guessing your word
- optional login, so that it will track your scores and maybe start recording your games, so that it can learn to play against you better (in the far future)
- a version using the curses library
|Sunday, April 28th, 2002|
Well, I've got a program where the computer guesses your word. It does it by the brute force method, just randomly guessing one of the words that it could possibly be. I think I may try to improve it in the future, where it tries to make some intelligent guesses. Mostly, this should keep it from occasionally taking really long to guess a word. I doubt it will improve on the random method for most games.
I will save this for later though, as well as making my dictionary larger and better (it currently has 5800 some words, a few hundred of which might be suspect and probably need direct checking. I will also merge it with the other word list to get it to around 12,000). Right now, I want to work on getting a version up on the web. Now probably the nicest user interface could be made with Java or something like that, but I don't want to do it in Java. First of all, I want it to be a nice fast thing. Text-based, no loading of applets. Second, I don't want to deal with all the various implementations of Java that exist in the different browsers. Third, I'm doing this to learn Perl, not Java.
So, that being said, I've come up with two main ideas. One is to get a mindterm window up on a page (yes, that will involve Java, but not anything I have to develop) and just set up a special account that just plays Jotto. I'm not sure if that will fly with the host of the machine, though, as far as security. The second main idea is to have it be just a plain text page generated by a Perl program. The player enters his word in a text box, and then submits it, and the next page gets popped up. However, the downside of this is that I have to figure out a way of passing the state of the game along each time and do it without giving the word away. The obvious answer is to encrypt the data somehow, but that seems a little kludgy, but maybe I'm wrong. Is there some better way to do this? Anyone got ideas?
|Thursday, April 25th, 2002|
Update of the Jotto program
So, the program now checks to make sure that the guesses are in its dictionary.
I've also got a utility to add words to the word list, making sure it doesn't add duplicates. I got a huge word list from the British National Corpus, which mattlistener
showed me. It's a compilation of a bunch of words, sorted by frequency. I got Jay to install the Net::Dict Perl module so that I could use the dict.org server to help pare down the list of 5-letter words to those that are legal words, since the BNC list includes a bunch of 5-letter strings that are not words, like "aaaaa" and stuff, things that sometimes show up places. Anyway, I pared the list down and added it to my list. My word list had something like 3600, and now it has 5800. I'm not satisfied that all of those are necessarily valid words, though. The dict.org server returns things that aren't legal Scrabble words, since it pulls things from the Hitchcock Bible Names dictionary and the U.S. Gazzetteer (place names) and other sources. So I had it filter out some of those sources, but I'm sure there are other sources I have missed, that I need to add to my filter. So I'm going to go through the added words by hand, looking them up individually, until I find some more sources that I want to exclude.
The other issue with the dict.org server is that it doesn't do things like plurals, so it thinks that "bores" isn't a word, for example. dictionary.com, which appears to use the dict.org server, can handle alternate forms fine, so either there's another server out there, or dictionary.com does its own stuff for that. I'll have to do some more investigation, so that I don't accidentally leave out words.
My goal is to have a complete 5-letter dictionary. I suppose the next task will be to flag the more common words, so that the program can ask you if you want a more common word or if you'll allow it to pick from its whole list. It needs to have the whole list, though, so that it can handle any guess from someone, since it checks to make sure that each guess is a valid word.
So, filtering the dictionary is my current task, and then I'll move on to having the program guess my word. I have a feeling I won't start that for a while, though, since the current task will probably take me quite some time.
|Tuesday, April 16th, 2002|
Okay, I'll make the first post here.
So I got my Perl Jotto program working last night. It picks a random word from its list of words (/usr/dict/words pared down to the five-letter words) and has you guess it. Next thing to add to it is checking of guesses to make sure that they are legal words.
Once that's done, the next big step is to make a program capable of guessing my word. The basic algorithm is just to have it figure out which words are possible and pick a random word from that list. mattlistener
talked about some potentially better algorithms earlier, either in his journal or in an email to me, so I think it's time to dig those up and see what I can do with that. I may also have it try different things depending on whether it is playing a human or computer opponent. And maybe something where it tries to pick up patterns in words that its opponent uses (which would make necessary stored memory and identification of opponent). And eventually maybe some sort of method where different Jotto programs could play against each other, in order to evaluate algorithms.
Later, I may post the code for my scoring algorithm, which took me a while to get because of a misunderstanding of how Perl's $# works.