Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/07/15 14:31:06 (9 years ago)
Author:
gkronber
Message:

#2283 created a new branch to separate development from aballeit

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

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Problems.GrammaticalOptimization-gkr/HeuristicLab.Algorithms.GrammaticalOptimization/Solvers/SequentialSearch.cs

    r11977 r12290  
    4343    private readonly int randomTries;
    4444    private readonly IGrammarPolicy behaviourPolicy;
    45     private readonly IGrammarPolicy greedyPolicy;
    4645    private TreeNode rootNode;
    4746
     
    5857      this.randomTries = randomTries;
    5958      this.behaviourPolicy = behaviourPolicy;
    60       this.greedyPolicy = new GenericGrammarPolicy(problem, new EpsGreedyPolicy(0.0), false);
    6159      this.stateChain = new List<string>();
    6260    }
     
    171169    private void DistributeReward(double reward) {
    172170      behaviourPolicy.UpdateReward(stateChain, reward);
    173       //greedyPolicy.UpdateReward(stateChain, reward);
    174171    }
    175172
     
    178175      StopRequested = false;
    179176      behaviourPolicy.Reset();
    180       greedyPolicy.Reset();
    181177      maxSearchDepth = 0;
    182178      bestQuality = 0.0;
     
    208204        var maxValue = values.Max();
    209205        if (maxValue == 0) maxValue = 1.0;
     206        if (double.IsPositiveInfinity(maxValue)) maxValue = double.MaxValue;
    210207
    211208        // write phrases
Note: See TracChangeset for help on using the changeset viewer.