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