Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/11/13 15:21:01 (11 years ago)
Author:
jkarder
Message:

#2069:

  • modified the RobocodeProblem to extract all robots in robocode directory
  • modified the battle runner to take a number of enemies that should be battled
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/Interpreter.cs

    r9926 r9947  
    2626using System.Linq;
    2727using System.Reflection;
     28using HeuristicLab.Core;
     29using HeuristicLab.Data;
    2830using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2931
    3032namespace HeuristicLab.Problems.Robocode {
    3133  public static class Interpreter {
    32     public static double EvaluateTankProgram(ISymbolicExpressionTree tree, string path, string robotName = null, bool showUI = false, int nrOfRounds = 3) {
     34    public static double EvaluateTankProgram(ISymbolicExpressionTree tree, string path, ICheckedItemList<StringValue> enemies, string robotName = null, bool showUI = false, int nrOfRounds = 3) {
    3335      if (robotName == null)
    3436        robotName = GenerateRobotName();
     
    8183        evaluateCodeInfo.Arguments += " false " + nrOfRounds;
    8284      }
     85
     86      foreach (var enemy in enemies)
     87        evaluateCodeInfo.Arguments += enemy.Value + "* ";
    8388
    8489      evaluateCodeInfo.RedirectStandardOutput = true;
Note: See TracChangeset for help on using the changeset viewer.