AIMA.Core.Search.Framework.Problem.getResultFunction C# (CSharp) Method

getResultFunction() public method

public getResultFunction ( ) : ResultFunction
return ResultFunction
        public ResultFunction getResultFunction()
        {
            return resultFunction;
        }

Usage Example

Example #1
0
        public List <Node> expandNode(Node node, Problem problem)
        {
            List <Node> childNodes = new List <Node>();

            ActionsFunction  actionsFunction  = problem.getActionsFunction();
            ResultFunction   resultFunction   = problem.getResultFunction();
            StepCostFunction stepCostFunction = problem.getStepCostFunction();

            foreach (Action action in actionsFunction.actions(node.getState()))
            {
                System.Object successorState = resultFunction.result(node.getState(),
                                                                     action);

                double stepCost = stepCostFunction.c(node.getState(), action,
                                                     successorState);
                childNodes.Add(new Node(successorState, node, action, stepCost));
            }
            metrics.set(METRIC_NODES_EXPANDED, metrics
                        .getInt(METRIC_NODES_EXPANDED) + 1);

            return(childNodes);
        }
All Usage Examples Of AIMA.Core.Search.Framework.Problem::getResultFunction