!752 !include #1005875 // Distinguisher please include function img_upperWidthToLowerWidth. please include function img_averageWidthDividedByHeight. please include function img_centralPixelSet. please include function img_leftishness. concepts. concept Task { S characters; // the 2 characters to distinguish from each other S font; // Font name or snippet ID new BitSet fontSizes; new RefL solutions; } concept VirtFunc { S javaCode; } /* concept Discriminator {} Discriminator > FunctionValue { S name; // including the "img_" float threshold; S comparator; // lt, !lt, gt, !gt, eq, ne } */ sS font = "#1004569"; static float size = 10f; static BWImage render(S text) { ret autoCroppedBWImage(renderText(font, size, text)); } p { //showBWImage(render("01")); new Distinguisher d; for (final S f : splitAtSpace("upperWidthToLowerWidth averageWidthDividedByHeight centralPixelSet leftishness")) d.addFunction(f, func(BWImage img) { call(mc(), "img_" + f, img) }); print("Got " + l(d.functions) + " functions."); int lastQuality = -1; for (size = 60f; size >= 10f; size--) { print("Rendering size " + (int) size); d.analyze(ll(render("0"), render("1"))); int quality = d.quality(); if (quality != lastQuality) { print("Distinguisher quality now: " + quality); if (quality == 0) break; lastQuality = quality; } } d.printStuff(); }