public SearchAgentResult PerformSearch(object owner, IContextLookup globalVars) { var objInitialState = InitialState.Evaluate(owner, globalVars); var objProblemInfo = Problem.GetValue(owner, globalVars); var objSearchInfo = Search.GetValue(owner, globalVars); Problem objProblem = objProblemInfo.GetProblem(owner, globalVars, objInitialState); var objHeuristicFunction = HeuristicFunction.Entity.EvaluateTyped(owner, globalVars); if (objHeuristicFunction == null) { objHeuristicFunction = DefaultHeuristics; } var objSearch = objSearchInfo.GetSearch(owner, globalVars, objHeuristicFunction); return(new SearchAgentResult() { Problem = objProblem, SearchAgent = new SearchAgent(objProblem, objSearch) }); }