// Devuelve si es cierto o no que un nodo contiene una configuraciĆ³n objetivo public static bool IsGoalSetup(Problem p, Node n) { bool isGoal = false; GoalTest gt = p.GetGoalTest(); if (gt.IsGoalSetup(n.GetSetup())) { if (gt is SolutionChecker) { isGoal = ((SolutionChecker)gt).IsAcceptableSolution( SearchUtils.GetOperatorsFromNodes(n.GetPathFromRoot()), n .GetSetup()); } else { isGoal = true; } } return(isGoal); }
public bool IsGoalSetup(object setup) { return(goalTest.IsGoalSetup(setup)); }