Interactive Logic Puzzle

Two Doors, Two Guards

This visualizes the classic “fork in the road” Knights-and-Knaves style puzzle: one guard always tells the truth, the other always lies, and by asking one yes-or-no question to one guard, you can still determine the correct path【turn868652view0†L155-L160】.

Setup
  • One door leads to your dream job offer.
  • The other leads to certain doom (rejection and exit).
  • One guard always tells the truth.
  • The other always lies.
  • You may ask one yes-or-no question to one guard, then choose a door.

Step 1 — Choose a guard to ask

You do not know which guard is truthful and which one lies. That’s okay — the strategy works either way.

🛡️
Guard 1
Truth-teller or liar?
Identity hidden
🛡️
Guard 2
Truth-teller or liar?
Identity hidden

Step 2 — Pick the question form

Use the classic nested question. You can ask about either door:

“If I asked the other guard whether Door A leads to the dream job, would they say yes?”
The guard answers:
NO

Step 3 — Choose a door

After hearing the answer, choose the opposite of the door the answer seems to indicate.

🚪
Door A
Ask first, then choose.
🚪
Door B
Ask first, then choose.
🎉

Why the trick always works
If you ask the truthful guard: they truthfully report what the lying guard would say — which is false.
If you ask the lying guard: they lie about what the truthful guard would say — again producing the false outcome.
So both guards give the same misleading answer. Therefore, the answer always points to the wrong door, and you should choose the opposite door.