static bool matchCondition_random(Lisp condition, Map m) { L facts = lispTruth(); O evaluator = getLispEvaluator(condition.head); if (evaluator != null) ret isTrue(callF(evaluator, lispReplaceVars(condition, m))); L> candidates = new L; for (Lisp fact : facts) { Map m2 = cloneMap(m); if (lispMatchIC_xyzVars_sub(condition, fact, m2)) candidates.add(m2); } //print("Have " + n(candidates, "candidate")); if (empty(candidates)) false; m.putAll(random(candidates)); true; }