Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/30/15 15:54:08 (9 years ago)
Author:
gkronber
Message:

#2283: renamed unit test

Location:
branches/HeuristicLab.Problems.GrammaticalOptimization-gkr
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Problems.GrammaticalOptimization-gkr/Test/RunMctsExperiments.cs

    r12354 r12370  
    100100    [TestMethod]
    101101    [Timeout(1000 * 60 * 60 * 72)] // 72 hours
    102     public void RunSeqSolvFuncApproxArtificialAntProblem() {
     102    public void RunMctsArtificialAntProblem() {
    103103      CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture;
    104104
     
    124124    #region symb-reg-poly-10
    125125    [TestMethod]
    126     [Timeout(1000 * 60 * 60 * 72)] // 72 hours
    127     public void RunSeqSolvFuncApproxPoly10Problem() {
     126    [Timeout(1000 * 60 * 60 * 120)] // 120 hours
     127    public void RunMctsPoly10Problem() {
    128128      CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture;
    129129
     
    184184        new GenericGrammarPolicy(problem, policy, false));
    185185      var problemName = problem.GetType().Name;
    186       var bestKnownQuality = problem.BestKnownQuality(maxSize);
    187       RunSolver(solver, problemName, bestKnownQuality, maxIters, maxSize);
    188     }
    189 
    190     private static void RunSolver(ISolver solver, string problemName, double bestKnownQuality, int maxIters, int maxSize) {
     186      RunSolver(solver, problemName, policy.ToString(), maxIters, maxSize);
     187    }
     188
     189    private static void RunSolver(ISolver solver, string problemName, string policyName, int maxIters, int maxSize) {
    191190      int iterations = 0;
    192       var globalStatistics = new SentenceSetStatistics(bestKnownQuality);
    193       var gpName = solver.GetType().Name;
     191      var globalStatistics = new SentenceSetStatistics(1.0);
     192      var solverName = solver.GetType().Name;
    194193      solver.SolutionEvaluated += (sentence, quality) => {
    195194        iterations++;
     
    197196
    198197        if (iterations % 1000 == 0) {
    199           Console.WriteLine("\"{0,25}\" {1} \"{2,25}\" {3}", gpName, maxSize, problemName, globalStatistics);
     198          Console.WriteLine("\"{0,25}\" {1} \"{2,25}\" \"{3}\" {4}", solverName, maxSize, problemName, policyName, globalStatistics);
    200199        }
    201200      };
  • branches/HeuristicLab.Problems.GrammaticalOptimization-gkr/testMCTS.bat

    r12354 r12370  
    1 mstest /testcontainer:Test\bin\Release\Test.dll /testsettings:local.testsettings /test:RunSeqSolvFuncApproxArtificialAntProblem /noisolation /detail:stdout >> mcts-artificial-ant-log.txt
    2 mstest /testcontainer:Test\bin\Release\Test.dll /testsettings:local.testsettings /test:RunSeqSolvFuncApproxPoly10Problem /noisolation /detail:stdout >> mcts-poly-10-log.txt
     1mstest /testcontainer:Test\bin\Release\Test.dll /testsettings:local.testsettings /test:RunMctsArtificialAntProblem /noisolation /detail:stdout /detail:duration > mcts-artificial-ant-log.txt
     2mstest /testcontainer:Test\bin\Release\Test.dll /testsettings:local.testsettings /test:RunMctsPoly10Problem /noisolation /detail:stdout /detail:duration > mcts-poly-10-log.txt
Note: See TracChangeset for help on using the changeset viewer.