Recreational logic refers to puzzles, games, and other recreations involving logical deduction or inference. Recreational logic has a long history; perhaps modern recreational logic dates back to the nineteenth century, when Charles Dodgson (better known by his pen name Lewis Carroll) wrote Symbolic Logic and The Game of Logic, and well-known puzzle composers Sam Loyd and H. E. Dudeney included logic puzzles among the many puzzles they composed. However, there are several logical puzzles that are older; for example, Alcuin, a scholar at Charlemagne's court, composed several river crossing problems in the eighth century. There are many types of recreational logic puzzles; here are several types:

- Perhaps the type of puzzle most synonymous with "logic puzzle" is a puzzle where
you are given a number of categories and options. Based solely on the clues
given, your task is to determine which categories and options are linked
together. For example, you might be told that five people have five different jobs and five different pets, and based on the clues you would determine which person has which pet and which job. These puzzles are commonly referred to as
*logic grid puzzles*, because it is often helpful to organize all of the information in grid form. Einstein's riddle is a well-known example of such a puzzle. *Liar puzzles*are typically set on some far-off island or country populated with people who always tell the truth, and people who always lie, but you are unable to tell which is which. Your task is to formulate questions that allow you to find out certain information, or to deduce certain conclusions based on the statements given. These types of puzzles are common in Raymond Smullyan's books.- In
*task puzzles*or*transport puzzles*, you are asked to perform a task requiring multiple steps under certain constraints. One example is a river crossing puzzle, where you might be asked to ferry various people or items across a river with a boat that only holds so many items and where certain people or items cannot be left alone with each other. Another example is a shunting puzzle, where you are asked to move railway cars around on a track, but the only available siding can only hold, say, one car. *Lie detection puzzles*were first created in the 1930s by Hubert Phillips, who is better known as "Caliban." In these puzzles, various people make statements about a certain scenario (say, a crime that was committed by someone). You are told that some number of these statements are true (or that some number are false) and asked to determine what actually happened.*Sudoku*and similar puzzles are types of non-verbal logic puzzles. In Sudoku, you are given the positions of certain numbers in a 9×9 grid and asked to fill each of the remaining squares with a number from 1 to 9, subject to the constraints that each row, column, and each of the nine 3×3 sub-squares must contain each of the digits 1 through 9 exactly once.- While not technically a logic puzzle because the correct answer cannot always be obtained through logical deduction, a related type of puzzle is referred to as
*lateral thinking puzzles*, also called situation puzzles. In a lateral thinking puzzle, you are given a situation that sounds bizarre or wildly improbable but has a rational explanation. Your task is to find that explanation.