Changeset 9926 for branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/RobocodeEvaluator.cs
- Timestamp:
- 09/02/13 15:11:53 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/RobocodeEvaluator.cs
r9892 r9926 35 35 private const string QualityParameterName = "Quality"; 36 36 private const string TankProgramParameterName = "TankProgram"; 37 private const string RobocodePathParamaterName = "Path"; 37 private const string RobocodePathParamaterName = "RobocodePath"; 38 private const string NrOfRoundsParameterName = "NrOfRounds"; 38 39 39 40 #region Parameters … … 46 47 public ILookupParameter<DirectoryValue> RobocodePathParameter { 47 48 get { return (ILookupParameter<DirectoryValue>)Parameters[RobocodePathParamaterName]; } 49 } 50 public ILookupParameter<IntValue> NrOfRoundsParameter { 51 get { return (ILookupParameter<IntValue>)Parameters[NrOfRoundsParameterName]; } 48 52 } 49 53 #endregion … … 58 62 Parameters.Add(new LookupParameter<ISymbolicExpressionTree>(TankProgramParameterName, "The Robocode tank program to evaluate represented as a symbolic expression tree.")); 59 63 Parameters.Add(new LookupParameter<DirectoryValue>(RobocodePathParamaterName, "Path of the Robocode installation.")); 64 Parameters.Add(new LookupParameter<IntValue>(NrOfRoundsParameterName, "Nr. of Rounds a Robot has to fight against each opponent.")); 60 65 } 61 66 … … 63 68 ISymbolicExpressionTree tree = TankProgramParameter.ActualValue; 64 69 string path = RobocodePathParameter.ActualValue.Value; 65 QualityParameter.ActualValue = new DoubleValue(Interpreter.EvaluateTankProgram(tree, path ));70 QualityParameter.ActualValue = new DoubleValue(Interpreter.EvaluateTankProgram(tree, path, null, false, NrOfRoundsParameter.ActualValue.Value)); 66 71 67 72 return base.Apply();
Note: See TracChangeset
for help on using the changeset viewer.