Hasty Briefsbeta

Bilingual

Solving the NYTimes Pips puzzle with a constraint solver

12 hours ago
  • The New York Times introduced a new daily puzzle called Pips, where dominoes are placed on a grid with various constraints.
  • The author used a constraint solver (MiniZinc) to solve Pips puzzles, finding it straightforward and taking under two hours from no prior knowledge.
  • Constraint solvers allow expressing conditions directly, and the solver finds solutions automatically, often in milliseconds.
  • Complications included unwanted multiple solutions from undefined empty cells, solver unpredictability, and debugging by removing constraints.
  • Different solver backends (e.g., Gecode, Chuffed) had varying performance; Chuffed performed best for these puzzles.
  • The solver works via backtracking search and constraint propagation, pruning the search tree efficiently.
  • Using constraint solvers offers a higher-level programming paradigm, focusing on constraints rather than algorithms.