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)...