Merge pull request #117 from rahimnathwani/patch-1

Correct wording
This commit is contained in:
Peter Norvig
2022-05-03 16:27:33 -07:00
committed by GitHub

View File

@@ -15,7 +15,7 @@
"\n",
"I see people brag that they won in two guesses. Does this really attest to their acumen? Or is it analagous to [Little Jack Horner](https://en.wikipedia.org/wiki/Little_Jack_Horner), who pulled out a plum and said *What a good boy am I!*, oblivious to the fact that his prosperity had more to do with the plethora of plums than with his prowess. \n",
"\n",
"What is your chance of winning on your second guess? It depends on the reply you get from the first guess, and on how many other possible words have the same reply. For example, if your guess is `HELLO`, and the reply is `.GGGG` (a miss followed by 4 green squares), then the only possible target word is `CELLO`. Less obviously, if the reply to `HELLO` is `.YGY.` (a miss, a yellow, a green, and another miss), then the only possible target word is `ALLEY`. So in either case, you are guaranteed to win on your second guess (assuming you can recognize the sole possible word). On the other hand, if the reply is `..GY.` then the target word might be either `ALLAY` or `LILAC`, so you'd have a 50% chance of winning on the second guess. So we have two questions:\n",
"What is your chance of winning on your second guess? It depends on the reply you get from the first guess, and on how many other possible words have the same reply. For example, if your guess is `HELLO`, and the reply is `.GGGG` (a miss followed by 4 green squares), then the only possible target word is `CELLO`. Less obviously, if the reply to `HELLO` is `.YGY.` (a miss, a yellow, a green, another yellow, and another miss), then the only possible target word is `ALLEY`. So in either case, you are guaranteed to win on your second guess (assuming you can recognize the sole possible word). On the other hand, if the reply is `..GY.` then the target word might be either `ALLAY` or `LILAC`, so you'd have a 50% chance of winning on the second guess. So we have two questions:\n",
"- Q: What first guess maximizes the number of **guaranteed wins** on the second guess?\n",
"<br>A: `BRUTE` and `CHANT` guarantee you 40 wins (out of 2,315).\n",
"- Q: What first guess maximizes the number of **expected wins** on the second guess?\n",