Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/20/13 14:01:58 (11 years ago)
Author:
ascheibe
Message:

#2069

  • qualities are now scaled between 0 and 1
  • fixed naming of robots
File:
1 edited

Legend:

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

    r9882 r9884  
    3535      try {
    3636        outputname = Guid.NewGuid().ToString();
    37         outputname = outputname.Replace('-', '_');
    38         outputname = "Robocode" + outputname;
     37        outputname = outputname.Remove(8, 1);
     38        outputname = outputname.Remove(12, 1);
     39        outputname = outputname.Remove(16, 1);
     40        outputname = outputname.Remove(20, 1);
     41        outputname = outputname.Remove(0, 1);
     42        outputname = outputname.Insert(0, "R");
     43
    3944        string output = interpretedProgram.Replace("class output", "class " + outputname);
    4045        File.WriteAllText(path + "/robots/Evaluation/" + outputname + ".java", output, System.Text.Encoding.Default);
     
    8792
    8893      string scoreString = "";
    89       double evaluation = -900;
     94      double evaluation = -1.0;
    9095      try {
    9196        scoreString = evaluateCode.StandardOutput.ReadToEnd().Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries).Last();
Note: See TracChangeset for help on using the changeset viewer.