Hi Vitaly!
> The following Python code:
>
>
> MemberLink(DefinedSchemaNode("conditional-full-instantiation-implication-meta-rule-name"),
>
> ConceptNode("rbs"))
> ExecutionLink(SchemaNode("URE:maximum-iterations"), ConceptNode("rbs"),
> NumberNode("30"))
>
> can be used instead of Scheme:
>
> (ure-add-rule rbs
> conditional-full-instantiation-implication-meta-rule-name)
> (ure-set-maximum-iterations rbs 30)
>
When I try to do that with rules defined in scheme like this:
execute_code = \
'''
(use-modules (opencog rule-engine))
(load-from-path
"/home/rasberry/git/ure/tests/ure/rules/bc-deduction-rule.scm")
(define rbs (Concept "deduction-rule-base"))
(ure-set-complexity-penalty rbs 0.1)
(EvaluationLink (stv 0 1)
(PredicateNode "URE:attention-allocation")
(ConceptNode "deduction-rule-base")
)
'''
rbs = ConceptNode("deduction-rule-base")
InheritanceLink(
rbs,
ConceptNode("URE"))
scheme_eval(atomspace, execute_code)
MemberLink(DefinedSchemaNode("bc-deduction-rule-name"), rbs)
the error I get during backward chaining is:
Traceback (most recent call last):
File "bdi/inference_test.py", line 380, in <module>
query)
File "opencog/backwardchainer.pyx", line 35, in
opencog.ure.BackwardChainer.__cinit__
(/home/rasberry/git/ure/build/opencog/cython/opencog/ure.cpp:1993)
RuntimeError: Cannot find defined hypergraph for atom (DefinedSchemaNode
"bc-deduction-rule-name") ; [1114839971276947956][1]
(/home/rasberry/git/atomspace/opencog/atoms/core/UniqueLink.cc:125)
It works fine on rules defined in python though.
--
You received this message because you are subscribed to the Google Groups
"opencog" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/opencog/71e83cb6-7765-43a2-85e3-69e4a9f09c20%40googlegroups.com.