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

getStepCostFunction() public method

public getStepCostFunction ( ) : StepCostFunction
return StepCostFunction
        public StepCostFunction getStepCostFunction()
        {
            return stepCostFunction;
        }

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::getStepCostFunction