static S ai_solveQuestionInSubSpace(T3 seed, T3 lookingFor) { AI_SubSpace subSpace = new(1000); ai_setSubSpace(subSpace); try { ai_postTriple(seed); int step = 0; while (!subSpace.limitReached()) { ++step; int n = l(subSpace.webs); print("Solving question: " + lookingFor + " (step " + step + ", " + n + "/" + subSpace.limit + ")"); pcall-short { for (S term : concatLists(keys(subSpace.index), keys(subSpace.websByID))) ai_speculate(term); } L newWebs = cloneSubList(subSpace.webs, n); ai_spec_possiblyToActually(newWebs); S a = ai_text(lookingFor); if (a != null) ret a; if (l(subSpace.webs) == n) break; // No more progress } null; } finally { ai_setSubSpace(null); } }