Solving Blue Prince's Propositional Parlor Puzzle with Logic

2025-04-21
Solving Blue Prince's Propositional Parlor Puzzle with Logic

This article details how to automatically solve a logic puzzle from the game Blue Prince using propositional logic. The puzzle involves three boxes (blue, white, black) each making statements, and rules stating at least one box is entirely true, at least one is entirely false, and the prize is in exactly one box. The author models the problem in propositional logic, uses a brute-force approach to find all satisfying assignments, and thus determines the prize's location. The article includes a JavaScript implementation and discusses code optimization.