static Map ai_gc_distanceFunction_backwardValues = litcimap( "is", 1, [[is "a"]], 0.1, [[unquotes to]], 0.1, "probably is", 1, ); // returns NaN if not a relevant connection static double ai_gc_distanceFunction(S rel, bool forward) { if (forward) ret 1; // all forward connections matter if (!forward) { rel = dropSuffix(":", rel); Number n = ai_gc_distanceFunction_backwardValues.get(rel); if (n != null) ret toDouble(n); } ret nan(); }