A chess puzzle is a puzzle in which knowledge of the pieces and rules of chess is used to solve logically a chess-related problem. The history of chess puzzles reaches back to the Middle Ages and has evolved since then.
Usually the goal is to find the single best, ideally aesthetic move or a series of single best moves in a chess position, which was created by a composer or is from a real game. But puzzles can also set different objectives. Examples include deducing the last move played, the location of a missing piece, or whether a player has lost the right to castle. Sometimes the objective is antithetical to normal chess, such as helping (or even compelling) the opponent to checkmate one's own king.