Changeset 12829 for branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.MonteCarloTreeSearch/MonteCarloTreeSearch_PruneLeaves.cs
- Timestamp:
- 08/02/15 14:44:48 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.MonteCarloTreeSearch/MonteCarloTreeSearch_PruneLeaves.cs
r12827 r12829 22 22 Reset(); 23 23 int selections = 0; 24 TreeNode currentNode; 25 string phrase; 26 string simulatedPhrase; 27 double quality; 24 28 for (int i = 0; !StopRequested && i < maxIterations; i++) 25 29 { 26 lock (pauseLock) 27 { 28 if (isPaused) 29 { 30 Monitor.Wait(pauseLock); 31 } 32 } 33 TreeNode currentNode = rootNode; 30 currentNode = rootNode; 34 31 35 32 while (!currentNode.IsLeaf()) … … 42 39 } 43 40 44 stringphrase = currentNode.phrase;41 phrase = currentNode.phrase; 45 42 46 43 if (phrase.Length <= maxLen) … … 71 68 if (currentNode.phrase.Length <= maxLen) 72 69 { 73 string simulatedPhrase; 74 double quality = simulation.Simulate(currentNode, out simulatedPhrase); 70 quality = simulation.Simulate(currentNode, out simulatedPhrase); 75 71 OnSolutionEvaluated(simulatedPhrase, quality); 76 72
Note: See TracChangeset
for help on using the changeset viewer.