!752 !include #1003606 // GenTesting static int n = 4; static S solverID = "#1003632"; p { // Just call another program's function... JavaX makes it possible! O mainProg = hotwire("#1003582"); L log = cast call(mainProg, "loadLog"); printStructureLines(log); // assume command is in last line... log = dropLast(log); // shrink to number of wanted entries log = getLast(log, n); GenTesting test = new GenTesting(voidfunc(L gens, L log) { makeGenerators(gens, log); }); test.comparison = "match"; int score = test.scoreGenerator(log, solverID); if (score > 0) { print("Yay! Solved! (" + score + "/" + n + ")"); print("Recommending..."); callOpt(mainProg, "recommendSolver", solverID); } else print("Not solved..."); } // put func {}'s returning a string in there static void makeGenerators(L l, final L log) { gen(l, solverID, func { //print("Hotwiring"); O c = hotwireCached(solverID); //print("Calling " + c); S s = cast call(c, "calc", log); //print("=> " + s); ret s; }); }