Пример #1
0
        static void Main(string[] args)
        {
            Console.Write("hello world\n");
            Parser.path = @"D:\documents\frostbow\VHSP-Csharp-Frostbow\";
            var directory = Parser.GetTopDirectory() + @"/Results/";
            var cutoff    = 6000f;
            var k         = 1;

            var testDomainName      = "batman";
            var testDomainDirectory = Parser.GetTopDirectory() + @"Benchmarks\" + testDomainName + @"\domain.pddl";
            var testDomain          = Parser.GetDomain(Parser.GetTopDirectory() + @"Benchmarks\" + testDomainName + @"\domain.pddl", PlanType.PlanSpace);
            var testProblem         = Parser.GetProblem(Parser.GetTopDirectory() + @"Benchmarks\" + testDomainName + @"\prob01.pddl");

            var problemFreezer = new ProblemFreezer(testDomainName, testDomainDirectory, testDomain, testProblem);

            // problemFreezer.Serialize();
            problemFreezer.Deserialize();

            var initPlan = StateSpacePlanner.CreateInitialPlan(problemFreezer);

            RunPlanner(initPlan.Clone() as IPlan, new BFS(), new Nada(new ZeroHeuristic()), k, cutoff, directory, 1);

            //RunPlanner(initPlan.Clone() as IPlan, new ADstar(), new E0(new AddReuseHeuristic()), k, cutoff, directory, 1);
            //RunPlanner(initPlan.Clone() as IPlan, new ADstar(), new E0(new NumOpenConditionsHeuristic()), k, cutoff, directory, 1);
            //RunPlanner(initPlan.Clone() as IPlan, new DFS(), new Nada(new ZeroHeuristic()), k, cutoff, directory, 1);
            //
        }
Пример #2
0
        public static ProblemFreezer ReadDomainAndProblem(bool serializeIt, int whichProblem)
        {
            var domainName      = "blocks";
            var domainDirectory = Parser.GetTopDirectory() + @"Benchmarks\" + domainName + @"\domain.pddl";
            var domain          = Parser.GetDomain(Parser.GetTopDirectory() + @"Benchmarks\" + domainName + @"\domain.pddl", PlanType.PlanSpace);
            var problem         = Parser.GetProblem(Parser.GetTopDirectory() + @"Benchmarks\" + domainName + @"\prob0" + whichProblem.ToString() + @".pddl");

            var PF = new ProblemFreezer(domainName, domainDirectory, domain, problem);

            if (serializeIt)
            {
                PF.Serialize();
            }
            else
            {
                PF.Deserialize();
            }
            return(PF);
        }