Changeset 9892 for branches/Robocode.TrunkInt
- Timestamp:
- 08/21/13 16:24:41 (11 years ago)
- Location:
- branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/BestSolutionAnalyzer.cs
r9880 r9892 57 57 get { return (ILookupParameter<ResultCollection>)Parameters[ResultsParameterName]; } 58 58 } 59 public ILookupParameter< StringValue> RobocodePathParameter {60 get { return (ILookupParameter< StringValue>)Parameters[RobocodePathParamaterName]; }59 public ILookupParameter<DirectoryValue> RobocodePathParameter { 60 get { return (ILookupParameter<DirectoryValue>)Parameters[RobocodePathParamaterName]; } 61 61 } 62 62 #endregion … … 72 72 Parameters.Add(new LookupParameter<Solution>(BestSolutionParameterName, "The best tank program.")); 73 73 Parameters.Add(new LookupParameter<ResultCollection>(ResultsParameterName, "The result collection of the algorithm.")); 74 Parameters.Add(new LookupParameter< StringValue>(RobocodePathParamaterName, "Path of the Robocode installation."));74 Parameters.Add(new LookupParameter<DirectoryValue>(RobocodePathParamaterName, "Path of the Robocode installation.")); 75 75 } 76 76 -
branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/Interpreter.cs
r9891 r9892 35 35 36 36 string interpretedProgram = InterpretProgramTree(tree.Root, robotName); 37 string formattedPath = path.Replace("/", "\\");38 37 string battleRunnerPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); 39 38 … … 47 46 ProcessStartInfo javaCompileInfo = new ProcessStartInfo(); 48 47 javaCompileInfo.FileName = "cmd.exe"; 49 javaCompileInfo.Arguments = "/C javac -cp " + formattedPath + "\\libs\\robocode.jar " +50 formattedPath + "\\robots\\Evaluation\\" + robotName + ".java";48 javaCompileInfo.Arguments = "/C javac -cp " + path + "\\libs\\robocode.jar " + 49 path + "\\robots\\Evaluation\\" + robotName + ".java"; 51 50 javaCompileInfo.RedirectStandardOutput = true; 52 51 javaCompileInfo.RedirectStandardError = true; … … 74 73 75 74 evaluateCodeInfo.FileName = "cmd.exe"; 76 evaluateCodeInfo.Arguments = "/C java -classpath " + battleRunnerPath + ";" + formattedPath + "\\libs\\robocode.core-1.8.1.0.jar;" + formattedPath + "\\libs\\robocode.jar;" +77 formattedPath + "\\libs\\picocontainer-2.14.2.jar BattleRunner Evaluation." +78 robotName + "* " + formattedPath;75 evaluateCodeInfo.Arguments = "/C java -classpath " + battleRunnerPath + ";" + path + "\\libs\\robocode.core-1.8.1.0.jar;" + path + "\\libs\\robocode.jar;" + 76 path + "\\libs\\picocontainer-2.14.2.jar BattleRunner Evaluation." + 77 robotName + "* " + path; 79 78 if (showUI) 80 79 evaluateCodeInfo.Arguments += " true"; -
branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/RobocodeEvaluator.cs
r9881 r9892 44 44 get { return (ILookupParameter<ISymbolicExpressionTree>)Parameters[TankProgramParameterName]; } 45 45 } 46 public ILookupParameter< StringValue> RobocodePathParameter {47 get { return (ILookupParameter< StringValue>)Parameters[RobocodePathParamaterName]; }46 public ILookupParameter<DirectoryValue> RobocodePathParameter { 47 get { return (ILookupParameter<DirectoryValue>)Parameters[RobocodePathParamaterName]; } 48 48 } 49 49 #endregion … … 57 57 Parameters.Add(new LookupParameter<DoubleValue>(QualityParameterName, "The solution quality of the Robocode tank program.")); 58 58 Parameters.Add(new LookupParameter<ISymbolicExpressionTree>(TankProgramParameterName, "The Robocode tank program to evaluate represented as a symbolic expression tree.")); 59 Parameters.Add(new LookupParameter< StringValue>(RobocodePathParamaterName, "Path of the Robocode installation."));59 Parameters.Add(new LookupParameter<DirectoryValue>(RobocodePathParamaterName, "Path of the Robocode installation.")); 60 60 } 61 61 -
branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/RobocodeProblem.cs
r9880 r9892 55 55 get { return (IValueParameter<Grammar>)Parameters[TankGrammarParameterName]; } 56 56 } 57 public IFixedValueParameter< StringValue> RobocodePathParameter {58 get { return (IFixedValueParameter< StringValue>)Parameters[RobocodePathParamaterName]; }57 public IFixedValueParameter<DirectoryValue> RobocodePathParameter { 58 get { return (IFixedValueParameter<DirectoryValue>)Parameters[RobocodePathParamaterName]; } 59 59 } 60 60 #endregion … … 70 70 public RobocodeProblem() 71 71 : base(new RobocodeEvaluator(), new RampedHalfAndHalfTreeCreator()) { 72 DirectoryValue robocodeDir = new DirectoryValue(); 73 robocodeDir.Value = @"C:\robocode"; 74 72 75 Parameters.Add(new FixedValueParameter<IntValue>(MaxTankProgramDepthParameterName, "Maximal depth of the Robocode tank program.", new IntValue(6))); 73 76 Parameters.Add(new FixedValueParameter<IntValue>(MaxTankProgramLengthParameterName, "Maximal length of the tank program.", new IntValue(1000))); 74 77 Parameters.Add(new ValueParameter<Grammar>(TankGrammarParameterName, "Grammar for the tank program.", new Grammar())); 75 Parameters.Add(new FixedValueParameter< StringValue>(RobocodePathParamaterName, "Path of the Robocode installation.", new StringValue("C:/robocode")));78 Parameters.Add(new FixedValueParameter<DirectoryValue>(RobocodePathParamaterName, "Path of the Robocode installation.", robocodeDir)); 76 79 77 80 Maximization.Value = true;
Note: See TracChangeset
for help on using the changeset viewer.