!7 sS facts = [[ We want to find out what is more correct than what. "not correct" is a candidate. "maybe quite correct" is a candidate. "really really correct" is a candidate. "buggy" is a candidate. "total garbage" is a candidate. "incorrect" is a candidate. "almost correct" is a candidate. "absolutely correct" is a candidate. "very correct" is a candidate. [nfhwfngqkgoqtngs] (X is a candidate.) and (Y is a candidate.) and (X <> Y) and (I don't know if (X is more correct than Y.)) => (Ask (Is X # more correct than Y?)) ]]; sS concepts = [[ phkdhqkhzytkwdpb - (X) and (Y) and (Z) and (AA) => (AB) cdzttdbxadjreorm - We want to find out what is X than what. ogqdgzepqbunuuht - X is a candidate. psrgtxwtfzmfzhsx - Is X Y than Z? hszwyiyetuuhcfwz - Is X # Y than Z? qgxjwufpfzkqvmxb - X is Y than Z. ylvaoplzguvhegka - X is not Y than Z. buahjsodljsaxvaq - X <> Y fxxathfdlfzgmaov - Ask (X) mzdvauejerzefagk - I don't know if (X) ltyqczktgtjxrtlf - more correct zveeggveflecjwvr - total garbage wolealpbqkkqkvqq - not correct tomkbzlqlpeiekvu - maybe quite correct dnxyynujqydgcxcd - really really correct trajdgvqepyhsumb - buggy lwikikhkydtewtjc - incorrect muxjpepnjiyjghwj - almost correct wtnpjovqqiswlyay - absolutely correct bmliokweerblfxco - very correct ]]; p-tt { centerConsole(); substance(); // customize parsing set englishToConceptLanguage_unquote; set englishToConceptLanguage_simple_noXYZ; useConceptsAndStatements(concepts, facts); printLispStatements(); // process the rule Lisp rule = getLispTruth("nfhwfngqkgoqtngs"); L conditions = dropLast(rule.args); Lisp out = last(rule.args); //for (Lisp cond : conditions) print("Condition: " + cond); new Map matches; if (matchConditions_random(conditions, matches)) { print("Yo! " + struct(matches)); //web.node(lispReplaceVars(out, matches)); } } static bool matchConditions_random(L conditions, Map m) { if (empty(conditions)) true; Lisp condition = first(conditions); ret matchCondition_random(condition, m); } static bool matchCondition_random(Lisp condition, Map m) { L facts = lispTruth(); 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")); m.putAll(random(candidates)); false; }