示例#1
0
        // function DEPTH-LIMITED-SEARCH(problem, limit) returns a solution, or
        // failure/cutoff

        /**
         * Returns a list of actions to reach the goal if a goal was found, or empty.
         * The list itself can be empty if the initial state is a goal state.
         *
         * @return if goal found, the list of actions to the goal, empty otherwise.
         */

        public ICollection <A> findActions(IProblem <S, A> p)
        {
            nodeExpander.useParentLinks(true);
            Node <S, A> node = findNode(p);

            return(!isCutoffResult(node) ? SearchUtils.toActions(node) : null);
        }
示例#2
0
 public ICollection <A> findActions(IProblem <S, A> p)
 {
     nodeExpander.useParentLinks(true);
     return(SearchUtils.toActions(findNode(p)));
 }