Quantum feedback on selected words with matching characters

Since in quantum mode the generateDict might return two words with at least one shared character (as we chose a word from the set with shared characters if there is no word without a shared character) our getFeedback method should probably be able to handle such a case.

The project description has two statements that might apply in this case:
image
and
image

E. g. The both words chosen by generateDict are "hotel" and "hotel" was guessed. The first statement would imply a feedback of 5xCORRECT. If the second statement is the one applying in this case, 5xQUANTUMCORRECT should be returned.

Or can we just assume in getFeedback, that if there is a word2 provided, there are no shared characters (and the above situation is undefined behaviour)?

1 Like

If the generateDict function is given a pointer to choose a second word, you have to uniformly at random choose both words such that they fulfill all restrictions. Especially, the two words should not share any characters.

Where does it say that we choose words that share characters if we can not find two words with a disjoint set of characters?

Since the project description says that the words must not share any characters the behavior for shared characters does not matter.

Best,
Tim

2 Likes

I was referring to this footnote:
image

That simply means that if you picked a first word a and can’t find a suitable second word b you should try another first word and then for that word find a suitable second word b (and if that fails … try again with another first word, and so on and so forth).

The case that such a combination is not possible (i.e. any two distinct words in the dictionary provided share at least one letter) is undefined behavior as confirmed in this answer to a related question I asked:

4 Likes