Add files via upload
This commit is contained in:
@@ -594,7 +594,7 @@
|
||||
"Here's my idea:\n",
|
||||
"\n",
|
||||
"1. Try every pangram letterset, but do some precomputation to make `game_score` much faster:\n",
|
||||
" - Compute the `letterset` and `word_score` for each word in the word list.\n",
|
||||
" - Compute the `letterset` and `word_score` for each word in the word list. \n",
|
||||
" - Make a table of `{letterset: total_points}` giving the total points of all words with a given letterset. \n",
|
||||
" - I call this a **points table**.\n",
|
||||
" - These calculations are independent of the honeycomb, so are done once, not 55,902 times. \n",
|
||||
@@ -721,7 +721,7 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"The letterset `'AGLM'` gets 8 points (7 for AMALGAM and 1 for GLAM). `'ACEIORT'` gets 31 points (17 for CACCIATORE and 14 for EROTICA). `'AEGM'` gets 1 for GAME and `'AEGLMPX'` gets 15 for MEGAPLEX. The other 59 lettersets have no words, no points.\n",
|
||||
"The letterset `'AGLM'` gets 8 points (7 for AMALGAM and 1 for GLAM). `'ACEIORT'` gets 31 points (17 for CACCIATORE and 14 for EROTICA). `'AEGM'` gets 1 for GAME and `'AEGLMPX'` gets 15 for MEGAPLEX. \n",
|
||||
"\n",
|
||||
"Let's make sure the new `top_honeycomb2` function works as well as the old one:"
|
||||
]
|
||||
@@ -945,11 +945,11 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"This says that `top_honeycomb3` examined 8,084 honeycombs; an almost 7-fold improvement over the 55,902 examined by `top_honeycomb2`.\n",
|
||||
"`top_honeycomb3` examined 8,084 honeycombs; an almost 7-fold reduction from the 55,902 examined by `top_honeycomb2`.\n",
|
||||
"\n",
|
||||
"# 9: Fancy Report\n",
|
||||
"\n",
|
||||
"I'd like to see the actual words that each honeycomb can make, and I'm curious about how the words are divided up by letterset. Here's a function to provide such a report. I remembered that there is a `fill` function in Python (it is in the `textwrap` module) but this report turned out to be a lot more complicated than I anticipated. I guess it is difficult to create a practical extraction and reporting tool. I feel you, [Larry Wall](http://www.wall.org/~larry/)."
|
||||
"I'd like to see the actual words that each honeycomb can make, and I'm curious about how the words are divided up by letterset. Here's a function to provide such a report. This report turned out to be a lot more complicated than I anticipated. I guess it is difficult to create a practical extraction and reporting tool. I feel you, [Larry Wall](http://www.wall.org/~larry/)."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -1352,7 +1352,7 @@
|
||||
" 537 words 1,179 words \n",
|
||||
" <br>50 pangrams 86 pangrams\n",
|
||||
" <br>3,898 points 8,681 points\n",
|
||||
" <br> RETAINING ENTERTAINERS\n",
|
||||
" <br> RETAINING ENTERTAINERS\n",
|
||||
"</center>"
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user