God's algorithm is a notion originating in discussions of ways to solve the Rubik's Cube puzzle,[1] but which can also be applied to other combinatorial puzzles and mathematical games.[2] It refers to any algorithm which produces a solution having the fewest possible moves. The allusion to the deity is based on the notion that an omniscient being would know an optimal step from any given configura