aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/backend/modules/es
diff options
context:
space:
mode:
Diffstat (limited to 'src/jcgp/backend/modules/es')
-rw-r--r--src/jcgp/backend/modules/es/TournamentSelection.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/jcgp/backend/modules/es/TournamentSelection.java b/src/jcgp/backend/modules/es/TournamentSelection.java
index 4070468..7cc9706 100644
--- a/src/jcgp/backend/modules/es/TournamentSelection.java
+++ b/src/jcgp/backend/modules/es/TournamentSelection.java
@@ -8,10 +8,10 @@ import jcgp.backend.resources.parameters.Parameter;
public class TournamentSelection implements EvolutionaryStrategy {
- private IntegerParameter tournament;
+ private IntegerParameter tournamentSize;
- public TournamentSelection() {
- tournament = new IntegerParameter(1, "Tournament size") {
+ public TournamentSelection(Resources resources) {
+ tournamentSize = new IntegerParameter(1, "Tournament size") {
@Override
public void validate(Number newValue) {
// TODO this
@@ -21,13 +21,13 @@ public class TournamentSelection implements EvolutionaryStrategy {
@Override
public Parameter<?>[] getLocalParameters() {
- return new Parameter[] {tournament};
+ return new Parameter[] {tournamentSize};
}
@Override
public void evolve(Population population, Mutator mutator,
Resources parameters) {
- tournament.set(tournament.get() + 1);
+ tournamentSize.set(tournamentSize.get() + 1);
// TODO implement this
}