An exploration of puzzle solving and optimization