Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/02/15 13:13:25 (9 years ago)
Author:
aballeit
Message:

#2283 added TreeInfos to MCTS excel export

Location:
branches/HeuristicLab.Problems.GrammaticalOptimization
Files:
4 edited

Legend:

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

    r12824 r12827  
    396396        {
    397397            StringBuilder tableExport = new StringBuilder();
    398             tableExport.AppendLine(
     398            tableExport.Append(
    399399                "Run\tMaxIterations\tEvaluations\tBestKnownQuality\tQuality\tQuality %\tFoundAt\tTotalTime\tSolutionTime\tEvaluationsPerSecond\tSolution");
     400            if (ListViewRuns.Items.Count > 0 && ((Run) ListViewRuns.Items[0]).TreeInfos != null)
     401            {
     402                tableExport.Append("\tTotalNodes\tUnexpandedNodes\tExpandedNodes\tLeaveNodes\tDeepestLevel");
     403            }
     404            tableExport.AppendLine();
    400405            for (int i = 0; i < ListViewRuns.Items.Count; i++)
    401406            {
    402407                Run run = (Run)ListViewRuns.Items[i];
    403                 tableExport.AppendLine(string.Format("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}\t{9}\t{10}", run.RunNumber,
     408                tableExport.Append(string.Format("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}\t{9}\t{10}", run.RunNumber,
    404409                    run.MaxIterations, run.Evaluations, run.BestKnownQuality, run.BestQuality,
    405410                    run.BestQuality / run.BestKnownQuality, run.BestSolutionFoundAt, run.TotalTime, run.BestSolutionTime,
    406411                    run.EvaluationsPerSecond, run.BestSolution));
     412
     413                if (run.TreeInfos != null)
     414                {
     415                    tableExport.Append(string.Format("\t{0}\t{1}\t{2}\t{3}\t{4}", run.TreeInfos.TotalNodes,
     416                        run.TreeInfos.UnexpandedNodes, run.TreeInfos.ExpandedNodes, run.TreeInfos.LeaveNodes,
     417                        run.TreeInfos.DeepestLevel));
     418                }
     419
     420                tableExport.AppendLine();
    407421            }
    408422            Clipboard.SetData(DataFormats.Text, tableExport.ToString());
  • branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.GeneticProgramming/StandardGP.cs

    r12815 r12827  
    3131      TournamentGroupSize = 4;
    3232      MutationRate = 0.15;
    33       MaxSolutionSize = 30;
     33      MaxSolutionSize = 40;
    3434      MaxSolutionDepth = 17;
    3535      this.saveAlg = saveAlg;
  • branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.MonteCarloTreeSearch/MonteCarloTreeSearch.cs

    r12815 r12827  
    9797                        currentNode.GetChildActionInfos());
    9898                    currentNode = currentNode.children[currentActionIndex];
    99                     selections++;
    100                     CheckSelection(currentNode, selections);
     99                    //selections++;
     100                    //CheckSelection(currentNode, selections);
    101101                }
    102102
     
    109109                        currentNode.children[behaviourPolicy.SelectAction(random, currentNode.GetChildActionInfos())
    110110                            ];
    111                     selections++;
    112                     CheckSelection(currentNode, selections);
     111                    //selections++;
     112                    //CheckSelection(currentNode, selections);
    113113                }
    114114                if (currentNode.phrase.Length <= maxLen)
  • branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.MonteCarloTreeSearch/MonteCarloTreeSearch_PruneLeaves.cs

    r12815 r12827  
    3838                        currentNode.GetChildActionInfos());
    3939                    currentNode = currentNode.children[currentActionIndex];
    40                     selections++;
    41                     CheckSelection(currentNode, selections);
     40                    //selections++;
     41                    //CheckSelection(currentNode, selections);
    4242                }
    4343
     
    5959                            currentNode.children[behaviourPolicy.SelectAction(random, currentNode.GetChildActionInfos())
    6060                                ];
    61                         selections++;
    62                         CheckSelection(currentNode, selections);
     61                        //selections++;
     62                        //CheckSelection(currentNode, selections);
    6363                    }
    6464                    else
Note: See TracChangeset for help on using the changeset viewer.