Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/08/15 19:49:05 (9 years ago)
Author:
aballeit
Message:

#2283 Final

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Problems.GrammaticalOptimization/Evaluation/Run.cs

    r12824 r12840  
    1 using HeuristicLab.Algorithms.Bandits;
     1using System.Diagnostics;
     2using HeuristicLab.Algorithms.Bandits;
    23using HeuristicLab.Algorithms.GrammaticalOptimization;
    34using HeuristicLab.Algorithms.MonteCarloTreeSearch;
     
    4142            RunState = RunState.NotStarted;
    4243            FoundSolutions = new List<FoundSolution>();
    43             CurrentSelectionIndicator = new SelectionIndicator(0, 0);
     44            CurrentSelectionIndicator = new SelectionIndicator(0, 0, 0);
    4445
    4546            BestKnownQuality = problem.BestKnownQuality(maxLen);
     
    6061            {
    6162                MonteCarloTreeSearch mcts = (MonteCarloTreeSearch)solver;
    62                 mcts.NodeSelected += mcts_NodeSelected;
    63             }
    64         }
    65 
    66         private void mcts_NodeSelected(int goodSelections, int totalSelections)
    67         {
    68             CurrentSelectionIndicator.GoodSelections = goodSelections;
    69             CurrentSelectionIndicator.TotalSelections = totalSelections;
    70             this.OnPropertyChanged("CurrentSelectionIndicator");
    71             //CurrentSelectionIndicator = new SelectionIndicator(goodSelections, totalSelections);
    72             //selectionIndicators.Add(CurrentSelectionIndicator);
     63                mcts.IterationFinished += mcts_IterationFinished;
     64            }
     65        }
     66
     67        private void mcts_IterationFinished(int goodSelections, int totalSelections)
     68        {
     69            //CurrentSelectionIndicator.GoodSelections = goodSelections;
     70            //CurrentSelectionIndicator.TotalSelections = totalSelections;
     71            //this.OnPropertyChanged("CurrentSelectionIndicator");
     72            CurrentSelectionIndicator = new SelectionIndicator(goodSelections, totalSelections, selectionIndicators.Count);
     73            selectionIndicators.Add(CurrentSelectionIndicator);
    7374        }
    7475
Note: See TracChangeset for help on using the changeset viewer.