Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/25/15 12:30:13 (9 years ago)
Author:
gkronber
Message:

#2421: derived ArtificialAntProblem from SymbolicExpressionTreeProblem (see #2469)

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

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.5/ArtificialAntProblem.cs

    r12895 r12898  
    2121
    2222using System;
    23 using System.Collections.Generic;
    2423using System.Diagnostics.Contracts;
    2524using System.Linq;
     
    2827using HeuristicLab.Data;
    2928using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    30 using HeuristicLab.Optimization;
    3129using HeuristicLab.Parameters;
    3230using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    33 using HeuristicLab.PluginInfrastructure;
    3431using HeuristicLab.Problems.ArtificialAnt.Analyzers;
    3532
     
    3835  [Creatable(CreatableAttribute.Categories.GeneticProgrammingProblems, Priority = 170)]
    3936  [StorableClass]
    40   public sealed class ArtificialAntProblem : SingleObjectiveBasicProblem<SymbolicExpressionTreeEncoding>, IStorableContent {
     37  public sealed class ArtificialAntProblem : SymbolicExpressionTreeProblem, IStorableContent {
    4138    public string Filename { get; set; }
    4239
     
    123120
    124121
    125     public override double Evaluate(Individual individual, IRandom random) {
    126       var interpreter = new AntInterpreter(individual.SymbolicExpressionTree(), World, MaxTimeSteps.Value);
     122    public override double Evaluate(ISymbolicExpressionTree tree, IRandom random) {
     123      var interpreter = new AntInterpreter(tree, World, MaxTimeSteps.Value);
    127124      interpreter.Run();
    128125      return interpreter.FoodEaten;
  • trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.5/HeuristicLab.Problems.ArtificialAnt-3.5.csproj

    r12895 r12898  
    104104    </Reference>
    105105    <Reference Include="System.Drawing" />
    106     <Reference Include="System.Xml.Linq">
    107       <RequiredTargetFramework>3.5</RequiredTargetFramework>
    108     </Reference>
    109     <Reference Include="System.Data.DataSetExtensions">
    110       <RequiredTargetFramework>3.5</RequiredTargetFramework>
    111     </Reference>
    112     <Reference Include="System.Data" />
    113     <Reference Include="System.Xml" />
    114106  </ItemGroup>
    115107  <ItemGroup>
Note: See TracChangeset for help on using the changeset viewer.