Free logic puzzles to play and print

Knights and Knaves Puzzles

Knights always tell the truth and knaves always lie. Read what each islander says and work out who is who.

Knights and knaves is a logic puzzle in which every islander is either a knight, who always tells the truth, or a knave, who always lies. You work out which kind each islander is from what they say. This free knights and knaves puzzle generator, solver and printable sheet maker runs in your browser, with no sign-up and nothing uploaded. You can play generated puzzles with a Hint and a full step-by-step solution, write your own statements to see which assignments fit, or print puzzle sheets with answers. Each puzzle has a puzzle number, and Copy link shares it so someone else can open the same puzzle.

How to use the knights and knaves puzzle tool

  1. Open the Play online tab. Set the difficulty (Easy, Medium or Hard) and the number of islanders, from 2 to 6, then read the statements.
  2. Tap each islander to mark them Knight or Knave. Tap again to clear the mark.
  3. Press Check to see whether your marks fit every statement.
  4. If you are stuck, press Hint. It reveals one islander, the one with the shortest proof, and shows the reasoning.
  5. Press Show solution, then open Why? Step-by-step reasoning to see the case split. For puzzles with up to 4 islanders, a table of all possibilities also appears.
  6. To write your own puzzle, open the Solve your own tab. Choose 2 to 6 islanders. For each one, pick 0 to 2 statements from the drop-downs: the kind of statement and who it is about.
  7. Read the result. The tool lists every assignment that fits, so you will see none, exactly one, or several.

For printing, open the Print tab. Choose 2, 4, 6 or 8 puzzles per page, from 1 to 10 pages, on Letter or A4 paper. You can switch answer pages and a name and date line on or off. To share a puzzle, use Copy link: the link holds the puzzle number, difficulty and number of islanders, so the other person sees the same islanders and statements.

What are knights and knaves puzzles?

Knights and knaves puzzles are logic puzzles about islanders who are either knights, who always tell the truth, or knaves, who always lie. The aim is to work out each islander’s kind using only what they say. Raymond Smullyan’s 1978 book What Is the Name of This Book? is the classic source of these puzzles.

Each statement is either true or false, and the speaker’s kind decides which. Common statement types include “X is a knight”, “X and Y are the same kind”, “at least one of us is a knave”, “exactly k of us are knights”, “none of us is a knight”, and “we are all knights”. Sentences can also be joined with “and”, “or” or “if … then”. In these puzzles, “or” is inclusive, so one or both parts can be true. “If A then B” is false only when A is true and B is false. A speaker can talk about themselves, as in “I am a knave and Ben is a knight”.

Two statements never appear alone: “I am a knave”, which is a paradox, and “I am a knight”, which gives no information. Easy puzzles usually have 3 islanders and simple statements. Medium puzzles add “at least one”, “exactly”, “we are all”, and sentences with “and”, “or” and “if”. Hard puzzles have 5 or 6 islanders, mostly compound sentences, and about a third of the islanders make two statements.

How do you solve knights and knaves puzzles?

The main method is case analysis. Pick one islander and assume they are a knight. Follow what their statement forces: if it is true, what else must be true? If that leads to a contradiction, the islander cannot be a knight, so try the knave case and check it all the way through. Start with the simplest statement, often one a speaker makes about themselves.

Here is an example. Cara says, “Kara and Gina are different kinds.” Gina says, “Kara and I are different kinds.” Kara says, “Cara is a knave.” Start with Gina. If Gina is a knave, her statement is false, so Kara and Gina are the same kind, meaning Kara is a knave too. Kara’s statement is then false, so Cara is a knight. But Cara’s statement would then be false, since Kara and Gina are both knaves. That is a contradiction, so Gina is a knight. Kara must differ from her, so Kara is a knave. Kara’s lie makes Cara a knight, and Cara’s true statement fits. Every statement checks out.

Can I make my own knights and knaves puzzle and check it?

Yes. Write the statements, then test them in the Solve your own tab. Because the tool lists every assignment that fits all statements, it shows whether your puzzle has none, exactly one, or several answers. No answer means your statements contradict each other. Several answers means at least one statement does not narrow things down.

A useful way to build a puzzle is to decide the answer first. Mark each islander as a knight or knave, then write statements that are true for the knights and false for the knaves. Check the result in the solver, and remove any statement that is not needed. For generated puzzles the tool checks every combination of kinds, so each one has exactly one fitting answer.

Frequently asked questions

Is the knights and knaves tool free, and do I need an account?

Yes, it is free, and you do not need to sign up. Nothing is uploaded.

Does the knights and knaves tool work on a phone or tablet?

It runs in the browser, and in the Play online tab you solve by tapping each islander, so you can use it by tapping on a phone or tablet.

Can I print knights and knaves puzzles with the answers?

Yes. In the Print tab, choose 2, 4, 6 or 8 puzzles per page and 1 to 10 pages, on Letter or A4 paper. Turn answer pages on or off, and add or remove a name and date line.

Who invented knights and knaves puzzles?

The logician Raymond Smullyan made them famous in his 1978 book What Is the Name of This Book?, which named the island of knights and knaves. The puzzles here are new ones made by the generator, not copies of his.

Does every generated knights and knaves puzzle have exactly one answer?

Yes. Each generated puzzle has exactly one assignment that fits all statements, which the tool confirms by trying every combination. Apart from rare marked cases, every statement is needed to reach that answer.