Remove focus set from URE?
ngeiswei opened this issue · 4 comments
Now that the URE supports having rule-base and knowledge in different atomspaces opencog/atomspace#1983 I wonder if we need to keep focus set support. I've never used it personally. Is anybody using it? Or has the intention of using it in the future?
relex2logic uses it and is used in ghost-pln-demo. The purpose of the focus-set was to restrict the set of atoms used during inference, similar to #:attention-allocation
in cog-fc
but generic. If that is still possible during configuration steps, or another utility function, then it would be ok.
You could use a separate atomspace instead, but if you're using it then it's better to let it there for now.
I think the intent of the focus set is that it would be changing frequently. Which is partly the point of opencog/atomspace#1967. The focus set is an example of a recurring theme:
-
The need to limit some operation to some smaller set of atoms.
-
The need to restrict the pattern matcher to a smaller set of atoms. (This is already done using MapLink, which is "just like BindLink" but for a smaller set of atoms) https://wiki.opencog.org/w/MapLink
-
Problem: URE is built on BindLink, instead of on MapLink. Gee, it sure would be nice if we could merge MapLink and BindLink so that they are both the same thing, so that we would not need both of them!
-
Problem: MapLink uses a SetLink for the "focus set"
-
Problem: using SetLink for focus sets is a "known issue": opencog/atomspace#1502
-
Problem: using multiple atomspaces for focus sets is .. not easy. Issue opencog/atomspace#1967
Thus, opencog/atomspace#1967 is a vague, general attempt to somehow implement a fast, high-speed, generic "focus set" that works the same way, everywhere -- with the attention bank, with MapLink, with ContextLink, with other subsystems. (i.e. so that we could remove special-case code for the focus set from the URE...)
FYI, This might be maybe useful (and maybe not): I just now added AttentionValueOfLink
and StiOfLink
, etc in opencog/atomspace#2033; this can be used in used the patern matcher to find atoms with attention value above or below some threshold (or some generic complicated formula involving av, tv, etc.).
when that is merged, take a look at value-of.scm
on how to do those kinds of searches.