Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/02/10 16:49:20 (14 years ago)
Author:
gkronber
Message:

Moved general set of symbols and evaluator into Encodings.SymbolicExpressionTreeEncoding. #937 (Data types and operators for symbolic expression tree encoding)

File:
1 edited

Legend:

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

    r3251 r3257  
    2727using HeuristicLab.Core;
    2828using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     29using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols;
    2930namespace HeuristicLab.Problems.ArtificialAnt {
    3031  [StorableClass]
    3132  public class ArtificialAntExpressionGrammar : Item, ISymbolicExpressionGrammar {
    32 
    33     private class EmptySymbol : Symbol { }
    3433
    3534    public ArtificialAntExpressionGrammar()
     
    3938
    4039    [Storable]
    41     private EmptySymbol startSymbol = new EmptySymbol();
     40    private StartSymbol startSymbol = new StartSymbol();
    4241    public Symbol StartSymbol {
    4342      get { return startSymbol; }
     
    5655    private Dictionary<Type, Dictionary<int, IEnumerable<Symbol>>> allowedSymbols = new Dictionary<Type, Dictionary<int, IEnumerable<Symbol>>>() {
    5756      {
    58         typeof(EmptySymbol),
     57        typeof(StartSymbol),
    5958        new Dictionary<int, IEnumerable<Symbol>>()
    6059        {
     
    9392    [Storable]
    9493    private Dictionary<Type, int> minLength = new Dictionary<Type, int>() {
    95       {typeof(EmptySymbol), 1},
     94      {typeof(StartSymbol), 1},
    9695      {typeof(IfFoodAhead), 3},
    9796      {typeof(Prog2), 3},
     
    107106    [Storable]
    108107    private Dictionary<Type, int> maxLength = new Dictionary<Type, int>() {
    109       {typeof(EmptySymbol), int.MaxValue},
     108      {typeof(StartSymbol), int.MaxValue},
    110109      {typeof(IfFoodAhead), int.MaxValue},
    111110      {typeof(Prog2), int.MaxValue},
     
    121120    [Storable]
    122121    private Dictionary<Type, int> minDepth = new Dictionary<Type, int>() {
    123       {typeof(EmptySymbol), 1},
     122      {typeof(StartSymbol), 1},
    124123      {typeof(IfFoodAhead), 1},
    125124      {typeof(Prog2), 1},
     
    136135    [Storable]
    137136    private Dictionary<Type, int> subTrees = new Dictionary<Type, int>() {
    138       {typeof(EmptySymbol), 1},
     137      {typeof(StartSymbol), 1},
    139138      {typeof(IfFoodAhead), 2},
    140139      {typeof(Prog2), 2},
Note: See TracChangeset for help on using the changeset viewer.