|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.htwdd.rosenkoenig.ga.NetworkFitness
public class NetworkFitness
A FitnessFunction to calculate the fitness of a neural net which could be applied to
an artificial player.
To calculate the fitness, the neural network has to be trained, which is a very time consuming
process. NetworkFitness does not use realistic numbers of training cycles (e.g. 1000
or more) but trains the network for about 25 cycles. So this fitness function can only
approximate if a chromosome could be appropriate for artificial players. NetworkFitness
does not calculate a mathematically correct fitness!
See the Rosenkoenig online documentation for more detailed information.
| Field Summary | |
|---|---|
private Backpropagation |
backprop
|
private java.util.ArrayList<Pattern> |
ffPatterns
Training patterns to train a Feed Forward Neural Network. |
private int |
index
Index of the FitnessFunction. |
private int[] |
layerSizes
|
private org.apache.log4j.Logger |
log
|
private static int |
numFunctions
Static member that holds the number of instances of NetworkFitness present in the current process. |
private java.util.ArrayList<double[]> |
somPatterns
Training patterns for SOM training. |
private boolean |
useSom
|
| Constructor Summary | |
|---|---|
NetworkFitness()
Creates a new fitness function and initializes the training data. |
|
| Method Summary | |
|---|---|
double |
computeFitness(java.util.BitSet chromosome)
Calculates the fitness for a given chromosome. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static int numFunctions
private int index
private org.apache.log4j.Logger log
private java.util.ArrayList<double[]> somPatterns
private java.util.ArrayList<Pattern> ffPatterns
private int[] layerSizes
private boolean useSom
private Backpropagation backprop
| Constructor Detail |
|---|
public NetworkFitness()
| Method Detail |
|---|
public double computeFitness(java.util.BitSet chromosome)
computeFitness in interface de.htwdd.ga.FitnessFunction
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||