How to Solve Every Chess Puzzle