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);
 }
 /**
  * Note: this object overrides <code>aMatch</code> countOpponentResults to <code>true</code>
  *
  * @see com.anji.util.Configurable#init(com.anji.util.Properties)
  */
 public void init(Properties props) throws Exception {
   Randomizer randomizer = (Randomizer) props.singletonObjectProperty(Randomizer.class);
   String componentName = props.getProperty(SimpleTournament.COMPONENT_GAME_KEY);
   Game aGame = (Game) props.newObjectProperty(componentName);
   init(
       aGame,
       (ScoringWeights) props.singletonObjectProperty(ScoringWeights.class),
       randomizer.getRand());
 }
  /** @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);
  }
 /** @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());
 }
 /**
  * See <a href=" {@docRoot}/params.htm" target="anji_params">Parameter Details </a> for specific
  * property settings.
  *
  * @param props configuration parameters
  */
 public void init(Properties props) {
   String baseDirStr = props.getProperty(BASE_DIR_KEY);
   baseDir = new File(baseDirStr);
   baseDir.mkdirs();
   if (!baseDir.exists())
     throw new IllegalArgumentException("base directory does not exist: " + baseDirStr);
   if (!baseDir.isDirectory())
     throw new IllegalArgumentException("base directory is a file: " + baseDirStr);
   if (!baseDir.canWrite())
     throw new IllegalArgumentException("base directory not writable: " + baseDirStr);
 }
 /**
  * See <a href=" {@docRoot} /params.htm" target="anji_params">Parameter Details </a> for specific
  * property settings.
  *
  * @param props configuration data
  */
 public void init(Properties props) {
   db = (Persistence) props.singletonObjectProperty(Persistence.PERSISTENCE_CLASS_KEY);
   persistAllChroms = props.getBooleanProperty(PERSIST_ALL_CHROMOSOMES_KEY);
   persistChamps = props.getBooleanProperty(PERSIST_CHAMPIONS_KEY);
   persistLastGen = props.getBooleanProperty(PERSIST_LAST_GEN_KEY);
 }
 /** @see com.anji.util.Configurable#init(com.anji.util.Properties) */
 public void init(Properties props) throws Exception {
   randomizer = (Randomizer) props.singletonObjectProperty(Randomizer.class);
 }