Knights and Knaves

One always lies, and one always tells fiddly old truths.

A handful of variations on the classic puzzle. Outwit liars, avoid lions, talk to statues, and roll the dice with clowns!

(Note for mobile players: this looks best in landscape mode)

How to play

Select a guard to begin building a question, then use the popup keyboard as well as the other doors, guards, and speech bubbles to add symbols to your question.

Questions can range from as simple as:

🚪1 ?

 to as complicated as (not a real solution):

⬤ = 💬1(🙂2 & ▲) / (🚪3 ≠ 🎲) ?

Once you have reached each level's question limit, choose a door to enter. If you chose wrong, you can try again - and even get a hint if you want one.

You can also hit the Questions button in the top right to view your entire conversation, as well as examine a logic table showing various possible responses to your last question.

Also, don't worry if you choose wrong and lose a balloon - they're not worth anything more than bragging points! And you can always refresh this page to restart the game from scratch.

Custom puzzles

The format for custom levels goes like this:

numLiars:numDoors:numQuestions:guardType-useLanguage-isStatue:doorType

Guards can be "guard", "vendor", "monty", "monkey", or "clown", and doors can be "gate", "door", "hedge", or "mirror".

An example level:

1:2:1:guard-false-false,guard-false-false:gate

Credits

  • Raymond Smullyan, who popularized the puzzle and coined the phrase
  • Edsger Dijkstra's shunting yard algorithm, which I made a mess of
  • BR Heap's permutation algorithm, which I left alone
  • Monty Hall and his problems
  • JQuery
  • Fonts (Calistoga and Quicksand) by Google Fonts

Soundtrack

StatusReleased
PlatformsHTML5
Rating
Rated 4.7 out of 5 stars
(3 total ratings)
AuthorJohn Poje
GenrePuzzle
Tags2D, logic, lying, Math, Short
Average sessionA few seconds
LanguagesEnglish

Development log

Comments

Log in with itch.io to leave a comment.

Came from Free "Logic" web games! Took a few hints for me to get it, but does Translate have an easier solution than the hint?



The hint takes into account whether the Vendor can lie, but Vendors can't lie, can they? Only guards can?




I just had the Vendor ask the guard if a door was a symbol, and whether the answer symbol was different from the asking symbol? Following the solution given in Language's Hint, a.k.a the hint from Puzzle 9, then the True / False answer corresponds to the door?

(1 edit) (+1)

Clever game, but it's hard to keep track of what means what. It would be nice to have a log of the level instructions and hints in-game that the player can refer back to. For now, I'm keeping a notepad window open where I'm copy-pasting everything.