getGoalTest() public method

public getGoalTest ( ) : GoalTest
return GoalTest
Exemplo n.º 1
0
 public static bool isGoalState(Problem p, Node n)
 {
     bool isGoal = false;
     GoalTest gt = p.getGoalTest();
     if (gt.isGoalState(n.getState()))
     {
         if (gt is SolutionChecker)
         {
             isGoal = ((SolutionChecker)gt).isAcceptableSolution(
                     SearchUtils.actionsFromNodes(n.getPathFromRoot()), n
                             .getState());
         }
         else
         {
             isGoal = true;
         }
     }
     return isGoal;
 }
Exemplo n.º 2
0
        public static bool isGoalState(Problem p, Node n)
        {
            bool     isGoal = false;
            GoalTest gt     = p.getGoalTest();

            if (gt.isGoalState(n.getState()))
            {
                if (gt is SolutionChecker)
                {
                    isGoal = ((SolutionChecker)gt).isAcceptableSolution(
                        SearchUtils.actionsFromNodes(n.getPathFromRoot()), n
                        .getState());
                }
                else
                {
                    isGoal = true;
                }
            }
            return(isGoal);
        }