I actually hand-coded the A* pathfinding and made it deterministic so that a single puzzle always plays out the same. I could have made it randomly select between two equivalent paths but that would create uncertainty in the game's rules and make level design harder.