Signed version of sliding_puzzle_generator