The two doors riddle

To clarify, in puzzles of these sorts, a “knight” is someone who always tells the truth, and a “knave” is someone who always lies.

Of course, you also need some way to enforce Boolean answers, because if you ask a knave “What would the other guard say if I asked you which way to go?”, or the like, he could, according to his nature, answer “Cucumber”, because that is not, in fact, what the other guard would say, and hence a lie.

But there are techniques that avoid that problem, too.