Hacking Scrabble (part 1)
blog.zephod.com
blog.zephod.com
http://en.wikipedia.org/wiki/Official_Tournament_and_Club_Wo...
Here's the TWL 2 letter word list:
[Edit: Turns out you can get kinda close: https://gist.github.com/1474006
This is really quickly scratched together (and there may be bugs), but there don't appear to be that many valid words left completely out when using this strategy against an american dictionary of 3k words. I'll bang on it more later, or someone else feel free to do better]
[Edit: After seeing @msluyter's comment, I adjusted to look for only the American 2-letter words. Ended up with much better results. This list of words (and possibly a subset of them that I'm not checking for yet):
'MELINE', 'ESOP', 'HEMAD', 'SHERE', 'WER', 'UNENAMORED', 'MYOHEMATIN', 'REHONOR', 'HEMATOSIN', 'ANEMATOSIS', 'TORET', 'HEMATID'
Covers all but these valid words: 'AA', 'OE', 'ZA', 'QI', 'UH', 'AW', 'AY', 'BY', 'XU'
]It's similar to Scrabble ... but it has no playing-area boundaries. I'm curious what the best way to represent this type of game-board data in a database would be and was hoping somebody smarter than me could help make me smarter.
Center is 0,0 - Square to the right is 0,1, etc.
Then you store xoffset, yoffest, and tile value in a database as squares are filled in.
By the time that representation is your Biggest Problem, you'll be able to afford someone to do something more clever.
With very few exceptions, all of these words will contain at least one vowel. This suggests that we can (for the most part) compress the data from: (1) a list of 24 lists of words, to (2) a list of 6 sets of 2 lists of words.
So now "a" looks like this: bdefhjklmnptyz -a- abdeghilmnrstwxy
Now you can apply the same mnemonic trick to each of these word lists as the author does in the article, but you wind up only having to memorize 12 lists instead of 24, plus a slight overhead for non-vowel words (there are 4).
This can perhaps be improved further by removing redundancy somehow (though maybe not, as the redundant structure might be easiest to check mentally).
For "a", there's a list where "a" is the first letter, and a list where "a" is the second. What I wrote out above is an attempt to show the structure. The letters on the left are possible prefixes for "a", the letters on the right are possible suffixes. Then I stuck "-a-" itself in the middle because that seems like a good visualization.
World-championship-caliber Scrabble, Brian Sheppard, Artificial Intelligence, 134(1–2):241–275, 2002. http://www.sciencedirect.com/science/article/pii/S0004370201...
There's more to it than you might think. In particular, I was initially surprised about how much of the game is about rack management. Although I know this won't be a surprise to people who've played Scrabble seriously.
I think you should remove all the words you know first, as this will make it much easier to remember. After that if you want to use the mnemonic approach, then if that works for you then great.
Although, I learned most of the weird ones by just playing against a computer which used them a lot. Eventually you remember them all. Incidentally, this way you actually learn a couple interesting new words. Three-toed sloth anyone?
aa = lava
ab = your abs
ad = tv ads
ae = scottish "one"
ag = agricultural
ah = ah that feels good
ai = a sloth
al = a tree
am = i am happy
an = an apple
ar = arrr i'm a pirate
as = as you were
at = where you at
aw = aww that's cute
ax = the weapon
ay = ay caramba
than it is to memorize "abdeghilmnrstwxy".
return definitions.get(candidate) != null;
vs foreach c in definitions(candidate.charAt(0)) {
if c == candidate.charAt(1)) return true;
}
return val;
That leaves aside the general usefulness of knowing the definitions of words.But if you can only memorize two words, go for "za" and "qi" - they come in really handy to get rid of a q or z. (za is an absurd short form of pizza, and qi is Chinese life energy, same as chi.)
I also recommend the handy words qat (the stimulant leaf) and waqf (an Islamic charitable donation). After you're challenged unsuccessfully on waqf, you can get away with anything :-)
Here is a massive list of them: http://www.poslarchive.com/math/scrabble/anamonics-twl2.html
I was hoping that it would be useful as a study tool for people who are more visually inclined - I wouldn't have considered using mnemonics originally.
Instead of having 25 prefix having suffixes, you have 20 suffixes having prefixes.
The prefix technique has an average of 4.96 suffixes per prefix, and the suffix one has 6.2 prefixes on average for each suffix.
Maybe this would be easier to deal with?
def uniqueletters(s): return set(c for c in s)
def intersect(word, charlist): return len(uniqueletters(word).intersection(charlist))
max(wordlist, key=(lambda w: intersect(w, charlist))
should replace a good portion of the create_mnemonic function. But now I'm just showing off. Just letting you know that Python is much cooler than you know.
Haskell, however, could probably do this in a few lines.
My beef with Scrabble is that it really isn't a word game, so much as an exercise in memorizing arbitrary strings of symbols. It's unfortunate, because it doesn't really encourage people to develop their vocabulary, as in "learning new words and their meanings", which is generally useful. Rather, it encourages people to learn what arbitrary combinations are legal in a given word list.
Ad absurdum - at one point, the world Scrabble champion was a fellow who didn't actually speak English.
As for 'learning new words and their meanings', clearly Scrabble isn't that game. But to be fair that isn't its stated aim, either. If you know any good examples I'd love to play them.
He also has a couple of funny anecdotes about words that aren't allowed - like "picowatt", which rather offended our collective sensibilities as electrical engineers.
You're quite right that Scrabble is not about definitions, per se. But Scrabble does describe itself as a "word game", and it really isn't - it's more of a memorization with a bit of math kind of game.
Awesome project @zephod!
On the other hand, crossword puzzles are single-player games that use natural language wordplay to create a challenge. Some AI work has been done in this field, which can use a Web search engine (like Google) to try and determine the answer to each clue based on the clue (as well as any candidate words/letters already filled in). The hard part is understanding the clue. Look to systems like IBM's Watson to see how those kinds of problems can be solved.
"Solution" in a single player game, like a crossword puzzle, is solved in exactly one way: when all the rows and columns are filled with legal words (usually -- unless the author rigged it to allow clues to have multiple solutions, like the election day crossword in the NYT in 1996). A "solution" in a two-player game is when, no matter what move you make, your opponent knows perfect play. For example, checkers is solved: http://en.wikipedia.org/wiki/Chinook_(draughts_player)
I guess it's kind of like chess: it's almost impossible to beat a computer, so it's effectively solved. Except when they play each other :)
Ad absurdum - at one point, the world Scrabble champion was a fellow who didn't actually speak English.
That's not too surprising unless he played in English. Scrabble has editions for many languages.Unlike with Chinese, it is not impossible to make a Thai scrabble, but I doubt there is one, given the size of its alphabet (http://en.wikipedia.org/wiki/Thai_alphabet)
As a result of the game, I've learned tons of words whose meanings are completely unknown to me (mbaqanga, eolipile, aboideau) and tons of words that have enhanced my vocabulary (prexy, glaire, oomiak).
Make the list too large, and you open the game up precisely to the this sort of critique -- "it's all about learning arbitrary words like AA or ZEK." Personally, I'm happy with the latter, as it makes the game deep and rewarding (I actually enjoy looking up words like "zek.") But (competitive) Scrabble is its own world that needn't appeal to everyone.
If the arbitrariness of the Scrabble tournament word list bothers you, you might try house rules with your friends that limit words to those that are universally accepted. This is what I do when I play with my mom. I just know that I can't play QI or UNAU and play a less competitive, friendlier game.
The trouble is nailing it down. You can't expect people to remember the dictionary definition word-for-word, but then how close is "close enough", and who decided? OTOH, if you just require people to use the word in a sentence, even ruling out variants like "I want to play the word "quux" next", all a player would have to do would be to remember that a word is, e.g. a noun, and say "I saw a xyzzy on the way to work yesterday."