Changeset 9966 for branches/Robocode.TrunkInt
- Timestamp:
- 09/16/13 10:31:18 (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/External Evaluator/BattleRunner.java
r9947 r9966 56 56 engine.addBattleListener(new BattleObserver()); 57 57 58 // setup the battle specification 59 for (String s : robots) 60 bots += s + ", "; 61 bots = bots.substring(0, bots.length() - 1); 58 BattlefieldSpecification battlefield = new BattlefieldSpecification(800, 600); 59 RobotSpecification[] all = engine.getLocalRepository(); 60 List<RobotSpecification> selectedRobots = new ArrayList<RobotSpecification>(); 62 61 63 BattlefieldSpecification battlefield = new BattlefieldSpecification(800, 600); 64 RobotSpecification[] selectedRobots = engine.getLocalRepository(bots); 65 66 for (int i = 1; i < selectedRobots.length; i++) { 67 BattleSpecification battleSpec = new BattleSpecification(numberOfRounds, battlefield, 68 new RobotSpecification[] { selectedRobots[0], selectedRobots[i] }); 62 for(RobotSpecification rs : all) { 63 for(String r : robots) { 64 if(r.equals(rs.getClassName())) { 65 selectedRobots.add(rs); 66 } 67 } 68 } 69 70 for (int i = 1; i < selectedRobots.size(); i++) { 71 BattleSpecification battleSpec = new BattleSpecification(numberOfRounds, battlefield, 72 new RobotSpecification[] { selectedRobots.get(0), selectedRobots.get(i) }); 69 73 70 74 // run our specified battle and wait till the battle finishes -
branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/Interpreter.cs
r9962 r9966 76 76 evaluateCodeInfo.FileName = "cmd.exe"; 77 77 evaluateCodeInfo.Arguments = "/C java -cp " + battleRunnerPath + ";" + robocodeCoreJar + ";" + robocodeJar + 78 ";" + picocontainerJar + ";" + " BattleRunner Evaluation." + robotName + " *" + path;78 ";" + picocontainerJar + ";" + " BattleRunner Evaluation." + robotName + " " + path; 79 79 80 80 if (showUI) { … … 85 85 86 86 foreach (var enemy in enemies.CheckedItems) 87 evaluateCodeInfo.Arguments += enemy.Value + " *";87 evaluateCodeInfo.Arguments += enemy.Value + " "; 88 88 89 89 evaluateCodeInfo.RedirectStandardOutput = true;
Note: See TracChangeset
for help on using the changeset viewer.