!759 // user must include a Thinker, e.g. #1003797 // and, of course, implement makeGenerators static void solveExamples(L examples) { new Thinker thinker; bool unsolved = false, partiallySolved = false, fullySolved = false; for (int i = 0; i < l(examples); i++) { setConsoleTitle("[" + (i+1) + "/" + l(examples) + "] Solving..." + " - " + getProgramTitle()); S example = examples.get(i); print("Example " + (i+1)); L log = toLinesFullTrim(example); BitSet interestingLines = detectInterestingLines(log); int maxScore = interestingLines.cardinality(); MultiSet scores = thinker.scores(log, interestingLines); S top = scores.getMostPopularEntry(); int score = scores.get(top); S status = null; if (score >= maxScore) { status = "Example fully solved by " + quote(top) + " (" + score + "/" + maxScore + ")!"; fullySolved = true; } else if (score > 0) { status = "Example partially solved by " + quote(top) + " (" + score + "/" + maxScore + ")"; partiallySolved = true; } else { status = "Example not solved"; unsolved = true; } print(status); } int n = l(examples); S status = fullySolved && !partiallySolved && !unsolved ? n + "/" + n + " Solved" : partiallySolved ? n + " Partially solved" : n + "/" + n + " Unsolved"; print(); print(status); setConsoleTitle(status + " - " + getProgramTitle()); }