Exemplo n.º 1
0
 /** @see junit.framework.TestCase#setUp() */
 protected void setUp() throws Exception {
   props.loadFromResource(PROP_PATH);
   surfaceDimension =
       new Dimension(
           props.getIntProperty(Surface.SURFACE_WIDTH_KEY),
           props.getIntProperty(Surface.SURFACE_HEIGHT_KEY));
   assertEquals(
       "wrong width for medium test image",
       (int) surfaceDimension.getWidth(),
       MEDIUM_IMG.getWidth());
   assertEquals(
       "wrong height for medium test image",
       (int) surfaceDimension.getHeight(),
       MEDIUM_IMG.getHeight());
 }
Exemplo n.º 2
0
 public void init(Properties props) {
   super.init(props);
   logChampPerGens = props.getIntProperty(LOG_CHAMP_PERGENS_KEY, logChampPerGens);
   fitnessCalculator =
       (TargetFitnessCalculator) props.newObjectProperty(TargetFitnessCalculator.class);
   ((AHNIRunProperties) props).getEvolver().addEventListener(this);
 }
Exemplo n.º 3
0
  /** @see Configurable#init(Properties) */
  public void init(Properties props) {
    super.init(props);

    activationFunction =
        ActivationFunctionFactory.getInstance()
            .get(props.getProperty(HYPERNEAT_ACTIVATION_FUNCTION_KEY));

    if (!feedForward) cyclesPerStep = props.getIntProperty(SUBSTRATE_CYCLES_PER_STEP);

    cppnTranscriber = (AnjiNetTranscriber) props.singletonObjectProperty(AnjiNetTranscriber.class);
  }