Comments (11)
Meta-rules are almost completely supported by the URE, however building inference trees with them is trickier than I thought so what the forward and backward chainers are doing for now is merely turn them into regular rules, see https://github.com/opencog/atomspace/blob/master/opencog/rule-engine/backwardchainer/BackwardChainer.cc#L133 https://github.com/opencog/atomspace/blob/master/opencog/rule-engine/forwardchainer/ForwardChainer.cc#L130, then build inference trees with those regular rules.
The problem comes when going backward because the inference tree looses the process that led to turning the meta-rules into regular rules, and thus looses the premises of the meta-rules!
This makes some forms of backward chaining impossible, for instance:
Given the axioms
(Implication (stv 1 1)
(Predicate "P")
(Predicate "Q")
(Implication (stv 1 1)
(Predicate "Q")
(Predicate "R")
(Evaluation (stv 1 1)
(Predicate "P")
(Concept "a"))
You want to prove R(a). You have at least 2 ways to do that
- Prove
(Implication (Predicate "P") (Predicate "R"))
, i.e.P->R
, using deduction https://github.com/opencog/opencog/blob/master/opencog/pln/rules/term/deduction.scm, then use conditional instantiation https://github.com/opencog/opencog/blob/master/opencog/pln/meta-rules/predicate/conditional-full-instantiation.scm, to obtain R(a) from P(a). - Or, chain 2 conditional instantiations, the first one to obtain Q(a) from P(a), and the second one to obtain R(a) from Q(a).
Currently the backward chainer will only be able to prove R(a) the second way, not the first way, because in the first way, by the time the inference is being built, the knowledge of P->R
hasn't been built yet, thus the conditional instantiation meta-rule cannot be converted into a regular rule.
After thinking more deeply about it, I've concluded that to solve that we need to have a UnifyLink
of some sort to express the notion of unification in Atomese, which is currently only exposed to the C++ code https://github.com/opencog/atomspace/blob/master/opencog/unify/Unify.h but that's pretty foggy at that point, probably the more specialized notion of unification between inference tree premise (or conclusion) with rule conclusion (or rule premise) is enough...
from ure.
Looks reasonable to me.
One theoretical comment. We've long said that ImplcationLinks (ImplicationSvopeLinks) encode "declarative knowledge", while BindLinks are "just like Implication links, except that they're proceedural" So I think it is kind of funny that we are finally creating a "meta-rule" that can convert implication-links to bind-links.
The full table is at the bottom of the page http://wiki.opencog.org/w/Atom_relationships -- perhaps you want to have a meta-rule for each and every one of these?
from ure.
However, this also raises a different question: Perhaps BindLinks and ImplicationScopeLibnks should actually be exactly the same thing? Why do we need to have two "almost the same" links ... maybe just having one would be simpler (in the long run)?
Right now, BindLink has a big complicated init sequence, but maybe we should change it to not do any init at all, until the first time that the pattern matcher is invoked on it? That way, BindLink and ImplicationScope really could be the same type...
from ure.
ImplicationScopeLink has truth value semantics based on conditional
probability, BindLink does not necessarily do so ...
On Wed, Nov 9, 2016 at 12:05 AM, Linas Vepštas [email protected]
wrote:
However, this also raises a different question: Perhaps BindLinks and
ImplicationScopeLibnks should actually be exactly the same thing? Why do we
need to have two "almost the same" links ... maybe just having one would be
simpler (in the long run)?Right now, BindLink has a big complicated init sequence, but maybe we
should change it to not do any init at all, until the first time that the
pattern matcher is invoked on it? That way, BindLink and ImplicationScope
really could be the same type...—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/opencog/atomspace/issues/986#issuecomment-259299266,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFolXL9bsPVxNrdOxKu2693Qh0YPXfKIks5q8Q5fgaJpZM4KsO5A
.
Ben Goertzel, PhD
http://goertzel.org
“I tell my students, when you go to these meetings, see what direction
everyone is headed, so you can go in the opposite direction. Don’t polish
the brass on the bandwagon.” – V. S. Ramachandran
from ure.
Is meta-rule a means of expanding a macro-rule, so as to make it visible to ure-bc?
from ure.
@amebel not exactly, although it could. A meta-rule is merely a rule that produces a rule. The URE wouldn't necessarily need to support it, it could just handle that in 2 steps (although it would at least need to add the produced rule in the rule-base) but I feel it's probably better to do the 2 step on the fly. I haven't started coding so I'll see.
from ure.
@linas yes I completely see the irony and it made me think a bit, as Ben said I think the ImplicationLink is a specialized BindLink with predefined TV formula on the rewriting term.
from ure.
OK. Its OK to leave this as is, but just keep that question active in the back of your mind for the next few years, as it may need to be revisited.
from ure.
A good example requiring full meta-rule support in the backward chainer can be found here https://github.com/opencog/opencog/tree/master/examples/pln/good-songs
from ure.
Another example is BackwardChainerUTest::test_induction()
that would be re-enabled once meta-rule is supported.
from ure.
A propotype written by @rTreutlein waiting to be merge can be found in that branch
https://github.com/opencog/ure/tree/rTreutlein-MetaRuleSupport
from ure.
Related Issues (20)
- cmake fails due to unify already existing HOT 6
- BackwardChainerUTest fails to build referencing Atomtable HOT 3
- Unbalanced quotations
- Forward chainer is not stable against library changes. HOT 3
- The hyperlink to the term unifier in the README leads nowhere. HOT 1
- Have the URE fully support formula premises wrapped in SetLink
- Add GlobNode support to the unifier HOT 1
- Why not DualLink ? HOT 2
- Using GlobNode in Backward Chainer HOT 2
- forward chainer finds that Tweety is a green frog in examples/ure/frog HOT 2
- add api to extract inference trace HOT 4
- URE compilation fails: warning: control reaches end of non-void function HOT 1
- Rule::unify_source method execution takes about 30% of ForwardChainer execution time HOT 6
- Add BackwardChainerGetLink
- Backward chainer takes super long in this case HOT 3
- Fix replacement example inference tree expansion
- Add python ure_logger bindings HOT 6
- test_conditional_instantiation_1 triggers warnings in pattern engine HOT 6
- Bogus always-false clauses HOT 1
- Possible bug in AndBIT::expand() HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ure.