Assignment B Iterative Deepening Search

Disclaimer: Dieser Thread wurde aus dem alten Forum importiert. Daher werden eventuell nicht alle Formatierungen richtig angezeigt. Der ursprüngliche Thread beginnt im zweiten Post dieses Threads.

Assignment B Iterative Deepening Search
Hello,
I am just implementing IDS and I have an intuition,but i need to change the tree structure a little bit,that means i need to add a integer depth parameter to tree(Value,Children) and it will become tree(Value,Depth,Children).

e.g.
tree(“a”,0,[]) a is in Depth 0
tree(“a”,0,[2,tree(“b”,1,[])]) a is in Depth 0;b is in Depth 1

I think it is helpful and the program can output the node value correctly,but can I get the point of IDS Algorithm at last?I am not sure about that because I change the tree…

best wishes


That shouldn’t be necessary, no… in particular since you’re just making explicit the information that’s already in the tree by introducing a variable that’s supposed to contain the same information, but obviously doesn’t need to…

the point of IDS is basically that it’s a compromise between BFS and DFS. Both have specific advantages and disadvantages, IDS is basically a trade-off. Obviously, if the step size in IDS is larger than the depth of your tree it is equivalent to DFS anyway, if you do IDS with step size 1 you get exactly BFS.

There should be more about this in the lecture notes :wink: