status = ParameterStatus.VALID;
}
}
};
inputs = new IntegerMonitor(3, "Inputs");
outputs = new IntegerMonitor(3, "Outputs");
populationSize = new IntegerParameter(5, "Population", false, true) {
@Override
public void validate(Number newValue) {
if (newValue.intValue() <= 0) {
status = ParameterStatus.INVALID;
status.setDetails("Population size must be at least 1.");
} else {
status = ParameterStatus.VALID;
}
}
};
levelsBack = new IntegerParameter(2, "Levels back", false, true) {
@Override
public void validate(Number newValue) {
if (newValue.intValue() <= 0) {
status = ParameterStatus.INVALID;
status.setDetails("Levels back must be at least 1.");
} else if (newValue.intValue() > columns()) {
status = ParameterStatus.INVALID;
status.setDetails("Levels back must be less than or equal to the number of columns.");
} else {
status = ParameterStatus.VALID;
}
}
};
generations = new IntegerParameter(1000000, "Generations") {
@Override
public void validate(Number newValue) {
if (newValue.intValue() <= 0) {
status = ParameterStatus.INVALID;
status.setDetails("Number of generations must be greater than 0.");
} else if (newValue.intValue() < currentGeneration.get()) {
status = ParameterStatus.WARNING_RESET;
status.setDetails("Setting generations to less than the current generation will cause the experiment to restart.");
} else {
status = ParameterStatus.VALID;
}
}
};
currentGeneration = new IntegerMonitor(1, "Generation");
runs = new IntegerParameter(5, "Runs") {
@Override
public void validate(Number newValue) {
if (newValue.intValue() <= 0) {
status = ParameterStatus.INVALID;
status.setDetails("Number of runs must be greater than 0.");
} else if (newValue.intValue() < currentRun.get()) {
status = ParameterStatus.WARNING_RESET;
status.setDetails("Setting runs to less than the current run will cause the experiment to restart.");
} else {
status = ParameterStatus.VALID;
}
}
};
currentRun = new IntegerMonitor(1, "Run");
arity = new IntegerMonitor(0, "Max arity");
seed = new IntegerParameter(1234, "Seed", false, true) {
@Override
public void validate(Number newValue) {
status = ParameterStatus.VALID;