Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/06/10 19:02:45 (15 years ago)
Author:
gkronber
Message:

Adapted analyzers to use ScopeTreeLookupParameter and wire the depth setting correctly for

  • SymbolicExpressionTreeEncoding
  • ArtificialAntProblem
  • SymbolicRegression

#999

Location:
trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3
Files:
2 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Analyzers/BestAntTrailAnalyzer.cs

    r3665 r3681  
    3232namespace HeuristicLab.Problems.ArtificialAnt.Analyzers {
    3333  /// <summary>
    34   /// An operator for visualizing the best ant trail of an artificial ant problem.
     34  /// An operator for analyzing the best ant trail of an artificial ant problem.
    3535  /// </summary>
    36   [Item("PopulationBestAntTrailAnalyzer", "An operator for visualizing the best ant trail of an artificial ant problem.")]
     36  [Item("BestAntTrailAnalyzer", "An operator for analyzing the best ant trail of an artificial ant problem.")]
    3737  [StorableClass]
    38   public sealed class PopulationBestAntTrailAnalyzer : SingleSuccessorOperator, IAntTrailPopulationAnalyzer {
     38  public sealed class BestAntTrailAnalyzer : SingleSuccessorOperator, IAntTrailAnalyzer {
    3939    public ILookupParameter<BoolMatrix> WorldParameter {
    4040      get { return (ILookupParameter<BoolMatrix>)Parameters["World"]; }
    4141    }
    42     public ILookupParameter<ItemArray<SymbolicExpressionTree>> SymbolicExpressionTreeParameter {
    43       get { return (ILookupParameter<ItemArray<SymbolicExpressionTree>>)Parameters["SymbolicExpressionTree"]; }
     42    public ScopeTreeLookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {
     43      get { return (ScopeTreeLookupParameter<SymbolicExpressionTree>)Parameters["SymbolicExpressionTree"]; }
    4444    }
    45     public ILookupParameter<ItemArray<DoubleValue>> QualityParameter {
    46       get { return (ILookupParameter<ItemArray<DoubleValue>>)Parameters["Quality"]; }
     45    public ScopeTreeLookupParameter<DoubleValue> QualityParameter {
     46      get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; }
    4747    }
    4848    public ILookupParameter<IntValue> MaxTimeStepsParameter {
     
    5656    }
    5757
    58     public PopulationBestAntTrailAnalyzer()
     58    public BestAntTrailAnalyzer()
    5959      : base() {
    6060      Parameters.Add(new LookupParameter<BoolMatrix>("World", "The world with food items for the artificial ant."));
  • trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Analyzers/IAntTrailAnalyzer.cs

    r3665 r3681  
    2626using HeuristicLab.Core;
    2727using HeuristicLab.Data;
     28using HeuristicLab.Parameters;
    2829
    2930namespace HeuristicLab.Problems.ArtificialAnt.Analyzers {
    30   public interface IAntTrailPopulationAnalyzer : IAnalyzer {
    31     ILookupParameter<ItemArray<DoubleValue>> QualityParameter { get; }
    32     ILookupParameter<ItemArray<SymbolicExpressionTree>> SymbolicExpressionTreeParameter { get; }
     31  public interface IAntTrailAnalyzer : IAnalyzer {
     32    ScopeTreeLookupParameter<DoubleValue> QualityParameter { get; }
     33    ScopeTreeLookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter { get; }
    3334    ILookupParameter<BoolMatrix> WorldParameter { get; }
    3435    ILookupParameter<IntValue> MaxTimeStepsParameter { get; }
  • trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/ArtificialAntProblem.cs

    r3651 r3681  
    188188    }
    189189
    190     public IEnumerable<IAntTrailPopulationAnalyzer> AntTrailAnalyzers {
    191       get { return operators.OfType<IAntTrailPopulationAnalyzer>(); }
     190    public IEnumerable<IAntTrailAnalyzer> AntTrailAnalyzers {
     191      get { return operators.OfType<IAntTrailAnalyzer>(); }
    192192    }
    193193    #endregion
     
    299299      operators = new List<IOperator>();
    300300      operators.AddRange(ApplicationManager.Manager.GetInstances<ISymbolicExpressionTreeOperator>().OfType<IOperator>());
    301       operators.Add(new PopulationBestAntTrailAnalyzer());
    302       operators.Add(new PopulationMinAvgMaxTreeSizeAnalyzer());
     301      operators.Add(new BestAntTrailAnalyzer());
     302      operators.Add(new MinAvgMaxSymbolicExpressionTreeSizeAnalyzer());
    303303      ParameterizeAnalyzers();
    304304      ParameterizeOperators();
     
    316316    }
    317317    private void ParameterizeAnalyzers() {
    318       foreach (IAntTrailPopulationAnalyzer analyzer in AntTrailAnalyzers) {
     318      foreach (IAntTrailAnalyzer analyzer in AntTrailAnalyzers) {
    319319        analyzer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
    320320        analyzer.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
     
    322322        analyzer.MaxTimeStepsParameter.ActualName = MaxTimeStepsParameter.Name;
    323323      }
    324       foreach (ISymbolicExpressionTreePopulationAnalyzer analyzer in Operators.OfType<ISymbolicExpressionTreePopulationAnalyzer>()) {
     324      foreach (ISymbolicExpressionTreeAnalyzer analyzer in Operators.OfType<ISymbolicExpressionTreeAnalyzer>()) {
    325325        analyzer.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
    326326      }
  • trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/HeuristicLab.Problems.ArtificialAnt-3.3.csproj

    r3631 r3681  
    8181  </ItemGroup>
    8282  <ItemGroup>
    83     <Compile Include="Analyzers\IAntTrailPopulationAnalyzer.cs" />
    84     <Compile Include="Analyzers\PopulationBestAntTrailAnalyzer.cs" />
     83    <Compile Include="Analyzers\BestAntTrailAnalyzer.cs" />
     84    <Compile Include="Analyzers\IAntTrailAnalyzer.cs" />
    8585    <Compile Include="AntInterpreter.cs" />
    8686    <Compile Include="HeuristicLabProblemsArtificialAntPlugin.cs" />
Note: See TracChangeset for help on using the changeset viewer.