8 puzzle problem matlab code