- Timestamp:
- 11/19/15 11:42:02 (9 years ago)
- Location:
- stable
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 12921,12936-12938,12940,12947,13055-13058,13163,13267,13269
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.GeneticProgramming/3.3/ArtificialAnt/Interpreter.cs
r12911 r13280 32 32 public int FoodEaten { get; private set; } 33 33 public BoolMatrix World { get; private set; } 34 35 34 public ISymbolicExpressionTree Expression { get; private set; } 36 35 36 public int ElapsedTime { get; set; } 37 37 38 public int ElapsedTime { get; set; }39 38 private int currentDirection; 40 39 private int currentAntLocationRow; -
stable/HeuristicLab.Problems.GeneticProgramming/3.3/ArtificialAnt/Problem.cs
r12911 r13280 22 22 using System; 23 23 using System.Diagnostics.Contracts; 24 using System.Drawing.Text;25 24 using System.Linq; 26 25 using HeuristicLab.Common; … … 38 37 [StorableClass] 39 38 public sealed class Problem : SymbolicExpressionTreeProblem, IStorableContent { 40 public string Filename { get; set; }41 39 42 40 #region constant for default world (Santa Fe) … … 104 102 } 105 103 104 #region item cloning and persistence 105 // persistence 106 [StorableConstructor] 107 private Problem(bool deserializing) : base(deserializing) { } 108 [StorableHook(HookType.AfterDeserialization)] 109 private void AfterDeserialization() { } 110 111 // cloning 112 private Problem(Problem original, Cloner cloner) : base(original, cloner) { } 113 public override IDeepCloneable Clone(Cloner cloner) { 114 return new Problem(this, cloner); 115 } 116 #endregion 117 106 118 public Problem() 107 119 : base() { … … 114 126 g.AddSymbols(new string[] { "IfFoodAhead", "Prog2" }, 2, 2); 115 127 g.AddSymbols(new string[] { "Prog3" }, 3, 3); 116 g.AddTerminalSymbols(new string[] { " Left", "Right", "Move" });128 g.AddTerminalSymbols(new string[] { "Move", "Left", "Right" }); 117 129 base.Encoding = new SymbolicExpressionTreeEncoding(g, 20, 10); 118 130 } … … 137 149 } 138 150 139 // persistence140 [StorableConstructor]141 private Problem(bool deserializing) : base(deserializing) { }142 [StorableHook(HookType.AfterDeserialization)]143 private void AfterDeserialization() {144 }145 146 // cloning147 private Problem(Problem original, Cloner cloner)148 : base(original, cloner) {149 }150 public override IDeepCloneable Clone(Cloner cloner) {151 return new Problem(this, cloner);152 }153 154 151 #region helpers 155 152 private bool[,] ToBoolMatrix(char[][] ch) { -
stable/HeuristicLab.Problems.GeneticProgramming/3.3/ArtificialAnt/Trail.cs
r12911 r13280 20 20 #endregion 21 21 22 using System;23 22 using System.Drawing; 24 23 using HeuristicLab.Common; … … 54 53 } 55 54 55 #region item cloning and persistence 56 56 [StorableConstructor] 57 57 private Solution(bool deserializing) : base(deserializing) { } … … 70 70 return new Solution(this, cloner); 71 71 } 72 #endregion 72 73 } 73 74 }
Note: See TracChangeset
for help on using the changeset viewer.