So the heroes are crawling through a dungeon, or infiltrating the Evil Overlord's Supervillain Lair, or popping down to the shops for some milk or what have you, when they come upon a pair of doors, or a fork in the road, with each path guarded by a heavily-armed soldier (or animated statue, or whatever). They're somehow informed that one door leads to a truly inescapable Death Trap, while the other leads the way they're going, and they have to ask the guards which door is which. Usually the solution requires that Only Smart People May Pass, although some instances require that Only Idiots May Pass and can be overcome by Obfuscating Stupidity.
Sound familiar? This is the popular Knights and Knaves logic puzzle. The Trope Namer is a particular version by mathematician Raymond Smullyan, but the puzzle considerably predates him. Invariably the scenario used every time in the media is Smullyan's, to the point that the version is a Dead Horse Trope. If you're lucky, the puzzle will spring for a bit of originality and involve a third guard who alternates between telling the truth and lying (or worse, a "normal," who can do either or neither at will). Smullyan himself invented dozens of variations, and would probably be disappointed that it's just this one that ever gets cited. Also, it requires that the two guards are indeed a liar and a truth-teller. Some examples (such as Yu-Gi-Oh!) have it turn out that neither guard is to be trusted as far as you can throw them.
For the record, the most common solution to the above scenario is to ask one of the guards, "If I asked you if the door you're guarding leads to where I want to go, would you say 'yes'?" If the guard says "yes", then you go through his door; if he says "no," you go through the other guard's door. This is because his answer to this question doesn't depend on which guard he is. Say he says yes to the question. If he's telling the truth, then he would say that the door leads to where you're going, and thus, the door will lead to where you're going. If he's lying, then he'll have to lie about whether he'd say Yes to the question (which, in this case, he would not say yes if asked if the door led to where you're going, and would in fact say no) and, thus, is forced to give the correct answer to where the door goes. Of course, this requires that both guards know where you are going, and that neither of them considers "Your doom" a place. An interesting property of this solution, as opposed to the "other guard" solution, is that it even works if one guard is missing. Another interesting property, which is useful for some variants, is that you can change it to "... would you say 'no'?", and "no" will wind up meaning "Yes, this door is the correct one". (i.e. if you don't know which word is "yes" and which word is "no", just pick one, and it will effectively mean "yes")
The second most common solution is to ask one of the guards "Which door would the other guard say is the correct door?" They will both give the same answer; whichever door they indicate, that's the wrong door. If you're talking to the guard that tells the truth, he will (truthfully) indicate the door that the other guard would have steered you towards — which would be the wrong door, as the other guard always lies. But if you're talking to the guard that always lies, then he would still point to the wrong door, as while the other guard (the truth-teller) would have indicated the correct door, the guard you're speaking to is lying to you about what he would have said! So either way, the answer to your question will be the wrong door — and so, either way, you simply use the other door.
Note that if a character in these puzzles is said to always lie, then it is (probably) Not Hyperbole, unlike in real life. Real life "liars" are intending to make people trust them, and thus are perfectly willing to at least occasionally tell the truth. One of these guys, on the other hand, will be Lawful Stupid, Chaotic Stupid with regard to the habit of lying, and thus can be caught out as depicted in the picture, or by less violent means. However, note that one of the keys to this puzzle being a puzzle is that you have to get a piece of information out of these two guards, rather than just determine which one is lying, which is what prevents you from simply asking them what 2+2 is.note In addition, it is impossible to know who the liar is by asking him, as he would always lie about his being a liar. Some works can forget this, and make the hero look like something of an idiot for going for needless complexity instead of Cutting the Knot.
It should also be noted that no author (except those of logic puzzle books) ever includes a more complicated or different version of the puzzle. Smullyan created numerous permutations of his own puzzle, including one with islanders who answer only "Da" or "Bal" instead of "Yes" and "No," and the point is to figure out puzzles without necessarily knowing which means what in English. Another is set in Transylvania, where people can be either sane or insane (insane people believe untruths) and either a human or a vampire (humans say what they believe is true, vampires say what they believe is false). Most often writers can be excused for not including these more difficult ones, as they would be very difficult for the audience to understand. Not that we would mind.
Heroes who have neither the patience nor aptitude for logic puzzles generally just skip straight to the violence when confronted with this one. Of course, the puzzle was "meant" for people for whom a pair of armed guards are a formidable obstacle, rather than for your standard Action Hero (if the guards aren't monsters or supernatural/divine creatures far beyond any mortal's reach, of course). In video games, it can also be brute-forced by Save Scumming.
Not to be confused with Knight, Knave, and Squire.
The real question is, was the guy who explained the rules telling the truth or lying?
- Perplex City has a version with seven speakers, at least three of whom are knights and three of whom are knaves.
- A variation is made in Ghost in the Shell: Stand Alone Complex where the endlessly curious Tachikoma's steals the hardware for a sniping assistance device by using the statement as a logic bomb.
- Phi-Brain: Puzzle of God had a more complex variant. The main was set upon 7 Dwarves with 7 apples, color coded. Each would say something to help determine which Dwarves were Lying or telling the truth, and which apples (the goal) were "delicious" (the right ones). The Puzzle itself was flawed in that he was never told how many "delicious" apples there were.
- Subverted in Yu-Gi-Oh! During the Duelist Kingdom arc, the Meikyu Brothers confront Yugi and Jounouchi/Joey with this puzzle. Jounouchi thinks he's solved the riddle, seeing that he's heard it before, but Yugi correctly guesses that the brothers' description of the puzzle is in fact part of it, and that both the brothers are lying about the whole puzzle (they both say that one always lies and one always tells the truth, which is impossible because someone who always lies would be unable to give an honest description of the puzzle, and thus could never agree with someone who always tells the truth), and outwits them his own way. They're cheaters, anyway. Whenever a person asks his question and chooses a door, they always claim the opposite door is the right one. Yugi tricks them by making them think he's choosing one door via Exact Words, waiting for their answer, and revealing he chose the other one. Both doors lead to the exact same place anyway.
- Yuugai Shitei Doukyuusei: In one of the Volume 2 bonus chapters, Reika proposes a novel approach — jerk off the guard and ask them if it feels good or not.
- Played straight in the Sonic the Hedgehog (Archie Comics) In Your Face special; the Freedom Fighters are faced with a giant, two-headed dragon who offers this sort of riddle. Sally does the standard, "Ask one head what the other will say" answer, which works.
- Done in the first story arc of Grant Morrisson's Doom Patrol: the twin priests of Orqwith must be asked a question in order to destroy their invasive reality. One says, "I am an honest man and I do not know why there is something instead of nothing"; the other says, "I am a liar and I do not know why there is something instead of nothing." Rebis correctly reasons that the honest one would not be able to call himself a liar, so the one who does must be the liar - but this means the other part of the liar's conjunctive statement must be false in order to make the statement false overall. So the liar is the one who knows the answer to the final question.
- Bonus points for borrowing that literally from the abovementioned professor Smullyan.
- A Mathnet comic (from Square One TV) included in a tie-in magazine issue of 3-2-1 Contact involved this puzzle. Kate Monday and George Frankly had to find out which of two identical twins were stealing birds from pet stores. One revealed that he always told the truth and his brother always lied - leaving the two detectives to figure out who was the thief. This particular Knights and Knaves puzzle was a variation on the traditional format; no limit on questions allowed was specified. The solution given was to ask the brothers a trick question like "Are you a parrot?" It was reasoned that the brother who always lied would say "yes" and the always truthful brother would say "no".
- In one 1990s Superman comic, Mr Mxyzptlk, who had just discovered the exciting third-dimension concept of lying, did the three person version: three Mxys with switches in front of them. Two switches will electrocute Lex Luthor II, and two Mxys will lie about which one's safe. Superman correctly deduces Mxy #2 has the safe switch ... and Mxy #3 claims he's wrong and moves to pull his switch! Superspeed takes care of this flagrant cheating.
- Crabgrass: This comic, Miles comes up with this scenario for the Tabletop RPG he and Kevin are playing, but Kevin points out the flaw in the riddle that the guard who tells them the rules could very well be the liar, in which case he could be lying about the rules of the riddle. Miles has no comeback to this and is forced to dig through the game rule books to find out what to do in this situation.
- Parodied in The Darker Knight, where Riddler and Riddlercousin attempt to claim they have this dynamic going. Batcousin accuses them of both lying, and then they apologise and randomly die.
- A Future of Friendship, a History of Hate uses a variant in Episode 2 for the first challenge Twilight has to pass to save her friends from Ruinate. A two-headed sphinx does the usual "one head tells truth, the other lies/one path leads to safety, the other to doom" bit, but the variant comes in when she realizes the answer: she realizes that since both heads were in agreement on the rules, which the liar wouldn't be, they must both be liars, meaning both paths are dangerous, and the sphinx is actually hiding the safe third path.
- The Professor Layton fanfic Knights and Knaves references the puzzle in its summary as well as invoking it in the title. Flora, feeling like the unfavorite compared to Luke, enjoys the company of the friendly toymaker. As the story unfolds, it starts to become more apparent that he and Layton are taking on the roles of the Knight and the Knave, and she has to figure out which is which.
- The (Not-So) Truther uses a variation: Lila is akumatized into The Truther, who presents herself as somebody who forces others to tell the truth, but is actually compelling them to lie. She uses this to make Adrien falsely "confess" that he likes her, intending to force him into a relationship. Marinette counters this by getting Alya to ask him a series of questions with obvious, factual answers: what color the sky currently is, what the name of Alya's blog is, and what his father does for a living. Adrien's answers are so clearly false that The Truther's charade falls apart, exposing Lila's true nature as well.
- Twilight's Logic Puzzle Adventure centers around the twin towns of Utopia and Paradise. Unicorns from Utopia and Pegasi from Paradise are truthful, while unicorns from Paradise and Pegasi from Utopia lie; Twilight (and the reader) solve various puzzles based on these assumptions. An added complication stems from a group of 'faux-alicorns' who could be either unicorns or pegasi. And then earth ponies enter the mix ...
- During the escape-the-haunted-house challenge in Total Drama Legacy, this ends up being one of the puzzles the campers have to solve. Storm solves it by asking "Which door would the other guard say is the correct door?"
- Arcade — though this is a bit of an aversion, since the guards tell her flat-out which guard is the truth-teller and which is the liar. And then for some reason the heroine asks the liar which way to go.
- In Werner Herzog's The Enigma of Kaspar Hauser, Kaspar Hauser is asked this question by a doctor trying to test his intelligence. The doctor will accept only a complex answer, but Kaspar responds simply (and correctly, since the doctor did not include the proper constraints), "I would ask him if he is a tree-frog."
- Shows up in Labyrinth. It's played with, though, as Sarah falls down a trap door behind the door at the precise moment she announces herself triumphant. On the other hand, taking the wrong door is asserted to lead to certain death, so it's entirely possible that Sarah would have been home free had she not declared that the riddle was a piece of cake. The Labyrinth is a harsh mistress. There are also indications that the puzzle's conditions aren't quite what they're made out to be. The blue guard told Sarah the conditions: "One of us always lies, and one of us always tells the truth." If the conditions were valid, then that particular speaker was the truth-teller. If he was lying, then all bets were off. And this comes after both guards agree that Sarah may only ask one of them, when if one of them is always honest and the other always a liar, neither of them should agree on anything at any time. Unless of course the lying/truth-telling only comes into play when being asked questions about the way to go, not when explaining the rules. One interpretation of the scene is that the guards are just messing with Sarah and that none of them actually knows which door leads to the center of the labyrinth.
Red Guard: Wait a minute.. Is that right?
Blue Guard: I don't know. I've never understood it!
- Also, something bad happens every time someone says, "This is a piece of cake," in the Labyrinth.
- In Open Graves, the last step in the cursed board game is guessing which of two snakes' mouths to place your playing piece into, assisted in your choice by a Knights and Knaves question.
- A variant occurs in one of the Lone Wolf gamebooks. A performer brings out two children, masked so as to conceal their genders. One states "I'm a boy" and the other "I'm a girl." The performer confirms that they are indeed a boy and a girl, but at least one of them is lying, leaving Lone Wolf to determine the gender of each without asking any further questions. Of course, given the above information, if one of them is lying, the other must be as well, making this one as straightforward to solve as the classic version.
- As the trope description mentions, Raymond Smullyan popularized this trope with his many books full of this kind of puzzle, including but not limited to What is the Name of This Book?, The Lady or the Tiger?, and Alice in Puzzle-land. Alice in Puzzle-land in particular is noteworthy for having a conversation between Alice and the King of Hearts that lampshades/discusses how this sort of puzzle has become so well-known that some people assume that the most famous examples of it are the only possible variants of it; when the King begins to talk about knight and knave puzzles, Alice interrupts him to say that she already knows these puzzles, whereupon the King gets annoyed and retorts that there are countless possible puzzles about truthtellers and liars and that her knowing some of these puzzles doesn't necessarily mean that she'll also know the ones he wants to tell.
- Crops up in The Book of Lost Things, due to the fact that the main setting is deliberately based on the tropes of fairy tales. However, it's played with bridges rather than doors: two bridges over a harpie-infested ravine and each one guarded by heavily-armed trolls. Only one of the trolls knows which bridge is safe enough to cross, etc, etc. The bookworm protagonist answers the riddle correctly- making it one of the few circumstances in which he fares better than his friend the Woodsman prior to taking a level in badass.
- Played straight in Cecilia Dart-Thornton's Bitter Bynde trilogy, as a challenge to someone attempting to escape the realm of the faerie. The protagonist must determine which door leads her to freedom with a single question posed to the titular knight and knave (who, in this case, are trapped humans).
- A variation in one of the junior Clue books, where one of Professor Plum's inventions causes Mrs. Peacock to get cloned. The catch is that her clones are aware they're clones, violently homicidal (well, moreso than usual), and uncontrollable liars, but none of the other guests nor Mr. Boddy himself realize this until the last page. They keep asking "Which of you is the real Mrs. Peacock?", which only leads to the inevitable answer of "I am!" from all of the Peacocks present. The book asks the reader to supply the answer to find the real (presumably truth-telling) Mrs. Peacock—the solution being simply to ask a purely factual question such as "What is two plus two?" and presumably dispose of the clones who started spouting mathematical nonsense.
- In a brainteaser by puzzle writer Dr. Crypton, the protagonist is visiting a one acre desert island, seeking his way to the island's only tourist attraction, a tower. He comes to a crossroads, where four roads split off, and there are three natives there. The four possible tribes of natives: always tell the truth, always lie, can answer with truth or lies, or wait for someone else to say something and then say the same thing. And he can ask them only two questions. The answer is to ignore them completely, as a tall tower on a one acre desert island is impossible to miss.
- Spoofed in the Discworld novel Lords and Ladies. To pass the time on their trip to Lancre, Ponder Stibbons mentions this puzzle to Ridcully and Casanunda. Much to Ponder's annoyance, Casanunda insists that the "logical" solution is to wrestle a weapon from one of the guards and force him at swordpoint to show them which door leads to safety. And inform him that he is going in first, just in case he tries any funny business.
- In the backstory The Gone-Away World by Nick Harkaway, Mr. Soames is confronted by three anthropophagous witches who offer to give him directions using the standard Knights and Knaves setup. Being a logician, he takes them up on the offer. The whole thing is a trap, which is why Mr. Soames is dead in the main story.
- In The Haunting of Drearcliff Grange School, a teacher poses the puzzle to her class, but neglects to include the "only one question" restraint. The class's Gentle Giant says that she would find out which was the truth-teller by thumping both of them and asking "Who wants me to do that again?", and the rest of the students agree that this makes as much sense as the answer in the textbook.
- In Martin Gardner's Hexaflexagons and Other Mathematical Diversions, he gives the version where you are at a fork in the road with one native (who either lies or tells the truth), and want to find out which road leads to the village. As well as the traditional answer, he suggests you ask the yes-or-no question "Did you know they are serving free beer in the village?" and then just follow the road that the native sprints down.
- Hilda Tie-In Series: Hilda faces a riddle like this in Hilda and the Hidden People, with two water spirits as the liar and truth-teller respectively. She has to figure out which of two caves is the one the Elf Prime Minister resides in, with the other supposedly housing a flesh-eating troll, by asking the two water spirits only a single question.
- The short story How Kazir Won His Wife by Raymond Smullyan involves various more complicated variations on the puzzle, while the framing story is set on an island where the normal version has occurred.
- In The Man Who Counted, Beremiz is presented with an arguably more difficult variation. He is presented with five slaves, and he has to find out their respective eye colors (he can't see their eyes because they are covered by burqas). The black-eyed two always tell the truth, and the blue-eyed three always lie —he is allowed three questions, no more than one per slave. Beremiz asks the first one her eye colour, knowing her answer to be "My eyes are black" in advance, and he asks the second one for the first's Exact Wordsnote . She answers "She said her eyes are blue". Then he asks the third one for the eye colour of both of them. She says that the first's eyes are black, and that the second's are blue. Since Beremiz could confirm that the second slave had lied, he marked this one as truthful, and so he submitted his answer: the first and third slaves have black eyes, while the second, the fourth and the fifth's are blue.
- A variation turns up in Math Curse, a children's book by John Scieszka and Lane Smith about a kid who goes insane seeing the entire world as a math problem. The mother of the unnamed protagonist announces at dinner "What your father says is false," and his father replies with "What your mother says is true." The child cannot fathom how those statements can logically support each other and has a math-induced nightmare immediately after.
- Subverted in the Mini Series The 10th Kingdom. Two doors to safety or death are guarded by a talking frog who offers one question, but claims to always lie (which would make it unsolvable as a logic problem since the rules themselves are in doubt). By now the father of the protagonist Virginia has had it with this kind of puzzle.
Tony: All right, all right. Wait, wait! I have a question! What is the point in having a door that has a horrible death behind it? Huh? (picks up frog)
Frog: Get your hands off me!
Tony: What does that achieve?
Frog: What are you doing?
Tony: I mean, what is the purpose of your life? Just to be a pain?
Frog: Don't touch me there, only my girlfriend touches me there! (Tony throws the frog through one of the doors) WHOA! (Tony slams the door, there's a large explosion and fireball)
Wolf: I guess it's the other one.
- Doctor Who:
- The Doctor Who serial "Pyramids of Mars" features this as one of several puzzles the Doctor had to solve to enter the titular structure. This incident is an example of solution #2, asking the one guard about what the other guard would have said. Why an ancient Martian pyramid imprisoning a Sufficiently Advanced Alien was protected only by logic puzzles is unknown. The Doctor, being the clever bastard that he is, figures it out in about 15 seconds. According to the DVD production notes subtitles, Philip Hinchcliffe got it from Franz Kafka's The Castle, although this cannot be confirmed.
- There was a brain teaser in a Doctor Who annual about two captured soldiers (astronauts?) who were told that they could make one statement. If their statement was judged as true they would die by lethal injection, if their statement was judged as false they would die by hanging. They managed to make a single statement that meant the judge had to let them go. The answer? They make the statement "I will die by hanging." If they hang then that makes the statement true, which should mean they die by lethal injection, which would then make the statement false, which would mean they should die by hanging and so on.
- Harmonquest: The party runs into this puzzle played completely straight. Spencer barely has enough time to finish explaining the concept before Jeff blurts out the solution, obviously well acquainted with this trope.
- Law & Order: Criminal Intent: Goren sets this puzzle for his psychiatrist in "The Consoler". His version has a disguised angel guarding the doorway to Heaven, and a disguised demon guarding the doorway to Hell. The Angel tells the truth and the demon lies.
- Appears in The Legend of William Tell when Kalem is trying to teach Will to think about things. His companions, including The Smart Guy, have already gone through one of the doors, but they slam in his face and he has to logic his way through.
- Midsomer Murders: In "The Death of the Small Coppers", DS Winter, who hates riddles, is captured by the killer who places him in a Death Trap and offers to let him live if he can solve this puzzle in five minutes. Ironically, one of the suspects had offered to tell him the answer to this earlier in the episode.
- The Mole: The Belgian series' 4th season had a challenge that gave one of its 3 finalists the opportunity to learn with 100% certainty who the Mole was. They had to choose one of two rooms to enter and then ask the man inside that room a single yes-or-no question, but one of these two men would tell them the truth and the other man would lie and they wouldn't know which man was which. Gilles, the winner of that challenge, figured out the right question to ask — but since he was the Mole, it was done just for show.
- In the series NUMB3RS, the FBI catches a pair of criminals who stole a truck full of aid money. One says that the truck is gone while the other says the truck is still there. Charlie, a mathematician, is able to deduce that the scenario is identical to this one and uses the correct answer, ask what the other person is going to say. When the answer from both suspects is the same, that the truck is gone, they know it must still be there.
- Once Upon a Time in Wonderland: Alice solves a variant with only one guard, a knight who she quickly realizes has done nothing but lie to her. It can only answer yes or no questions, so she asks if one of the doors leads to the well, then picks the other one when it says yes.
- Discussed in the Canadian kids' show Radio Active, where the students are assigned the problem in class but the proper answer is never figured out.
- Is analysed as one of the puzzles on Dara O'Briain's show School Of Hard Sums with the catch that you can only ask one question. The answer given in the show is "Will the other person claim their door is the correct one?" which always results in a lie.
- Straight example in the math-and-logic Edutainment Show Square One TV, with the three-person variant. The alternating character, when asked who he was, said he was the knave, which neither the knight nor the knave would say. Then the knave claimed to be the alternator, which the hero had already identified, leaving the last person to be the knight. Of course, this is a little contrived, as both the Knave and the alternating character could claim to be the Knight, in which case you'd be stuffed, since all three would be claiming the same thing.
- An early (as in, from classic Greek times) version of this is the so-called "Epimenides Liar Paradox", in which Epimenides (a Cretan) claims that "all Cretans are liars". Discussed by Raymond Smullyan in What is the Name of This Book?, in which he points out that it in fact isn't a paradox, but is completely consistent with the assumptions that (1) Epimenides is lying and (2) at least one Cretan tells the truth (If Epimenides is lying about all Cretans being liars then it's possible for at least one Cretan, who needn't be Epimenides, to be able to tell the truth). This one also appears in Discworld, where the character who states that all Klatchians are liars, attempting to show his clever solution, promptly gets beaten up by the local Klatchians.
- In Rome, Italy, there is a church with a gargoyle on the outer wall near ground level. Legend says that if you insert your hand into the gargoyle's mouth, and while it is in there make a false statement, you will be unable to pull your hand out again. When Raymond Smullyan visited the gargoyle and stuck his hand in, the statement he made was "I will not be able to pull my hand back out."
- In a 2023 Popeye strip, Popeye and Olive Oyl encounter a pair of these. Olive's suggestion is that Popeye punch them both and see which one says it doesn't hurt. Instead, Popeye asks them both how they're doing. One has a litany of complaints, the other just says "I'm fine." Popeye chooses the first one's gate, explaining to Olive "Think about what the last few years were like, and tell me if ya'd believe anyone sayin' they is 'fine'."
- The Big Finish Doctor Who audio drama The Pyramid of Sutekh, a sequel to "Pyramids of Mars", above, also features the puzzle. Bernice Summerfield was not impressed, first saying "Oh, good! Robot mummies who've read Alice in Wonderland", then "Oh, please! Is there anyone who doesn't know this yet? As an archaeologist of repute, I'm insulted that I'm even expected to play along with this!" An outside force then blew a hole in the wall, saving her from having to deal with the "cliché of Horus". While the actual puzzle is avoided, one of the robots takes to following her around trying to understand things and help. At least, that's what it says. It turns out to be the lying guardian, something Benny only realises after she's become desperate enough to take its advice at face value. When she discovers she's done exactly the wrong thing, the robot tells her "I am ... not sorry."
- The fantasy parody series "Elvenquest" does this with two talking trees.
- Parodied in the first episode of John Finnemore's Souvenir Programme in this sketch.
- Referenced in one episode of The News Quiz, when Mile Jupp suggests there are two Theresa Mays: "One always lies, one always tells the truth. One guards the road to prosperity, the other to stagnation. And you can only ask one of them one question."
- Dungeons & Dragons, Module I3 Pharaoh. Inside the tomb of Amun-re the PCs can encounter an androshpinx who offers to play a Riddle Me This game with them. If they can answer one of his riddles he will answer a question from them about the tomb. Riddles he can ask include one of these puzzles. People who live on the west side of Bindon always tell the truth, people who live on the east side of Bindon always lie. However, people who live on one side of town can sometimes be found wandering around the other side. If you're in Bindon, how can you find out which side of town you're currently on by asking someone? Answer: ask a passerby "Do you live here?" If you're on the west side the answer will always be "yes", on the east side the answer will always be "no". Then just hope the person you ask isn't a visitor from out of town...
- Subverted in an Exalted adventure. The party discovers this puzzle in an ancient refuge for Solars, incredibly powerful near-demigods who were deposed centuries ago. The entire puzzle is, in fact, a lie. Both of the doors have very powerful traps on them. As the book points out, the actual logic puzzle here is not the obvious one. After all, why would a group of paranoid Solars need to solve a riddle to get past their own traps? Likewise, anybody who didn't know which door to go through was Not To Be Trusted, and thus should be directed to the Doors of Doom. Presumably anybody who was allowed in had been told to use the secret door on a different wall.
- Pathfinder: Subverted in Gardens of Gallowspire, the fourth installment of the Tyrant's Grasp adventure path. The players encounter two wraiths in the depths of Gallowspire's catacombs, who tell them in rhyme that one of them always lies and the other always tells the truth, and that if they can determine which one is which they must turn away from the liar and ask the truth-sayer for the correct path. They then proceed to say a number of cryptic, confusing statements when interacted with. This is purely a ruse intended to get the PCs to drop their guard and turn their back on one wraith, after which they both attack. Their cryptic comments are simply so much profound-sounding nonsense.
- Warhammer 40,000: Kairos Fateweaver, a Lord of Change with two heads, knows everything... but when asked a question, one head gives the correct answer, while his other head gives an equally believable lie. And, what with him being a demon of Tzeentch, nowhere is it actually stated that the correct answer is given by the same head each time...
Lorgar: Which one of you is telling the truth?!
Both heads: I am.
- When discussing the slim chances of Ani winning the pod race, the announcer admits he could be wrong as only one of his heads tells the truth while the other always lies.
- Avernum: Escape From the Pit references this trope with a sign in Erika's tower, but ultimately averts it:
One goblin tells the truth,
The other lies.
Pierce them both to get the prize.
- A sidequest in Borderlands 2, "BFFs", has four robbers in a Truxican Standoff over which of them stole the money from a heist they recently pulled off. One of them is telling the truth, and the other three are lying. You can just shoot any of them in the head to complete the quest, but if you properly figure out who took the money, you'll get a better reward. It's Lee, the only one who didn't specifically accuse anyone else. Oh, and he has a box with a dollar sign on his back.
- Note that figuring out which one is truthful isn't required, as the culprit is one of the liars. For the record, it was probably O'Cantler. He accuses one of the others of lying, but not of taking the money.
- Castle of Dr. Brain has a room with three robot heads you need to choose from to help manage a programming task, but one always tells the truth, one always lies, and one alternates, and this affects how they handle programming instructions. (The liar does opposite tasks, for instance.) You don't get to ask any questions; all they do is introduce themselves. All three says they themselves work properly, but Propeller Head says that Iron Face also works properly, Iron Face says that Saucer Head never works properly, and Saucer Head says he's the only reliable head. This gives you enough clues to figure out who's who.
- The Cat Lady has a standard instance of the Knights and Knaves riddle with two doors, the only variation being that the Knight and Knave are represented by a pair of gigantic creepy dolls.
- In Darklands most puzzles in dwarven mines are either this or mathematical rebuses.
- Dark Seed II introduces an interesting variation. Two guards, Ik and Uk, guard a door. The player has to tell which one is which, and if it is day or night. However, there is no sun in their world, and the role of Knight and Knave changes depending if it is day or night. Unfortunately, since the game won't let the player figure it out on his own, he must ask someone else which is the Knight and Knave during day and night.
- Dragon Quest VI: In the fifth floor of Gardsbane Tower, the hero finds three doors and three persons. You have to talk to them to figure out which is the right door, but only one of them is telling the truth. The young man on the left claims there is nothing past his door, and the right door is on the right; the old man on the center says you will get hurt if you open his door. And the woman on the right tells the young man is telling the truth. Which of them is truthful? Actually, the old man, since the center door leads to a spiked floor. Meanwhile, the left door leads to a treasury which is not the one the hero is looking for, and the right door leads to the Tower's real reward.
- In The Elder Scrolls series Action-Adventure spin-off Redguard, Clavicus Vile poses this riddle to the protagonist Cyrus. He's Genre Savvy enough to ask if Cyrus had a classical education first, knowing it wouldn't be much of a riddle if he'd heard it before.
- A variation of this problem appears as a puzzle in Escape from Monkey Island, where Guybrush needs to find hidden treasure with the help of two parrots named Huggyn and Kyssin, who are enchanted by voodoo magic to always tell the truth and lie, respectively. The catch with this variation is that you're asking for directions where there are at least three choices at each intersection. Also, the parrots are identical and fly up and off the screen, then come back after answering a question, so you can no longer tell which one tells the truth. The trick is to intoxicate one of the parrots with caffeine or alcohol, which produces an obvious change in the bird's behavior — don't worry, it wears off as soon as you finish the puzzle.
- In the Aeanea Spring Breeze event from Fate/Grand Order, the party (the player, Odysseus, Circe, Arjuna, Jason, and Orion) comes across three gates guarded by Mephistopeles, Shakespeare and Great Stone Statue God, all three of whom are claiming that the other two are telling lies and they should trust them instead. Circe figures out that the real liar in all of this is the sign who is telling the party to break the paradox and go onward without looking back, with it instead saying to turn back to proceed. The three gate guards still attack as she also said that they were just a sideshow, pissing them off.
- Final Fantasy:
- Final Fantasy VI: The Dungeon Town of Zozo is part of a Knights and Knaves puzzle where everyone in town is a Knave. There are people there that don't lie, but none of them are native to the town, and they don't contribute to the puzzle. The Knaves all tell you what time it is, and each statement is false. By process of elimination, you can find out the correct time, and use a clock late in the dungeon to access the Chainsaw for Edgar.
- A valley near Esthar in Final Fantasy VIII contains a multitude of talking rocks that put Squall's wits to task with this riddle... in theory. In practice they're pretty much all full of it, and it's easiest to solve the puzzle simply by wandering around pressing the X button until you hit the right spot.
- I Have 1 Day has one puzzle in which you have to decide which one of two wizards you know for sure is telling the truth after hearing one statement from each of them. The solution is to talk to the third wizard who explained the rules of the puzzle to you — you can't know for sure if either of the other two wizards are telling the truth from their statements, but you can be pretty sure that the wizard who told you the rules was telling the truth.
- Ib has a Room of Liars early on with six inscriptions below six different portraits telling you which tile to pull in the next room over or which portraits can be trusted. As expected, all of them are lying with one sole exception. Once you figure out the trick and solve the puzzle, your next visit to the room greets you with the sight of the truth-teller's portrait splattered with blood and the other portraits with blood on their hands...
- The AGD Interactive remake King's Quest II: Romancing the Stones used this on the stone lions guarding Hagitha's keep. However, owing to the fact that most of their audience has probably heard it before (and the graphical interface), the two lions simply tell you what the other one say if you asked if that one knows the way in.
- Kingdom Come: Deliverance has a variation where there isn't a Death Trap, it's just a wandering Riddler who asks the question for sport. In his version there are three Fates, called Truth, Falsehood, and Wisdom (who may tell either the truth or a lie), and a pilgrim (and by proxy, the player) is tasked to decide which is which by asking each one only one question:
[The Pilgrim] starts with the Fate on the left and asks her: "Which one is standing in the middle?" and the Fate replies: "Truth". He asks the middle one: "Which one are you?" and the Fate responds: "Wisdom". He asks the last one: "Which one is standing in the middle?" and the Fate replies: "Falsehood". The question is which Fate is which? First, second and third?
- Kingdom of Loathing: In an early version of the final quest, you have to guess the password to a door from clues garnered from four guards. One always tells the truth, one always lies, one alternates between the two, and the fourth one... craves human flesh (and never says anything but "Graaaaagh"). People worked out the game uses two versions of this scenario. One requires the usual logic to work out, and one can be solved instantly when you know one fact: One of the guards says "You're full of it" at one point. Regardless of the numbers, he's the truth-teller.
- Labyrinth: The Licensed Game for the Commodore 64 includes the scene as described in the Film folder; but as the engine was too limited to let you ask specific questions, the solution is different. The player must open each door and see which path has the sign saying "To the Castle" and which says "To Certain Death." The real danger is assuming that something so obvious must be a trick and falling to your doom.
- The Legend of Zelda: Phantom Hourglass combines this trope with Ten Little Murder Victims: Amongst the members of the Isle of Frost's Anouki tribe is a Yook, their chief enemy on the island, and he's so well disguised that the only way to identify him is that Anoukis always tell the truth while Yooks always lie.
- Referenced in A Link to the Past: Randomizer, where the woodcutters may have their dialogue randomly replaced with "One of us always lies."
- The 1990s shareware game MasterSpy is built around this. To win the game, you have to start by figuring out which of the three information sources is still telling the truth, while the other two have been corrupted by The Mole and always lie. This is done by spotting contradictions, such as RADIO: THE SHIP TICKET CANNOT BE USED vs. TELEPHONE: THE SHIP TICKET WILL ALLOW AN AGENT TO ESCAPE, or alternatively RADIO: TELEPHONES TELL LIES. Either of these will tell you that the third info source (Letters) must be one of the liars.
- Neopets does this too in the Tale of Woe (an old Plot). There was this Mutant Hissi, which you had to question. (For those who don't know, a Mutant Hissi has two heads.) The solution is to stab one of the heads, and then ask: "Did it hurt?" If the head answers no, it lies.
- Paper Mario: The Origami King: One of the puzzles in the Trial of Wisdom on Diamond Island involves having to talk to three statues and decide which of them is the liar.
- Played quite straight with three different agents (liar, truth-sayer and alternator) in Pathologic. Except that you can cheat and use a disguise to figure out which is the liar.
- Several variations appear in the Professor Layton series.
- Professor McLogic Saves the Day is built entirely on this trope: not only do you need to discern truth-tellers from liars and alternators, you also need to deal with animals whose truth-telling/lying ways are reversed by gender and rabidness, philosophers who speak only in "if-then" statements, politicians who love telling you what they think others would say instead of their actual party affiliation/honesty, creatures who tell the truth only at certain phases of the day...and that's just a small sample of the numerous variations this game manages to bring to the table.
- One puzzle in Rusty Lake: Roots requires you to figure out which one of four people are the High Priestess (always tells the truth), the Devil (always lies), the Chariot (lies only once), and the Empress (tells the truth only once) from their written statements.
- Played with in Shadow Hearts: Covenant: Lucia's bonus dungeon is a multi-junctioned forest where you are told (by a white flower) that white flowers will always try to help you while the black flowers will always try to mislead you. This is true right up until the last junction, when the black flower gets sick of you and tells you the truth just to get you out of the forest. Meanwhile, the white flowers are actually evil and take this moment - now that they have your trust - to try and lead you straight into a trap.
- The real kicker is that the last white flower was actually telling the truth; its Exact Words were that the right path would allow you to "proceed into the forest", not to escape it. Additionally, the white flower that explains the rules at the start never said that the black flowers lied, only that they would try to get you to leave the forest which is something you actually want to accomplish at the last junction. Close reading is essential here.
- In Sir Basil Pike Public School, picking the girl's path gives you this puzzle with Duke and Luke Crabtree, who try to either guide or deter you from the tennis court. (The boy's path has a 3 + 5 = 4 puzzle instead.)
- Sonic the Hedgehog (2006) got really stupid with this one. The Soleanna police force, intent on giving Sonic the runaround, have informed him that to progress beyond this point of the game he must ascertain which of them is the man authorized to open the door preventing him from doing so. Not only that, at least one of the five is going to lie to him. The answer ends up being that the whole thing is meaningless. The captain is both the liar, and the guy who told you the terms of their little game in the first place, who just so happens to be standing right next to the door you need to open. He literally just has to raise his voice to get you through the door; the game was just for his own sick amusement. While the princess is being held prisoner, no less.
- Ultima features a two-headed horse called the Pushmi-Pullyu, whose heads are a Knight and a Knave. The puzzle is substantially simplified to fit the interface — however you put the question to it, he answers by telling you what his other head would say. And since his explanation of his nature is the same whichever head is speaking, there is something of a flaw in the setup. Not that it really matters anyway, as he tells you only which of two routes is less dangerous, but by the time the player reaches him, neither route is particularly dangerous, and the Money Spider enemies actually make the "wrong" answer more attractive.
- Zork Zero
- A variation on this puzzle appears with the executioner. You're eventually forced into line with an executioner, who lets everyone make a last request. If he can fulfill the request, the executioner hangs the prisoner. If he can't do the last request, the executioner cuts the prisoner's head off. This can be solved with a Logic Bomb by saying "Executioner, cut my head off". Since he can do it, he has to fulfill the request, but cutting people's heads off is only done if he can't do the request. Plus, it's impossible to hang somebody once they no longer have a head. The executioner gets so confused that the guards tell you to get out of line, and you get to walk free. However, this only works once — if you are stupid enough to try the executioner again, he'll have gotten wise to this loophole and made an Obvious Rule Patch which includes a third method of death, so you're dead thanks to trying to push your luck again.
- There's a classic form of the knights and knaves puzzle in a different room, but the developers made sure that Save Scumming wasn't an option, because the puzzle is randomized every time you enter, and you can't save while you're in there, so you have to solve it the hard way.
- In the freeware Visual Novel RE: Alistair, Travis presents Merui with a version of the puzzle (involving a Knight as the one who always tells the truth and a Demon as the one who always lies) as a challenge: if she can answer it, he'll help fix the computer issue she's having. Merui can't figure it out until Shiro provides her with the answer (by which time the network is back up anyway). Travis actually presents the puzzle incorrectly by making the goal simply to determine who is the Knight and who is the Demon, enabling Merui to (eventually) come up with the third option of asking one of them if two plus two is four or something of that nature.
- In the Umineko fan novel "Witches and Woodlands", the heroes are presented with this trope during their quest. Most of them already know the solution, and Battler chides Beatrice for getting so lazy with her puzzles. Unfortunately, Erika refuses to use the standard solution, so she uses the existence of red text to figure out which guard is the liar and which is the truth-teller. Everyone is suitably impressed... until the NPC in charge of the test reminds her that the point was to figure out which door was the safe one, and she just wasted the party's one question. (Bonus points for referencing the Labyrinth and Order of the Stick examples during the test.)
- The Homestar Runner game Where's An Egg is based on this, only with 9 knights or knaves and a limited set of questions you can ask. Oh, and it's in Russian.note
- If the Emperor Had a Text-to-Speech Device shows that pulling this routine is a bad idea if an incredibly sloshed (and frankly batshit insane even while sober) Ordo Xenos member asks you if you are a Genestealer. Kairos the Fateweaver found this out the hard way.
Adrielle: I KNEW IT! [ATTACK SCREAM]
Kairos: AAAAAAAAAAA! NO!! NOT THE FACE!
- In Supermarioglitchy4's Super Mario 64 Bloopers, SMG4 and Mario encounter two Piranha Plants in SMG3's dungeon filling this role. Naturally, SMG4 solves the riddle with the opposite answer solution, while Bowser just sets them both on fire and enters the wrong door.
- In 8-Bit Theater, Fighter decides working out whether or not Thief is lying is like one of these puzzles, and comes up with the following sequence of words:
Fighter: So you ask one guy, doesn't matter which, what the other guy had for lunch that day. Then you ask the other guy what he didn't have for lunch. If their answers differ, then you know that one tells the truth while the other one lies.
Black Mage: And what if they say the same thing?
Fighter: Then the conspiracy goes straight to the top.
Black Mage: What conspiracy?
Fighter: I wish I knew, BM. I wish I knew.
- The Best Gamepiece Photocomic: This strip features a character using a Logic Bomb against one. The guards respond by just telling him the answer.
- In a Biter Comics strip, a two headed tree that guards the safe path out of the forest attempts to use this old riddle, although he proves to not be particularly good at it.
- On Bob and George, when Mega Man gets to Gemini Man, one of them claims that they tell riddles (they don't) and begins with this one. When the other tries to protest, the first merely passes off everything as a lie. Mega Man just stands there, reflecting on what Wily bots have been reduced to.
- Spoofed in Chicanery, where Ness rants at length about how overused this device is after getting it from one of the doors in the gang's new secret lair. He even cites the use of this trope in Labyrinth: "Now you've made me think of David Bowie again. Thanks loads."
Pokey: (hacking at one of the doors with a sword) Does this hurt?
Door: AAAAAAGGHH! AAAAIEEE!!! NOT IN THE LEAST!
- Girly features what probably is the most nonsense solution for the problem in the strip "Knights and Knaves". Basically, the right question is "Are you wearing a sombrero?" Of course, given the setup of that particular instance ("the correct path lies with the one who tells the truth"), any question you already know the answer to will do.
- A God's Life spoofs it here (last two pages).
Disembodied voice: The guards are politicians. One tells half-truths, the other dodges questions.
- Housepets! uses the "three guard" variant here, with the added caveats that they must find out which guard answers randomly, each guard only answers with "Bo" or "Lal", and if you ask them more than two questions the puzzle resets with the roles of the guards swapped. Peanut, using his newly acquired Smart Ball, solves it by asking the first two guards (the liar and the truth-teller, incidentally) a question they can't answer truthfully or falsely, causing them to explode and leaving only the random one, which would have survived Peanut's logic bomb anyway.
- Parodied twice in Kirby Webcomic Kirby's Dreamland Adventures:
- In this strip of Nobody Scores!: Jane simplifies the problem by opening both doors and shoving the knight and knave through them.
- One Oglaf strip is titled "Knights and Knaves" and involves adventurers encountering two doors in a dungeon that offer the typical puzzle. The adventurers take the door's claim that "You may take either door" overly literally, and steal one of the doors. At their stolen home goods store, the door offers bogus deals to customers, and a salesperson warns "This door always lies."
- In Episode 327 of The Order of the Stick, this is the Test of the Mind the Order goes through to get to the Oracle of Sunken Valley (which prompts Roy to remark "that's the last nail in the coffin for the hope that these Tests would be even remotely original"). Haley solves it by shooting one of the guards, then noting that the guard she shot is screaming "you shot me!" while the other guard insists "she totally didn't shoot you". The next time Haley passes through, the guards remember her and hastily direct her to the correct path before she can do anything. Haley doesn't understand why, because the Oracle's memory charm means nobody remembers anything that happens in the valley except for the answer he gives them.
- Parodied in Partially Clips: here. No solution is offered or expected, but for the record, the puzzle is unsolvable, as the premise is false - both the second and third heads contradicted themselves, something which only the alternator would do.
- In Rusty and Co.:
- The Mimic tries to solve a version of the problem posed by two talking doors using its own... unique skillset.
- The next time this puzzle gets overcomplicated, but the one solving it is Rusty, with his own rather predictable question.
Rusty: Eat hinges?
- The third time it just gets derailed.
- The fourth time it doesn't even start.
- Invoked in this Unshelved strip. After discussing the fact that Tamara's jokes aren't funny because she has to say "just kidding", whereas Dewey is so flippant that no one realizes when he's being serious, they decide that for the rest of the shift Dewey will always say what he means and Tamara won't. Mel concludes that she's somehow ended up in a logic problem.
- xkcd also has fun with it here, as quoted above. The Alt Text takes it further: "And the whole setup is just a trap to capture escaping logicians. None of the doors actually lead out." Also referenced here in the Alt Text.
- 7-Second Riddles: At least one puzzle followed this plotline, involving the riddle's protagonist having to escape a cave where two guards stood at the exits- one liar, one truth teller.
- Parodied in a tweet by Conal Pierse, with some implied relationship drama.
You arrive at a gate with two guards.
Guard 1: Halt, traveler. You must solve our riddle to continue.
Guard 2: here we go
G1: ONE of us only tells the truth. The other only tells LIES.
G2: jesus christ, Daniel, I said I was sorry.
- Attempted on Game Changer until the guards confuse themselves. They give the hero a river-crossing puzzle to pass the time while they try to sort it out amongst themselves.
- JourneyQuest does this with Glorion killing the truth-telling gargoyle, believing the liar, and getting annoyed by the liar contradicting him — finally asking if he wanted to die. The liar, forced by his nature, says yes, and is thrown through the door he has convinced Glorion leads to his death... demonstrating its safety.
- When The Nostalgia Critic reviewed Labyrinth, he pointed out that the head explaining the situation had to be the one telling the truth as the liar couldn't say it if it were true.
- Ricky and Steve do the "Heaven and Hell" version of this with Karl Pilkington on The Ricky Gervais Show. His answer is to pretend to be a postal worker and ask them to send God out to sign for it. Rather hilarious bit of Fridge Logic is the fact that they use the "Hell-Door guard lies, while the Heaven-Door guard tells the truth" version, meaning that their answer isn't that much better, being overly complicated. Karl being Karl, he remains convinced that something would give the liar away and that you'd need to rely on instinct to spot it even after Ricky and Steve have explained how to solve the problem with logic.
- SCP Foundation: SCP-4390, a knock-off of Labyrinth, features a variant on this puzzle with two Spanish-speaking brothers named Señor Honestidad and Señor Deshonestidad as one of the challenges the exploration team faces. The one asking the questions bungles the question by asking them which path to go down, but their names are a dead giveaway.
- In Aladdin: The Series, Aladdin has a dream with two talking doors. One says that one door always tells the truth and the other lies, while the other says that it is the truth-teller and the first one lies. He then has to choose the truth-telling door and (without thinking about it too hard), incorrectly chooses the second one.note Fortunately, All Just a Dream (which was known to the viewers beforehand at that.)
- King of the Hill: In "A Beer Can Named Desire", Bill Dauterive returns to his family's estate in New Orleans, where three Dauterive widows are all lusting after him, but one of whom is his cousin by blood. Despite Peggy's attempts at telling Bill to avoid them, he decides to go after them. Things get intense when they all they try to sleep with Bill, with each accusing one of the others of being the cousin before they begin brawling with one another. That's when Bill's male cousin, Gilbert, enters and reveals that Violetta was the cousin, and we later learn Bill slept with the two non-cousin widows, after all.
- In an episode of Papyrus, Princess Theti is trapped inside a board of Senet. One of her trial is the enigma with a blue and a red sphinx guarding gates to the next level.
- This is one of the many puzzles presented to The Powerpuff Girls (1998) by HIM in the episode "Him Diddle Riddle." Blossom uses the "If I asked the other person..." variant by asking "which person would the other Ms. Keane say is the real one?". Blossom then tries to explain the whole thing to Bubbles and Buttercup, who are hopelessly lost in trying to figure out Blossom's logic. In spite of not getting it, HIM concedes that Blossom chose correctly, and lets Ms. Keane go.
- Also subverted in an episode of Samurai Jack. A two-headed creature poses this riddle to Jack, claiming that one of his heads is magic, and if he chooses to be swallowed by it, he will be granted a wish, while if he is swallowed by the other head he will simply be eaten. One head always lies, and the other always tells the truth. Jack solves the riddle using the "If I asked the other one which was correct..." solution, but it turns out that it was all just a trick by the creature to get idiots to willingly feed themselves to it. We're not shown how Jack escaped this situation, but given Jack is still alive when he arrives in their stomach, he probably cut his way out.
- In Rick and Morty, when the titular duo are confronted with this scenario, Rick asks one if they ever fucked the other's wife. The guard says "Yes", at which point they fight among each other.
- These logic problems have been extensively studied. Some problems add other variables, such as the addition of Normals/Randoms (who can both lie and tell the truth), the questioner not knowing which words mean 'yes' and no', and the Sane (believes only true things) and Insane (believes only false things) categories (so, an insane knave will answer a question about if he's a knight by saying he's a knave- usually an impossible answer, but the insane knave honestly believes that he's a knight, and tries to lie based on that).
- One of the most difficult variants is The Hardest Logic Puzzle in the World by George Boolos, which is of course directly taken from Raymond Smullyan's work.
Three gods A, B, and C are called, in no particular order, True, False, and Random. True always speaks truly, False always speaks falsely, but whether Random speaks truly or falsely is a completely random matter. Your task is to determine the identities of A, B, and C by asking three yes-no questions; each question must be put to exactly one god. The gods understand English, but will answer all questions in their own language, in which the words for yes and no are da and ja, in some order. You do not know which word means which.