Exemple #1
0
        public void DeCacheWithProblemSpec(string storedproblemFile)
        {
            Parser.path = @"D:\documents\frostbow\";
            DecacheSteps();

            //var problemPath = @"D:\Documents\Frostbow\Benchmarks\Problems\" + problemname + "problem.txt";
            //var problemPath = problemDirectory + problemName;
            var prob         = BlockTest.ReadStringGeneratedProblem(storedproblemFile, 0);
            var initialState = prob.Initial;
            var goalState    = prob.Goal;

            var CausalMapFileName = GetCausalMapFileName();
            var ThreatMapFileName = GetThreatMapFileName();
            var EffortMapFileName = GetEffortDictFileName();

            CacheMaps.CacheLinks(GroundActionFactory.GroundActions);
            CacheMaps.CacheGoalLinks(GroundActionFactory.GroundActions, goalState);

            var iniTstate = new State(initialState) as IState;

            CacheMaps.CacheAddReuseHeuristic(iniTstate);
            CacheMaps.PrimaryEffectHack(iniTstate);


            initial = initialState;
            goal    = goalState;
        }
Exemple #2
0
        public static void RunBlockTestInternal()
        {
            var directory = @"D:\Documents\Frostbow\Benchmarks\blocks\";

            System.IO.Directory.CreateDirectory(directory);
            var cutoff   = 600000f;
            var k        = 1;
            var problem  = 5;
            var initPlan = BlockTest.ReadAndCompile(true, problem);

            // search (false ==> ignore depth as stopping condition, is default). Selection (E0) (true=> do check for no flaws no matter depth).
            RunPlanner(initPlan.Clone() as IPlan, new ADstar(false), new E0(new AddReuseHeuristic(), true), k, cutoff, directory, problem);

            RunPlanner(initPlan.Clone() as IPlan, new ADstar(), new E0(new AddReuseHeuristic()), k, cutoff, directory, problem);
            RunPlanner(initPlan.Clone() as IPlan, new ADstar(), new E1(new AddReuseHeuristic()), k, cutoff, directory, problem);
            RunPlanner(initPlan.Clone() as IPlan, new ADstar(), new E2(new AddReuseHeuristic()), k, cutoff, directory, problem);
            RunPlanner(initPlan.Clone() as IPlan, new ADstar(), new E3(new AddReuseHeuristic()), k, cutoff, directory, problem);
            //RunPlanner(initPlan.Clone() as IPlan, new ADstar(), new E0(new AddReuseHeuristic()), k, cutoff, directory, problem);
            //RunPlanner(initPlan.Clone() as IPlan, new BFS(), new Nada(new ZeroHeuristic()), k, cutoff, directory, 0);
        }