!7 sS theRiddle = [[ What is Fibonacci number 0? What is Fibonacci number 1? What is Fibonacci number 2? What is Fibonacci number 3? ]]; sS theFacts = [[ Fibonacci number n is Fibonacci number n-1 plus Fibonacci number n-2 if n > 2. There is no Fibonacci number with a negative index. There is no Fibonacci number 0. Fibonacci number 1 is 1. Fibonacci number 2 is 1. ]]; sS concepts = [[ ]]; !include #1007689 // Web v2 static L facts; p { aiEnhancements(); aiConcepts_noAutoClear(); //useConceptsDump(concepts); set englishToConceptLanguage_useBrackets; facts = clParse(printNumberedLines(linesToCL(theFacts))); printNumberedLines(facts); print(); for (S rid : toLinesFullTrim(theRiddle)) { print("? " + rid); Lisp riddle = clParse(englishToConceptLanguage(rid)); //print("# " + riddle); new Web web; web.relations(facts); web_expandMarkers(web); if (riddle.is("urfkhwfasdaqqqse", "mrhggsmuykeceghd")) { // What is X? // What is the decimal representation of X? S x = str(riddle.get(0)); L l = listWithout(web.findNode(x).labels, x); //print("Labels: " + l); S s = chooseALabelToReturn(l); print(">> " + or2(conceptLanguageToEnglish(unquote(s)), "I don't know")); } //print(web); } } sS chooseALabelToReturn(L l) { S s = findInteger(l); if (s == null) s = firstGlobalID(l); //if (s == null) s = random(l); if (s == null) ret s = first(l); ret s; }