| java.lang.Object examples.dynamicMutation.DynamicMutationExample
DynamicMutationExample | public class DynamicMutationExample (Code) | | Experiment on how to dynamically adapt the mutation rate for different
genes. This example works with coins (see MinimizingMakeChange for
documentation). The idea is that a quarter has more impact onto the solution
than a penny, so a quarter should mutate less frequently, probably.
author: Klaus Meffert since: 2.6 |
Method Summary | |
public static void | main(String[] args) Main method. | public static void | makeChangeForAmount(int a_targetChangeAmount) Executes the genetic algorithm to determine the minimum number of
coins necessary to make up the given target amount of change. |
main | public static void main(String[] args) throws Exception(Code) | | Main method. A single command-line argument is expected, which is the
amount of change to create (in other words, 75 would be equal to 75
cents).
Parameters: args - amount of change in cents to create throws: Exception - author: Neil Rotstan author: Klaus Meffert since: 1.0 |
makeChangeForAmount | public static void makeChangeForAmount(int a_targetChangeAmount) throws Exception(Code) | | Executes the genetic algorithm to determine the minimum number of
coins necessary to make up the given target amount of change. The
solution will then be written to System.out.
Parameters: a_targetChangeAmount - the target amount of change for which thismethod is attempting to produce the minimum number of coins throws: Exception - author: Neil Rotstan author: Klaus Meffert since: 1.0 |
|
|