!752 static new L tests; static Thread producer; static Reproducing rp; static ImageSurface imageSurface; !include #1004562 // column prediction !include #1004570 // predictors sclass Test { float[][] cols; int x1; // where we start testing *() {} *(float[][] *cols, int *x1) {} } p { tests.add(makeTest("ABC", "X")); tests.add(makeTest("DEF", "X")); showBWImage(columnsToImage(tests.get(0).cols)); /* rp = new Reproducing; imageSurface = showBWImage(bw); rp.bw = bw; //rp.imageSurfaceToUpdateWithBest = showImage(bw.getBufferedImage()); //rp.startProduction = r { produce() }; //rp.search(); //showColumnErrors("LookLeft(width=8)"); produce(); while licensed { S desc = grabFromQueue(rp.newProducts); Predictor p = makePredictor(desc); float[][] cols = rp.getCols(); double score = testColumnRange(p, cols, 0, 15, l(cols)); print(desc); print(" " + score); //imageSurface.setImage(renderPrediction(desc, cols)); } */ } static void produce() { cancelThread(producer); producer = new Thread(r { // STRATEGY! rp.push("RepeatColumn"); rp.push("ShiftDown"); rp.push("LookLeft(width=7)"); rp.push("LookLeft(width=8)"); rp.push("LookLeft(width=9)"); rp.push("LookLeft(width=10)"); }, "Producer"); producer.start(); } static Test makeTest(S l, S r) { BWImage a = renderTheText(l + " = "), b = renderTheText(l + " = " + r); ret new Test(imageToColumns(b), a.getWidth()); } static Font renderTheText_font; static BWImage renderTheText(S s) { if (renderTheText_font == null) renderTheText_font = loadFont("#1004569"); // "Ticketing" ret new BWImage(renderText(renderTheText_font, 20f, s)); }