Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dfs

Status
Not open for further replies.

gregdavenport2000

Programmer
Aug 13, 2001
1
NZ
Hello,

How do I modify a depth-first search algorithm written in prolog, so that it counts the number of nodes in the search tree it has visited? I'm doing this with the aim to modify the algorithm to prune search paths of certain lengths (also known as depth-limited search).


Thanks.
 
basically, every time you encounter a node, you increment a counter !!!!! give us the code so that we tell you where to put the counter ;] ------
please review FAQ183-874 - this will help you to get the best out of tt
[ "you" is not someone in particular - don't take it too personnal ]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top