예제 #1
0
 public PlanSpaceNode(PlanSpaceNode parent, PlanSpaceEdge incoming)
 {
     this.parent   = parent;
     this.incoming = incoming;
     outgoing      = new List <PlanSpaceEdge>();
     children      = new Hashtable();
     plan          = new Plan();
     problem       = new Problem();
     id            = System.Threading.Interlocked.Increment(ref Counter);
 }
예제 #2
0
 public PlanSpaceNode()
 {
     parent   = null;
     incoming = null;
     outgoing = new List <PlanSpaceEdge>();
     children = new Hashtable();
     plan     = new Plan();
     problem  = new Problem();
     id       = System.Threading.Interlocked.Increment(ref Counter);
 }
예제 #3
0
        // Creates a new problem file and object.
        public static Problem NewProblem(Domain domain, Problem problem, PlanSpaceEdge flaw)
        {
            // Store the state that results from applying the exceptional action.
            List <IPredicate> initial = flaw.state.ApplyAction(flaw.action, problem.Objects);

            // Create a new PDDL problem file based on this state.
            Writer.ProblemToPDDL(Parser.GetTopDirectory() + @"Benchmarks\" + domain.Name.ToLower() + @"\probrob.pddl", domain, problem, initial);
            Writer.DomainToPDDL(Parser.GetTopDirectory() + @"Benchmarks\" + domain.Name.ToLower() + @"\domrob.pddl", domain);

            // Create and populate a problem object based on the new file.
            return(new Problem("rob", problem.OriginalName, problem.Domain, problem.Player, problem.Objects, initial, problem.Goal));
        }