Backtracking Algorithms

by Dinesh 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
792
like
0
dislike
0
mail
flag

You must LOGIN to add comments