Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/01/10 20:44:56 (14 years ago)
Author:
gkronber
Message:

Fixed issues with persistence. #952 (Artificial Ant Problem for 3.3)

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

Legend:

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

    r3238 r3251  
    2626using System.Linq;
    2727using HeuristicLab.Core;
     28using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2829namespace HeuristicLab.Problems.ArtificialAnt {
     30  [StorableClass]
    2931  public class ArtificialAntExpressionGrammar : Item, ISymbolicExpressionGrammar {
    3032
     
    3638    #region ISymbolicExpressionGrammar Members
    3739
     40    [Storable]
    3841    private EmptySymbol startSymbol = new EmptySymbol();
    3942    public Symbol StartSymbol {
     
    4144    }
    4245
     46    [Storable]
    4347    private static List<Symbol> allSymbols = new List<Symbol>() {
    4448      new IfFoodAhead(),
     
    4953      new Right()
    5054    };
     55    [Storable]
    5156    private Dictionary<Type, Dictionary<int, IEnumerable<Symbol>>> allowedSymbols = new Dictionary<Type, Dictionary<int, IEnumerable<Symbol>>>() {
    5257      {
     
    8691    }
    8792
     93    [Storable]
    8894    private Dictionary<Type, int> minLength = new Dictionary<Type, int>() {
    8995      {typeof(EmptySymbol), 1},
     
    99105    }
    100106
     107    [Storable]
    101108    private Dictionary<Type, int> maxLength = new Dictionary<Type, int>() {
    102109      {typeof(EmptySymbol), int.MaxValue},
     
    112119    }
    113120
     121    [Storable]
    114122    private Dictionary<Type, int> minDepth = new Dictionary<Type, int>() {
    115123      {typeof(EmptySymbol), 1},
     
    126134
    127135
     136    [Storable]
    128137    private Dictionary<Type, int> subTrees = new Dictionary<Type, int>() {
    129138      {typeof(EmptySymbol), 1},
  • trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/ArtificialAntProblem.cs

    r3245 r3251  
    191191      Parameters.Add(new ValueParameter<SymbolicExpressionTreeCreator>("SolutionCreator", "The operator which should be used to create new artificial ant solutions.", creator));
    192192      Parameters.Add(new ValueParameter<Evaluator>("Evaluator", "The operator which should be used to evaluate artificial ant solutions.", evaluator));
    193       Parameters.Add(new ValueParameter<DoubleValue>("BestKnownQuality", "The quality of the best known solution of this OneMax instance.", new DoubleValue(89)));
     193      Parameters.Add(new ValueParameter<DoubleValue>("BestKnownQuality", "The quality of the best known solution of this artificial ant instance.", new DoubleValue(89)));
    194194      Parameters.Add(new ValueParameter<ISymbolicExpressionGrammar>("ArtificialAntExpressionGrammar", "The grammar that should be used for artificial ant expressions.", grammar));
    195195      Parameters.Add(new ValueParameter<IntValue>("MaxExpressionLength", "Maximal length of the expression to control the artificial ant.", new IntValue(100)));
Note: See TracChangeset for help on using the changeset viewer.