abstract sclass Agent { Collection concepts; // input new LinkedHashSet statements; // output int duplicates; // number of already known statements emitted abstract void impl(); void emit(Lisp l) { emit(clUnparse(l)); } void emit(S s) { if (!isTruth(s) && statements.add(s)) print("> " + s + " - " + conceptLanguageToEnglish(s)); else ++duplicates; } void runLive(bool doIt) { concepts = aiConcepts(); statements.clear(); impl(); S s = "Have " + n(statements, "statements") + " to add"; if (duplicates != 0) s += " (+" + n(duplicates, "duplicate") + ")"; print(s); if (doIt) { print("ADDING."); addTruth(statements); } } void doIt { runLive(true); } void testRun { runLive(false); } void runLive(S[] args) { runLive(eqic(get(args, 0), "doit")); } }