/**
  * 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 <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);
 }
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);
  }