i tried to write a prolog code for Depth First Search (DFS). Program has given a certain state space on input, which is rated tree and i need to realize browsing of this state space with DFS method.
My code is:
dfs(state(NAME,TRANSITIONS)) :- write(NAME), write('\n'), expand(TRANSITIONS)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.