}
private MutSeqVerf measureMut;
public void createUniversalityCharts(EnvironmentEA env, ParCollection params) {
DescriptiveStatistics stat = new DescriptiveStatistics();
String chartNamePrefix = "UnivChart-Level";
String[] columns = new String[] {"Fitness", "StdDev+", "StdDev-", "Max", "Min"};
for (int level = 1; level < this.levelAnzahl() - 1; level++) {
String chartName = chartNamePrefix + level;
this.chartNames.add(chartName);
MeasureTranslatorGenerality measure = new MeasureTranslatorGenerality(this.measureMut, 99, 100, 100, rand, params);
for (RobEA rob : env.getAgents()) {
List<Integer> werte = measure.measureManyTimes(this.getAutomat(rob.id(), level, env), 3);
double sum = 0;
// Durchschnitt berechnen.
for (double d : werte) {
sum += d;
}
stat.addValue(1 / (sum / werte.size()));
}
ChartEvent event1 = new ChartEvent(chartName, columns[0], stat.getMean());
ChartEvent event2 = new ChartEvent(chartName, columns[1], stat.getMean() + stat.getStandardDeviation());
ChartEvent event3 = new ChartEvent(chartName, columns[2], stat.getMean() - stat.getStandardDeviation());
ChartEvent event4 = new ChartEvent(chartName, columns[3], stat.getMax());
ChartEvent event5 = new ChartEvent(chartName, columns[4], stat.getMin());
event1.setyAxisLabel("Universality");
event1.setLineColor(Color.black);
event1.setLineStroke(new BasicStroke(3));
event2.setLineColor(Color.gray);