Changeset 12290 for branches/HeuristicLab.Problems.GrammaticalOptimization-gkr/HeuristicLab.Algorithms.GrammaticalOptimization/Solvers
- Timestamp:
- 04/07/15 14:31:06 (10 years ago)
- 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 43 43 private readonly int randomTries; 44 44 private readonly IGrammarPolicy behaviourPolicy; 45 private readonly IGrammarPolicy greedyPolicy;46 45 private TreeNode rootNode; 47 46 … … 58 57 this.randomTries = randomTries; 59 58 this.behaviourPolicy = behaviourPolicy; 60 this.greedyPolicy = new GenericGrammarPolicy(problem, new EpsGreedyPolicy(0.0), false);61 59 this.stateChain = new List<string>(); 62 60 } … … 171 169 private void DistributeReward(double reward) { 172 170 behaviourPolicy.UpdateReward(stateChain, reward); 173 //greedyPolicy.UpdateReward(stateChain, reward);174 171 } 175 172 … … 178 175 StopRequested = false; 179 176 behaviourPolicy.Reset(); 180 greedyPolicy.Reset();181 177 maxSearchDepth = 0; 182 178 bestQuality = 0.0; … … 208 204 var maxValue = values.Max(); 209 205 if (maxValue == 0) maxValue = 1.0; 206 if (double.IsPositiveInfinity(maxValue)) maxValue = double.MaxValue; 210 207 211 208 // write phrases
Note: See TracChangeset
for help on using the changeset viewer.