Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/23/16 22:49:24 (8 years ago)
Author:
abeham
Message:

#2526: updated robocode sample and unit test to create a valid sample even if jdk was not installed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPRobocodeSampleTest.cs

    r14185 r14206  
    2323using System.Linq;
    2424using HeuristicLab.Algorithms.GeneticAlgorithm;
     25using HeuristicLab.Data;
    2526using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2627using HeuristicLab.Persistence.Default.Xml;
     
    4950
    5051      #region Problem Configuration
    51       Problem antProblem = new Problem();
     52      Problem robocodeProblem = new Problem();
     53      if (!robocodeProblem.Enemies.CheckedItems.Any())
     54        robocodeProblem.Enemies.Add(new StringValue("sample.Crazy"));
    5255      #endregion
    5356      #region Algorithm Configuration
    5457      ga.Name = "Genetic Programming - Robocode Java Source";
    5558      ga.Description = "A standard genetic programming algorithm to evolve the java source code for a robocode bot (see http://robocode.sourceforge.net/). An installation of Java SE Developmen Kit (JDK) >= 1.6 is necessary to run this sample.";
    56       ga.Problem = antProblem;
     59      ga.Problem = robocodeProblem;
    5760      SamplesUtils.ConfigureGeneticAlgorithmParameters<TournamentSelector, SubtreeCrossover, MultiSymbolicExpressionTreeArchitectureManipulator>(
    5861        ga, 50, 1, 50, 0.15, 2);
Note: See TracChangeset for help on using the changeset viewer.