Remove some debug code.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1549985 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ab0a2f761f
commit
7ebbaea90e
|
@ -142,24 +142,14 @@ public class ImageEvolutionExample {
|
||||||
noStopRequested = true;
|
noStopRequested = true;
|
||||||
Runnable r = new Runnable() {
|
Runnable r = new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
int evolution = 0;
|
||||||
double lastBestFit = Double.MIN_VALUE;
|
while (noStopRequested) {
|
||||||
int evolution = 0;
|
currentPopulation = ga.nextGeneration(currentPopulation);
|
||||||
while (noStopRequested) {
|
|
||||||
currentPopulation = ga.nextGeneration(currentPopulation);
|
|
||||||
|
|
||||||
System.out.println("generation: " + evolution++ + ": " + bestFit.toString());
|
System.out.println("generation: " + evolution++ + ": " + bestFit.toString());
|
||||||
bestFit = currentPopulation.getFittestChromosome();
|
bestFit = currentPopulation.getFittestChromosome();
|
||||||
|
|
||||||
if (lastBestFit > bestFit.getFitness()) {
|
painter.repaint();
|
||||||
System.out.println("gotcha");
|
|
||||||
}
|
|
||||||
lastBestFit = bestFit.getFitness();
|
|
||||||
painter.repaint();
|
|
||||||
}
|
|
||||||
} catch (Exception x) {
|
|
||||||
// in case ANY exception slips through
|
|
||||||
x.printStackTrace();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue