len value cards word
1 1 0 0
2 2 16 2 za
3 3 28 3 zax
4 4 44 4 zizz
5 5 47 5 jazzy
6 6 55 6 zaqqum
7 7 58 7 buzzwig
8 8 61 8 quizzify
9 9 65 9 unquizzed
10 10 69 9 quizzingly
11 11 69 10 buzzerphone
12 12 67 10 wickerworker
13 13 68 10 quinqueverbal
14 14 60 10 fingerprinting
The maximum-scoring words:
word len value cards
buzzerphone 11 69 10
crackerjack 11 69 10
quirquincho 11 69 10
quizzingly 10 69 9
(Here's hoping you draw lots of Z's.) So words from 2-14 letters are possible, using 2-10 cards. This boxplot show the distribution of words values by word length:
Finally, there is a hand with 109 points (not including any bonuses): "zizz" (44), "zizz" (44), and "zer" (21). The base word list used was /usr/share/dict/words...don't ask me what a "zer" is.
# What's the Quiddler point distribution of English words? What's the maximum-value word?
ReplyDelete# Enquiring minds want to know!
# Here's the key function
wordvalue <- function( word, letterpoints, maxlen, firstcall=TRUE, forceshort=FALSE, fmode=1 )
# returns a list with max point value of word, and its corresponding tile length
# setting 'forceshort' means to go for smallest number of cards, regardless of points
# (default is most points, regardless of cards)
# fmode=1, return value to user; fmode=2, return number of cards
{
# print( paste( "Entering:", word, " maxlen =", maxlen ) )
cards <- v <- v1 <- v2 <- 0
if( nchar( word ) ) {
if( !maxlen )
return( list( value=-999, cards=0 ) ) # no more letters allowed; bail
v <- letterpoints[ letterpoints$letter==substr( word, 1, 1 ), "points" ]
rest <- wordvalue( substr( word, 2, nchar( word ) ), letterpoints, maxlen-1, firstcall=FALSE )
v <- v + rest$value
cards <- rest$cards + 1
# print( paste( "v1 =", v, " cards1=", cards ) )
if( nchar( word ) > 1 ) {
a <- letterpoints[ letterpoints$letter==substr( word, 1, 2 ), ]
if( nrow( a ) ) { # how do I test for no match above?
v2 <- a[ 1, "points" ]
rest <- wordvalue( substr( word, 3, nchar( word ) ), letterpoints, maxlen-1, firstcall=FALSE )
v2 <- v2 + rest$value
cards2 <- rest$cards + 1
# print( paste( "v2 =", v2, "cards2=", cards2 ) )
if( ( v2 >= v ) || ( forceshort && ( cards2 < cards ) ) ) {
v <- v2
cards <- cards2
}
}
}
}
# print( paste( "return", list( value=v, cards=cards ) ) )
if( firstcall ) {
if( fmode==1 ) {
return( max( v, 0 ) ) # if -999, e.g., force to zero
} else {
return( cards )
}
}
return( list( value=v, cards=cards ) )
}