This commit is contained in:
Peter Norvig
2017-10-23 15:35:14 -07:00
parent e10d66a390
commit 05052ee088

View File

@@ -13335,18 +13335,16 @@
"source": [ "source": [
"# Conclusion: How Did We Do?\n", "# Conclusion: How Did We Do?\n",
"\n", "\n",
"We can break that into three questions:\n", "We can break that into four questions:\n",
" \n", " \n",
"- **Is the code easy to follow?** \n", "1. **Is the code easy to follow?** \n",
" - I'm biased, but I think this code is easy to understand, test, and modify.\n", " - I'm biased, but I think this code is easy to understand, test, and modify.\n",
"- **Does the strategy score well?** \n", "2. **Does the strategy score well?** \n",
" - Yes: the mean and median are both well over 350, which is enough for [the elite club](https://www.facebook.com/WWF350Club) of high scorers. \n", " - Yes: the mean and median are both well over 350, which is enough for [the elite club](https://www.facebook.com/WWF350Club) of high scorers. \n",
" - No: this is not quite world-champion caliber.\n", " - No: this is not quite world-champion caliber.\n",
"- **Is the code fast enough?** \n", "3. **Is the code fast enough?** \n",
" - It takes less than 3 seconds to play a complete game for both players; that's fast enough for me. If desired, the code could be made about 100 times faster, by using multiprocessing, by caching more information, by not building explicit lists for intermediate results (although those intermediate results make the code easier to test), by using PyPy or Cython, or by porting to another language.\n", " - It takes less than 3 seconds to play a complete game for both players; that's fast enough for me. If desired, the code could be made about 100 times faster, by using multiprocessing, by caching more information, by not building explicit lists for intermediate results (although those intermediate results make the code easier to test), by using PyPy or Cython, or by porting to another language.\n",
"\n", "4. **What's left to do?**\n",
"We can also ask: What's left to do?\n",
"\n",
" - We could give players the option of trading in tiles.\n", " - We could give players the option of trading in tiles.\n",
" - We could explore better strategies. A better strategy might:\n", " - We could explore better strategies. A better strategy might:\n",
" - Plan ahead to use high-scoring letters only with bonuses.\n", " - Plan ahead to use high-scoring letters only with bonuses.\n",