Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/02/13 15:11:53 (11 years ago)
Author:
ascheibe
Message:

#2069

  • renamed path parameter to robocode path
  • made number of rounds configurable
File:
1 edited

Legend:

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

    r9892 r9926  
    3535    private const string QualityParameterName = "Quality";
    3636    private const string TankProgramParameterName = "TankProgram";
    37     private const string RobocodePathParamaterName = "Path";
     37    private const string RobocodePathParamaterName = "RobocodePath";
     38    private const string NrOfRoundsParameterName = "NrOfRounds";
    3839
    3940    #region Parameters
     
    4647    public ILookupParameter<DirectoryValue> RobocodePathParameter {
    4748      get { return (ILookupParameter<DirectoryValue>)Parameters[RobocodePathParamaterName]; }
     49    }
     50    public ILookupParameter<IntValue> NrOfRoundsParameter {
     51      get { return (ILookupParameter<IntValue>)Parameters[NrOfRoundsParameterName]; }
    4852    }
    4953    #endregion
     
    5862      Parameters.Add(new LookupParameter<ISymbolicExpressionTree>(TankProgramParameterName, "The Robocode tank program to evaluate represented as a symbolic expression tree."));
    5963      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."));
    6065    }
    6166
     
    6368      ISymbolicExpressionTree tree = TankProgramParameter.ActualValue;
    6469      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));
    6671
    6772      return base.Apply();
Note: See TracChangeset for help on using the changeset viewer.