Question: The [ ] is an improvement over the naive approach, but it can still be significantly improved. For example, suppose that the first guess was

 The [ ] is an improvement over the naive approach, butit can still be significantly improved. For example, suppose that the first

The [ ] is an improvement over the naive approach, but it can still be significantly improved. For example, suppose that the first guess was , and that the word had no in it. In this case, you'd get back the pattern , which seems to provide no useful information. However, the fact that we don't see an in the pattern means the word has no . For the example above, that means that we know that the only possible words are | ), because the other words all have an in them. If we were to count up the letters in these words, we'd get {a=1,c=1,d=1,g=1,1=3,0=4,y=1}. The final guesser you'll write is , where PAGA stands for "Pattern And Guesses Aware". This guesser should take into account the pattern (like your previous guesser), and should also take into account guesses which do not appear in the pattern, e.g. the fact that contains no . [Q Task: Implement the methods in I , including any helper methods. Do not add any additonal instance variables apart from the ones that we have provided; this will cause some integration tests to fail. You'll know you're done when you pass all the tests in | and Warning: Another implication of taking guesses into account can be seen in the pattern . This pattern does not match , because all the 's have been revealed

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!