So, it works like this....
Think about having to go down a decision tree (a highly branched tree.
Now there are a few possible answers and they are at the leaf level. And imagine you are starting at the root level.
So, the way you would "backtrack" is to start down a branch (branch picking to start the problem is a bit beyond me). But you would continue down from one branch to another until you get to the leaf (most examples I saw do this recursively). If the leaf is the solution you are done! If not, you will back up, I think of rewinding, back to the original position and trying down another branch.
Now obviously this is a super simple understanding of a complex technique. Things that should be given some more thought include keeping track of position so that you do go down a failed route again and again.
No comments:
Post a Comment