> (...code here...)
>
> Thus, in this example, both A and B are knaves.
Under the premise that knaves always lie, if A is a knave, then their statement "I am a knave" must have been a lie, thus this solution cannot be correct.
> (...code here...)
>
> Thus, in this example, both A and B are knaves.
Under the premise that knaves always lie, if A is a knave, then their statement "I am a knave" must have been a lie, thus this solution cannot be correct.
Still, makes me think that this could have been stated clearly instead of relying on the reader interpreting it in that manner.
Like the famous Two Guardians riddle: one always lies, the other always tells the truth, you get one question, etc. There's a translation that starts "You have a wire and a NOT gate..." in which the puzzle becomes blindingly obvious. (Details omitted so as not to spoil the puzzle for anyone.)
Once you have developed a facility with the special jargon of logic puzzles and know Prolog, I've found that, while some puzzles become boring ( https://swish.swi-prolog.org/p/Boring%20Sudoku.swinb ), many are still interesting as an art form, much like le demo scene you could imaging puzzle scene and not be too far off metaphorically.