int mutations = (Integer) task;
int numPixels = width * height;
double mutationsPerPixel = (double) mutations / (double) numPixels;
double lightImageWeight = 1.0 / mutationsPerPixel;
Path x = null;
double fy;
double fx = 0.0;
List<Contribution> cx = new ArrayList<Contribution>();
List<Contribution> cy = new ArrayList<Contribution>();
boolean accept;
initialize();
raster.get().clear();
mutations += initialMutations;
for (int i = 0; i < mutations; i++) {
if (!monitor.notifyProgress(i, mutations))
return null;
cy.clear();
Path y = (x != null) ? mutate(x) : generateNewPath();
Color score = join(y.getLightTail(), y.getEyeTail(),
lightImageWeight, cy);
if (score != null) {
Point2 p = y.getPointOnImagePlane();
cy.add(new Contribution(p, score));
}
fy = evaluate(cy);