Backtracking Algorithms
by Dinesh[ Edit ] 2012-08-29 23:25:52
Backtracking Algorithms
PROCEDURE TryNextMove;
BEGIN initialize selection of moves;
REPEAT select next candidate from list of next moves;
IF acceptable THEN
record move;
IF board not full THEN
TryNextMove;
IF not successful THEN erase previous recording END
END
END
UNTIL (move was successful) OR (no more candidates)
END TryNextMove