aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/backend/modules/es/EvolutionaryStrategy.java
diff options
context:
space:
mode:
authorEduardo Pedroni <ep625@york.ac.uk>2014-04-25 19:38:16 +0100
committerEduardo Pedroni <ep625@york.ac.uk>2014-04-25 19:38:16 +0100
commitb0c0698e5503c2506217117bf144fde31e6f6601 (patch)
tree11a6e20fb565f1e75fb25852e757e4a37e4c313b /src/jcgp/backend/modules/es/EvolutionaryStrategy.java
parent9ac2848be66c39acdc291dc3b48b91178acc1a05 (diff)
Commented lots of packages.
Diffstat (limited to 'src/jcgp/backend/modules/es/EvolutionaryStrategy.java')
-rw-r--r--src/jcgp/backend/modules/es/EvolutionaryStrategy.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/jcgp/backend/modules/es/EvolutionaryStrategy.java b/src/jcgp/backend/modules/es/EvolutionaryStrategy.java
index 8ab287d..70e3cd2 100644
--- a/src/jcgp/backend/modules/es/EvolutionaryStrategy.java
+++ b/src/jcgp/backend/modules/es/EvolutionaryStrategy.java
@@ -5,8 +5,42 @@ import jcgp.backend.modules.mutator.Mutator;
import jcgp.backend.population.Population;
import jcgp.backend.resources.Resources;
+/**
+ * This interface specifies the required behaviour of an evolutionary strategy. The evolutionary
+ * strategy's job is to generate the next population of solutions. In JCGP this is done by modifying
+ * the provided population object rather than creating a new one.
+ * <br><br>
+ * A typical implementation of EvolutionaryStratey iterates through the chromosomes
+ * in the population and selects the individual(s) to be promoted. It then uses
+ * {@code mutator.mutate()} to generically mutate the promoted individual(s). Parameter-dependent
+ * strategies can be implemented by accessing the parameters via the resources
+ * argument.
+ * <br><br>
+ * Parameters may be specified to control the implemented strategy. Any parameters
+ * returned by {@code getLocalParameters()} should be displayed by the user interface,
+ * if it is being used. See {@link Parameter} for more information.
+ * <br><br>
+ * It is advisable to use {@code Resources.reportln()} and {@code Resources.report()}
+ * to print any relevant information. Note that reportln() and report() are affected
+ * by the report interval base parameter. Use {@code Resources.println()} and
+ * {@code Resources.print()} to print information regardless of the current generation.
+ * See {@link Resources} for more information.
+ *
+ * @see Module
+ *
+ * @author Eduardo Pedroni
+ *
+ */
public interface EvolutionaryStrategy extends Module {
+ /**
+ * Performs the selection algorithm and uses the mutator to create
+ * the next generation of solutions.
+ *
+ * @param population the population to evolve.
+ * @param mutator the mutator with which to mutate the promoted individuals.
+ * @param resources parameters and utilities for optional reference.
+ */
public abstract void evolve(Population population, Mutator mutator, Resources resources);
}