private TreeNode <TAction> CreateTopNode(Tree <TAction> tree, IGoal <TGoal> goal) { TreeNode <TAction> topNode = tree.CreateTopNode(); topNode.GoalState.Set(goal.GetEffects()); topNode.Cost = GetCost(topNode); SetNodeCurrentState(topNode); return(topNode); }