Changeset 3257 for trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/ArtificialAntExpressionGrammar.cs
- Timestamp:
- 04/02/10 16:49:20 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/ArtificialAntExpressionGrammar.cs
r3251 r3257 27 27 using HeuristicLab.Core; 28 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols; 29 30 namespace HeuristicLab.Problems.ArtificialAnt { 30 31 [StorableClass] 31 32 public class ArtificialAntExpressionGrammar : Item, ISymbolicExpressionGrammar { 32 33 private class EmptySymbol : Symbol { }34 33 35 34 public ArtificialAntExpressionGrammar() … … 39 38 40 39 [Storable] 41 private EmptySymbol startSymbol = new EmptySymbol();40 private StartSymbol startSymbol = new StartSymbol(); 42 41 public Symbol StartSymbol { 43 42 get { return startSymbol; } … … 56 55 private Dictionary<Type, Dictionary<int, IEnumerable<Symbol>>> allowedSymbols = new Dictionary<Type, Dictionary<int, IEnumerable<Symbol>>>() { 57 56 { 58 typeof( EmptySymbol),57 typeof(StartSymbol), 59 58 new Dictionary<int, IEnumerable<Symbol>>() 60 59 { … … 93 92 [Storable] 94 93 private Dictionary<Type, int> minLength = new Dictionary<Type, int>() { 95 {typeof( EmptySymbol), 1},94 {typeof(StartSymbol), 1}, 96 95 {typeof(IfFoodAhead), 3}, 97 96 {typeof(Prog2), 3}, … … 107 106 [Storable] 108 107 private Dictionary<Type, int> maxLength = new Dictionary<Type, int>() { 109 {typeof( EmptySymbol), int.MaxValue},108 {typeof(StartSymbol), int.MaxValue}, 110 109 {typeof(IfFoodAhead), int.MaxValue}, 111 110 {typeof(Prog2), int.MaxValue}, … … 121 120 [Storable] 122 121 private Dictionary<Type, int> minDepth = new Dictionary<Type, int>() { 123 {typeof( EmptySymbol), 1},122 {typeof(StartSymbol), 1}, 124 123 {typeof(IfFoodAhead), 1}, 125 124 {typeof(Prog2), 1}, … … 136 135 [Storable] 137 136 private Dictionary<Type, int> subTrees = new Dictionary<Type, int>() { 138 {typeof( EmptySymbol), 1},137 {typeof(StartSymbol), 1}, 139 138 {typeof(IfFoodAhead), 2}, 140 139 {typeof(Prog2), 2},
Note: See TracChangeset
for help on using the changeset viewer.