!752 static BWImage bw; static Thread producer; static Reproducing rp; !include #1004556 // class Reproducing p { rp = new Reproducing; bw = rp.bw = loadBWImage("#1004541"); rp.imageSurfaceToUpdateWithBest = showImage(bw.getBufferedImage()); rp.startProduction = r { produce() }; // Note: This doesn't terminate as it keeps looking for better // solutions. It does write the shortest100.txt file in the mean // time which is your real output. rp.findShortest100_openEnd(); } static void produce() { cancelThread(producer); producer = new Thread(r { // STRATEGY! rp.push(fullGrab(bw)); int w = 1; while licensed { rp.push(new RandomSolid().reproduce(bw)); S best = rp.bestDesc(); if (best != null) rp.push(varyFloat(best)); if (w < bw.getWidth()) rp.push(hrepeat(bw, w++)); } }, "Producer"); producer.start(); }