EvaluationLink(
PredicateNode("linked"),
ListLink(ConceptNode("WayPoint001"), ConceptNode("WayPoint002")))
deduction_rule = BindLink(
VariableList( TypedVariableLink( VariableNode('$A'), TypeNode('ConceptNode')), TypedVariableLink( VariableNode('$B'), TypeNode('ConceptNode')), TypedVariableLink( VariableNode('$C'), TypeNode('ConceptNode'))), AndLink( EvaluationLink( PredicateNode("linked"), ListLink( VariableNode('$A'), VariableNode('$B'))), EvaluationLink( PredicateNode("linked"), ListLink( VariableNode('$B'), VariableNode('$C'))), NotLink( IdenticalLink( VariableNode('$A'), VariableNode('$C')))), ExecutionOutputLink( GroundedSchemaNode('py: deduction_formula'), ListLink( EvaluationLink( PredicateNode("linked"), ListLink( VariableNode('$A'), VariableNode('$C'))), EvaluationLink( PredicateNode("linked"), ListLink( VariableNode('$A'), VariableNode('$B'))), EvaluationLink( PredicateNode("linked"), ListLink( VariableNode('$B'), VariableNode('$C')))))) deduction_rule_name = DefinedSchemaNode("linked-deduction-rule") DefineLink( deduction_rule_name, deduction_rule) MemberLink(deduction_rule_name, deduction_rbs)
def deduction_formula(AC, AB, BC):
tv1 = AB.tv
tv2 = BC.tv
if tv1.mean > 0.5 and tv2.mean > 0.5 and tv1.confidence > 0.5 and tv2.confidence > 0.5:
AC.tv = TruthValue(1, 1)
else:
AC.tv = TruthValue(0, 0)
return AC
query = EvaluationLink(
PredicateNode("linked"),
ListLink(ConceptNode("WayPoint001"), ConceptNode("WayPoint004")))
(SetLink (EvaluationLink (PredicateNode "linked") (ListLink (ConceptNode "WayPoint001") (ConceptNode "WayPoint004") ) ))
(stv 1.000000 0.000000)
query = EvaluationLink(
PredicateNode("linked"),
ListLink(ConceptNode("WayPoint001"), ConceptNode("WayPoint005")))
(SetLink (EvaluationLink (PredicateNode "linked") (ListLink (ConceptNode "WayPoint001") (ConceptNode "WayPoint005") ) ))
(stv 1.000000 0.000000)
query = GetLink(
VariableList(
VariableNode("origin"),
VariableNode("destination")),
EvaluationLink(
PredicateNode("linked"),
ListLink(
VariableNode("origin"),
VariableNode("destination"))))
The existing deduction rules
https://github.com/opencog/pln/blob/master/opencog/pln/rules/term/deduction.scm
are only defined for implication and inheritance links, so if you were
to use them you'd have to formulate the semantics of `linked` in these
terms. Let know if you want more guidance on that. That is said writing
your own rules is a perfectly fine way to go and in fact better if you
wish to have full control over the inference process.
The truth value (stv 1 0) however doesn't seem right.
So something unintended seems to be happening. Can you point me to the
full script of your experiment?
> an email to ope...@googlegroups.com
> <mailto:ope...@googlegroups.com>.
Hi Alex,
On 1/10/20 12:59 PM, Alexander Gabriel wrote:
> I boiled the test code down a bit to make it easier to parse. You can
> find it here
> <https://gist.github.com/alexander-gabriel/8e4593e76120752cbccb9a5c73cec691>.
1. I've never used the Python binding, but I would think/hope that you
don't need to invoke scheme to configure it. Can someone comment on
that?
2. You don't need `GetLink` in the query, and the variable declaration
can be given as optional argument (I don't know the syntax in
Python).
/* "../../../../opencog/cython/opencog/backwardchainer.pyx":12 * * * cdef class BackwardChainer: # <<<<<<<<<<<<<< * cdef cBackwardChainer * chainer * cdef AtomSpace _as */struct __pyx_obj_7opencog_3ure_BackwardChainer { PyObject_HEAD opencog::BackwardChainer *chainer; struct __pyx_obj_7opencog_9atomspace_AtomSpace *_as; struct __pyx_obj_7opencog_9atomspace_AtomSpace *_trace_as; struct __pyx_obj_7opencog_9atomspace_AtomSpace *_control_as;};
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)
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)
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)
H
def deduction_formula(AC, AB, BC):
tv1 = AB.tv
tv2 = BC.tv
if tv1.mean > 0.5 and tv2.mean > 0.5 and tv1.confidence > 0.5 and tv2.confidence > 0.5:
AC.tv = TruthValue(1, 1)
else:
AC.tv = TruthValue(0, 0)
return AC
This is a relatively minor point, and for a demo, scheme or python formulas are sufficient, but for anything that you expect to run quickly, the native formulas would be better.
--
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 opencog+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/opencog/CAHrUA373zoPYi2A%3DBkXV4cz0BVSgDPPYsc6r14QRz3GtnXPb%2BA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/opencog/6893E8F3-46C8-4F3D-8466-359A41D09DBF%40gmail.com.
When I try to do that with rules defined in scheme like this:
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)
To view this discussion on the web visit https://groups.google.com/d/msgid/opencog/CAHrUA35vSqT9d3jhGjHajP%2BNBjjS0-Gib2s8NXrQUcL9RhxL5w%40mail.gmail.com.
First Alex: As Nil already noted, the results you posted look reasonable, except that the truth value was insane, given the code snippets you posted. I see two possibilities:-- in addition to running your rule, some other rules are running, and generating a different TV. Maybe some other rules you created and forgot to delete? Maybe some other rules in PLN?-- there is a bug in python, causing a bogus TV to be set. Seems unlikely but always possible.
Query: (StateLink (ConceptNode "Robot01") (VariableNode "origin"))
Result (SetLink (StateLink (ConceptNode "Robot01") (ConceptNode "WayPoint001") ))Truth: (stv 1.000000 1.000000)
Query: (StateLink (ConceptNode "Picker01") (VariableNode "destination"))
Result (SetLink (StateLink (ConceptNode "Picker01") (ConceptNode "WayPoint002") ))Truth: (stv 1.000000 1.000000)
Query: (StateLink (ListLink (VariableNode "picker") (PredicateNode "seen_picking") ) (ConceptNode "FALSE"))
Result (SetLink (StateLink (ListLink (ConceptNode "Picker01") (PredicateNode "seen_picking") ) (ConceptNode "FALSE") ))Truth: (stv 1.000000 1.000000)
Query: (StateLink (ListLink (VariableNode "picker") (PredicateNode "has_crate") ) (ConceptNode "FALSE"))
Result (SetLink (StateLink (ListLink (ConceptNode "Picker01") (PredicateNode "has_crate") ) (ConceptNode "FALSE") ))Truth: (stv 1.000000 1.000000)
Query: (EvaluationLink (PredicateNode "linked") (ListLink (ConceptNode "WayPoint001") (ConceptNode "WayPoint002") ))
Result (SetLink (EvaluationLink (PredicateNode "linked") (ListLink (ConceptNode "WayPoint001") (ConceptNode "WayPoint002") ) ))Truth: (stv 1.000000 1.000000)
Query: (AndLink (EvaluationLink (PredicateNode "linked") (ListLink (VariableNode "origin") (VariableNode "destination") ) ) (StateLink (ListLink (VariableNode "picker") (PredicateNode "has_crate") ) (ConceptNode "FALSE") ) (StateLink (ListLink (VariableNode "picker") (PredicateNode "seen_picking") ) (ConceptNode "FALSE") ) (StateLink (ConceptNode "Robot01") (VariableNode "origin") ) (StateLink (ConceptNode "Picker01") (VariableNode "destination") ))
Result (SetLink (AndLink (StateLink (ConceptNode "Robot01") (ConceptNode "WayPoint001") ) (StateLink (ListLink (ConceptNode "Picker01") (PredicateNode "seen_picking") ) (ConceptNode "FALSE") ) (StateLink (ConceptNode "Picker01") (ConceptNode "WayPoint002") ) (EvaluationLink (PredicateNode "linked") (ListLink (ConceptNode "WayPoint001") (ConceptNode "WayPoint002") ) ) (StateLink (ListLink (ConceptNode "Picker01") (PredicateNode "has_crate") ) (ConceptNode "FALSE") ) ))Truth: (stv 1.000000 0.000000)
--
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 opencog+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/opencog/a11daf77-20d0-43be-a15d-d49fd86ec4af%40googlegroups.com.
I'm not sure what to make of the email below. By "query", do you mean "run cog-execute! on a BindLink"?
queries = []
# WARN: if I add this to the queries it adds the links to the atomspace (as it should I guess) # and proceeds to return the results for the just added links, truth values differ over distances
queries.append(StateLink( ConceptNode(config.robot_name), VariableNode("origin")))
queries.append(StateLink( ConceptNode(config.picker_name), VariableNode("destination")))
queries.append(StateLink( ListLink(VariableNode("picker"), PredicateNode("seen_picking")), ConceptNode("FALSE")))
queries.append(StateLink( ListLink(VariableNode("picker"), PredicateNode("has_crate")), ConceptNode("FALSE")))
queries.append(
EvaluationLink( PredicateNode("linked"), ListLink(
ConceptNode("WayPoint{:03d}".format(config.robot_pos)), ConceptNode("WayPoint{:03d}".format(config.picker_pos)))))
# this returns results only for predefined links, but even there the truth value has zero confidence queries.append( AndLink( StateLink( ConceptNode(config.robot_name), VariableNode("origin")), StateLink( ConceptNode(config.picker_name), VariableNode("destination")), StateLink( ListLink(VariableNode("picker"), PredicateNode("seen_picking")), ConceptNode("FALSE")), StateLink( ListLink(VariableNode("picker"), PredicateNode("has_crate")), ConceptNode("FALSE")),
EvaluationLink( PredicateNode("linked"), ListLink( VariableNode("origin"),
VariableNode("destination")))))
for query in queries: print("Query: {:}\n".format(query)) chainer = BackwardChainer(atomspace, rbs, query) chainer.do_chain() results = chainer.get_results() print("Result {:}".format(results)) try: print("Truth: {:}".format(results.get_out()[0].tv)) except: pass print("\n\n")
--
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 opencog+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/opencog/7f1d2406-3902-4677-bf35-ebea7d64a0e8%40googlegroups.com.
> an email to ope...@googlegroups.com
> <mailto:ope...@googlegroups.com>.
Hi Alex, Vitaly,
Alex, please set the level of the ure logger to debug and attach the log
file here.
[2020-01-13 17:58:15:775] [INFO] [global_python_initialize] Start[2020-01-13 17:58:15:775] [INFO] [global_python_initialize] Adding OpenCog sys.path directories[2020-01-13 17:58:15:775] [INFO] [global_python_initialize] Finish[2020-01-13 17:58:15:775] [INFO] PythonEval::initialize_python_objects_and_imports Finished initialising python evaluator.
Robot position: 1Picker position: 2
Query: (AndLink (EvaluationLink (PredicateNode "linked") (ListLink (VariableNode "origin") (VariableNode "destination") ) ) (StateLink (ListLink (VariableNode "picker") (PredicateNode "has_crate") ) (ConceptNode "FALSE") ) (StateLink (ListLink (VariableNode "picker") (PredicateNode "seen_picking") ) (ConceptNode "FALSE") ) (StateLink (ConceptNode "Robot01") (VariableNode "origin") ) (StateLink (ConceptNode "Picker01") (VariableNode "destination") ))
[(ConceptNode "WayPoint002" (stv 1.000000 1.000000)) ; [1421707021219169969][4], (ConceptNode "FALSE") ; [8059389032376030371][4], (ConceptNode "Picker01" (stv 1.000000 1.000000)) ; [5250680523874337442][4], (ConceptNode "Robot01" (stv 1.000000 1.000000)) ; [8656126396895433734][4], (ConceptNode "WayPoint001" (stv 1.000000 1.000000)) ; [1461315689995762073][4], (PredicateNode "seen_picking") ; [4980394588905344669][4], (PredicateNode "URE:BC:and-BIT") ; [7937878864955488923][4], (PredicateNode "URE:BC:proof-of") ; [7861690586484479273][4], (PredicateNode "has_crate") ; [2386365538716170588][4], (PredicateNode "URE:BC:target") ; [3655466572582412298][4], (PredicateNode "linked") ; [7377131820250567544][4], (ListLink (DontExecLink (BindLink (VariableList (VariableNode "picker") ; [3320396016748559776][4] (VariableNode "origin") ; [1432856408906525938][4] (VariableNode "destination") ; [8732522677762917232][4] ) ; [12560458022798011237][4] (AndLink (EvaluationLink (PredicateNode "linked") ; [7377131820250567544][4] (ListLink (VariableNode "origin") ; [1432856408906525938][4] (VariableNode "destination") ; [8732522677762917232][4] ) ; [16211263182419955128][4] ) ; [11737869013450940133][4] (StateLink (ListLink (VariableNode "picker") ; [3320396016748559776][4] (PredicateNode "has_crate") ; [2386365538716170588][4] ) ; [14008516234445170105][4] (ConceptNode "FALSE") ; [8059389032376030371][4] ) ; [14480148654898681519][4] (StateLink (ListLink (VariableNode "picker") ; [3320396016748559776][4] (PredicateNode "seen_picking") ; [4980394588905344669][4] ) ; [13783631960832222081][4] (ConceptNode "FALSE") ; [8059389032376030371][4] ) ; [15741508350878763237][4] (StateLink (ConceptNode "Robot01" (stv 1.000000 1.000000)) ; [8656126396895433734][4] (VariableNode "origin") ; [1432856408906525938][4] ) ; [16982141063225259837][4] (StateLink (ConceptNode "Picker01" (stv 1.000000 1.000000)) ; [5250680523874337442][4] (VariableNode "destination") ; [8732522677762917232][4] ) ; [18172667735726832559][4] ) ; [10202968835893361781][4] (AndLink (EvaluationLink (PredicateNode "linked") ; [7377131820250567544][4] (ListLink (VariableNode "origin") ; [1432856408906525938][4] (VariableNode "destination") ; [8732522677762917232][4] ) ; [16211263182419955128][4] ) ; [11737869013450940133][4] (StateLink (ListLink (VariableNode "picker") ; [3320396016748559776][4] (PredicateNode "has_crate") ; [2386365538716170588][4] ) ; [14008516234445170105][4] (ConceptNode "FALSE") ; [8059389032376030371][4] ) ; [14480148654898681519][4] (StateLink (ListLink (VariableNode "picker") ; [3320396016748559776][4] (PredicateNode "seen_picking") ; [4980394588905344669][4] ) ; [13783631960832222081][4] (ConceptNode "FALSE") ; [8059389032376030371][4] ) ; [15741508350878763237][4] (StateLink (ConceptNode "Robot01" (stv 1.000000 1.000000)) ; [8656126396895433734][4] (VariableNode "origin") ; [1432856408906525938][4] ) ; [16982141063225259837][4] (StateLink (ConceptNode "Picker01" (stv 1.000000 1.000000)) ; [5250680523874337442][4] (VariableNode "destination") ; [8732522677762917232][4] ) ; [18172667735726832559][4] ) ; [10202968835893361781][4] ) ; [10378290140134742943][4] ) ; [10056885220319300478][4] (AndLink (StateLink (stv 1.000000 1.000000) (ConceptNode "Robot01" (stv 1.000000 1.000000)) ; [8656126396895433734][4] (ConceptNode "WayPoint001" (stv 1.000000 1.000000)) ; [1461315689995762073][4] ) ; [10246810040960724207][4] (StateLink (stv 1.000000 1.000000) (ListLink (ConceptNode "Picker01" (stv 1.000000 1.000000)) ; [5250680523874337442][4] (PredicateNode "seen_picking") ; [4980394588905344669][4] ) ; [13553464137728764687][4] (ConceptNode "FALSE") ; [8059389032376030371][4] ) ; [10800256415231817922][4] (StateLink (stv 1.000000 1.000000) (ConceptNode "Picker01" (stv 1.000000 1.000000)) ; [5250680523874337442][4] (ConceptNode "WayPoint002" (stv 1.000000 1.000000)) ; [1421707021219169969][4] ) ; [12979417854504668522][4] (EvaluationLink (stv 1.000000 1.000000) (PredicateNode "linked") ; [7377131820250567544][4] (ListLink (ConceptNode "WayPoint001" (stv 1.000000 1.000000)) ; [1461315689995762073][4] (ConceptNode "WayPoint002" (stv 1.000000 1.000000)) ; [1421707021219169969][4] ) ; [12650955823366188636][4] ) ; [13021153103939626777][4] (StateLink (stv 1.000000 1.000000) (ListLink (ConceptNode "Picker01" (stv 1.000000 1.000000)) ; [5250680523874337442][4] (PredicateNode "has_crate") ; [2386365538716170588][4] ) ; [16000349526672526752][4] (ConceptNode "FALSE") ; [8059389032376030371][4] ) ; [13021724614411824842][4] ) ; [11420344547789796517][4]) ; [13191677814610597869][4], (ListLink (VariableNode "origin") ; [1432856408906525938][4] (VariableNode "destination") ; [8732522677762917232][4]) ; [16211263182419955128][4], (ListLink (ConceptNode "Picker01" (stv 1.000000 1.000000)) ; [5250680523874337442][4] (PredicateNode "has_crate") ; [2386365538716170588][4]) ; [16000349526672526752][4], (ListLink (ConceptNode "WayPoint001" (stv 1.000000 1.000000)) ; [1461315689995762073][4] (ConceptNode "WayPoint002" (stv 1.000000 1.000000)) ; [1421707021219169969][4]) ; [12650955823366188636][4], (ListLink (VariableNode "picker") ; [3320396016748559776][4] (PredicateNode "has_crate") ; [2386365538716170588][4]) ; [14008516234445170105][4], (ListLink (VariableNode "picker") ; [3320396016748559776][4] (PredicateNode "seen_picking") ; [4980394588905344669][4]) ; [13783631960832222081][4], (ListLink (ConceptNode "Picker01" (stv 1.000000 1.000000)) ; [5250680523874337442][4] (PredicateNode "seen_picking") ; [4980394588905344669][4]) ; [13553464137728764687][4], (AndLink (StateLink (stv 1.000000 1.000000) (ConceptNode "Robot01" (stv 1.000000 1.000000)) ; [8656126396895433734][4] (ConceptNode "WayPoint001" (stv 1.000000 1.000000)) ; [1461315689995762073][4] ) ; [10246810040960724207][4] (StateLink (stv 1.000000 1.000000) (ListLink (ConceptNode "Picker01" (stv 1.000000 1.000000)) ; [5250680523874337442][4] (PredicateNode "seen_picking") ; [4980394588905344669][4] ) ; [13553464137728764687][4] (ConceptNode "FALSE") ; [8059389032376030371][4] ) ; [10800256415231817922][4] (StateLink (stv 1.000000 1.000000) (ConceptNode "Picker01" (stv 1.000000 1.000000)) ; [5250680523874337442][4] (ConceptNode "WayPoint002" (stv 1.000000 1.000000)) ; [1421707021219169969][4] ) ; [12979417854504668522][4] (EvaluationLink (stv 1.000000 1.000000) (PredicateNode "linked") ; [7377131820250567544][4] (ListLink (ConceptNode "WayPoint001" (stv 1.000000 1.000000)) ; [1461315689995762073][4] (ConceptNode "WayPoint002" (stv 1.000000 1.000000)) ; [1421707021219169969][4] ) ; [12650955823366188636][4] ) ; [13021153103939626777][4] (StateLink (stv 1.000000 1.000000) (ListLink (ConceptNode "Picker01" (stv 1.000000 1.000000)) ; [5250680523874337442][4] (PredicateNode "has_crate") ; [2386365538716170588][4] ) ; [16000349526672526752][4] (ConceptNode "FALSE") ; [8059389032376030371][4] ) ; [13021724614411824842][4]) ; [11420344547789796517][4], (AndLink (EvaluationLink (PredicateNode "linked") ; [7377131820250567544][4] (ListLink (VariableNode "origin") ; [1432856408906525938][4] (VariableNode "destination") ; [8732522677762917232][4] ) ; [16211263182419955128][4] ) ; [11737869013450940133][4] (StateLink (ListLink (VariableNode "picker") ; [3320396016748559776][4] (PredicateNode "has_crate") ; [2386365538716170588][4] ) ; [14008516234445170105][4] (ConceptNode "FALSE") ; [8059389032376030371][4] ) ; [14480148654898681519][4] (StateLink (ListLink (VariableNode "picker") ; [3320396016748559776][4] (PredicateNode "seen_picking") ; [4980394588905344669][4] ) ; [13783631960832222081][4] (ConceptNode "FALSE") ; [8059389032376030371][4] ) ; [15741508350878763237][4] (StateLink (ConceptNode "Robot01" (stv 1.000000 1.000000)) ; [8656126396895433734][4] (VariableNode "origin") ; [1432856408906525938][4] ) ; [16982141063225259837][4] (StateLink (ConceptNode "Picker01" (stv 1.000000 1.000000)) ; [5250680523874337442][4] (VariableNode "destination") ; [8732522677762917232][4] ) ; [18172667735726832559][4]) ; [10202968835893361781][4], (VariableNode "picker") ; [3320396016748559776][4], (VariableNode "destination") ; [8732522677762917232][4], (VariableNode "origin") ; [1432856408906525938][4], (VariableList (VariableNode "picker") ; [3320396016748559776][4] (VariableNode "origin") ; [1432856408906525938][4] (VariableNode "destination") ; [8732522677762917232][4]) ; [12560458022798011237][4], (DontExecLink (BindLink (VariableList (VariableNode "picker") ; [3320396016748559776][4] (VariableNode "origin") ; [1432856408906525938][4] (VariableNode "destination") ; [8732522677762917232][4] ) ; [12560458022798011237][4] (AndLink (EvaluationLink (PredicateNode "linked") ; [7377131820250567544][4] (ListLink (VariableNode "origin") ; [1432856408906525938][4] (VariableNode "destination") ; [8732522677762917232][4] ) ; [16211263182419955128][4] ) ; [11737869013450940133][4] (StateLink (ListLink (VariableNode "picker") ; [3320396016748559776][4] (PredicateNode "has_crate") ; [2386365538716170588][4] ) ; [14008516234445170105][4] (ConceptNode "FALSE") ; [8059389032376030371][4] ) ; [14480148654898681519][4] (StateLink (ListLink (VariableNode "picker") ; [3320396016748559776][4] (PredicateNode "seen_picking") ; [4980394588905344669][4] ) ; [13783631960832222081][4] (ConceptNode "FALSE") ; [8059389032376030371][4] ) ; [15741508350878763237][4] (StateLink (ConceptNode "Robot01" (stv 1.000000 1.000000)) ; [8656126396895433734][4] (VariableNode "origin") ; [1432856408906525938][4] ) ; [16982141063225259837][4] (StateLink (ConceptNode "Picker01" (stv 1.000000 1.000000)) ; [5250680523874337442][4] (VariableNode "destination") ; [8732522677762917232][4] ) ; [18172667735726832559][4] ) ; [10202968835893361781][4] (AndLink (EvaluationLink (PredicateNode "linked") ; [7377131820250567544][4] (ListLink (VariableNode "origin") ; [1432856408906525938][4] (VariableNode "destination") ; [8732522677762917232][4] ) ; [16211263182419955128][4] ) ; [11737869013450940133][4] (StateLink (ListLink (VariableNode "picker") ; [3320396016748559776][4] (PredicateNode "has_crate") ; [2386365538716170588][4] ) ; [14008516234445170105][4] (ConceptNode "FALSE") ; [8059389032376030371][4] ) ; [14480148654898681519][4] (StateLink (ListLink (VariableNode "picker") ; [3320396016748559776][4] (PredicateNode "seen_picking") ; [4980394588905344669][4] ) ; [13783631960832222081][4] (ConceptNode "FALSE") ; [8059389032376030371][4] ) ; [15741508350878763237][4] (StateLink (ConceptNode "Robot01" (stv 1.000000 1.000000)) ; [8656126396895433734][4] (VariableNode "origin") ; [1432856408906525938][4] ) ; [16982141063225259837][4] (StateLink (ConceptNode "Picker01" (stv 1.000000 1.000000)) ; [5250680523874337442][4] (VariableNode "destination") ; [8732522677762917232][4] ) ; [18172667735726832559][4] ) ; [10202968835893361781][4] ) ; [10378290140134742943][4]) ; [10056885220319300478][4], (StateLink (stv 1.000000 1.000000) (ListLink (ConceptNode "Picker01" (stv 1.000000 1.000000)) ; [5250680523874337442][4] (PredicateNode "has_crate") ; [2386365538716170588][4] ) ; [16000349526672526752][4] (ConceptNode "FALSE") ; [8059389032376030371][4]) ; [13021724614411824842][4], (StateLink (stv 1.000000 1.000000) (ListLink (ConceptNode "Picker01" (stv 1.000000 1.000000)) ; [5250680523874337442][4] (PredicateNode "seen_picking") ; [4980394588905344669][4] ) ; [13553464137728764687][4] (ConceptNode "FALSE") ; [8059389032376030371][4]) ; [10800256415231817922][4], (StateLink (stv 1.000000 1.000000) (ConceptNode "Robot01" (stv 1.000000 1.000000)) ; [8656126396895433734][4] (ConceptNode "WayPoint001" (stv 1.000000 1.000000)) ; [1461315689995762073][4]) ; [10246810040960724207][4], (StateLink (ListLink (VariableNode "picker") ; [3320396016748559776][4] (PredicateNode "has_crate") ; [2386365538716170588][4] ) ; [14008516234445170105][4] (ConceptNode "FALSE") ; [8059389032376030371][4]) ; [14480148654898681519][4], (StateLink (stv 1.000000 1.000000) (ConceptNode "Picker01" (stv 1.000000 1.000000)) ; [5250680523874337442][4] (ConceptNode "WayPoint002" (stv 1.000000 1.000000)) ; [1421707021219169969][4]) ; [12979417854504668522][4], (StateLink (ListLink (VariableNode "picker") ; [3320396016748559776][4] (PredicateNode "seen_picking") ; [4980394588905344669][4] ) ; [13783631960832222081][4] (ConceptNode "FALSE") ; [8059389032376030371][4]) ; [15741508350878763237][4], (StateLink (ConceptNode "Robot01" (stv 1.000000 1.000000)) ; [8656126396895433734][4] (VariableNode "origin") ; [1432856408906525938][4]) ; [16982141063225259837][4], (StateLink (ConceptNode "Picker01" (stv 1.000000 1.000000)) ; [5250680523874337442][4] (VariableNode "destination") ; [8732522677762917232][4]) ; [18172667735726832559][4], (BindLink (VariableList (VariableNode "picker") ; [3320396016748559776][4] (VariableNode "origin") ; [1432856408906525938][4] (VariableNode "destination") ; [8732522677762917232][4] ) ; [12560458022798011237][4] (AndLink (EvaluationLink (PredicateNode "linked") ; [7377131820250567544][4] (ListLink (VariableNode "origin") ; [1432856408906525938][4] (VariableNode "destination") ; [8732522677762917232][4] ) ; [16211263182419955128][4] ) ; [11737869013450940133][4] (StateLink (ListLink (VariableNode "picker") ; [3320396016748559776][4] (PredicateNode "has_crate") ; [2386365538716170588][4] ) ; [14008516234445170105][4] (ConceptNode "FALSE") ; [8059389032376030371][4] ) ; [14480148654898681519][4] (StateLink (ListLink (VariableNode "picker") ; [3320396016748559776][4] (PredicateNode "seen_picking") ; [4980394588905344669][4] ) ; [13783631960832222081][4] (ConceptNode "FALSE") ; [8059389032376030371][4] ) ; [15741508350878763237][4] (StateLink (ConceptNode "Robot01" (stv 1.000000 1.000000)) ; [8656126396895433734][4] (VariableNode "origin") ; [1432856408906525938][4] ) ; [16982141063225259837][4] (StateLink (ConceptNode "Picker01" (stv 1.000000 1.000000)) ; [5250680523874337442][4] (VariableNode "destination") ; [8732522677762917232][4] ) ; [18172667735726832559][4] ) ; [10202968835893361781][4] (AndLink (EvaluationLink (PredicateNode "linked") ; [7377131820250567544][4] (ListLink (VariableNode "origin") ; [1432856408906525938][4] (VariableNode "destination") ; [8732522677762917232][4] ) ; [16211263182419955128][4] ) ; [11737869013450940133][4] (StateLink (ListLink (VariableNode "picker") ; [3320396016748559776][4] (PredicateNode "has_crate") ; [2386365538716170588][4] ) ; [14008516234445170105][4] (ConceptNode "FALSE") ; [8059389032376030371][4] ) ; [14480148654898681519][4] (StateLink (ListLink (VariableNode "picker") ; [3320396016748559776][4] (PredicateNode "seen_picking") ; [4980394588905344669][4] ) ; [13783631960832222081][4] (ConceptNode "FALSE") ; [8059389032376030371][4] ) ; [15741508350878763237][4] (StateLink (ConceptNode "Robot01" (stv 1.000000 1.000000)) ; [8656126396895433734][4] (VariableNode "origin") ; [1432856408906525938][4] ) ; [16982141063225259837][4] (StateLink (ConceptNode "Picker01" (stv 1.000000 1.000000)) ; [5250680523874337442][4] (VariableNode "destination") ; [8732522677762917232][4] ) ; [18172667735726832559][4] ) ; [10202968835893361781][4]) ; [10378290140134742943][4], (EvaluationLink (PredicateNode "URE:BC:proof-of") ; [7861690586484479273][4] (ListLink (DontExecLink (BindLink (VariableList (VariableNode "picker") ; [3320396016748559776][4] (VariableNode "origin") ; [1432856408906525938][4] (VariableNode "destination") ; [8732522677762917232][4] ) ; [12560458022798011237][4] (AndLink (EvaluationLink (PredicateNode "linked") ; [7377131820250567544][4] (ListLink (VariableNode "origin") ; [1432856408906525938][4] (VariableNode "destination") ; [8732522677762917232][4] ) ; [16211263182419955128][4] ) ; [11737869013450940133][4] (StateLink (ListLink (VariableNode "picker") ; [3320396016748559776][4] (PredicateNode "has_crate") ; [2386365538716170588][4] ) ; [14008516234445170105][4] (ConceptNode "FALSE") ; [8059389032376030371][4] ) ; [14480148654898681519][4] (StateLink (ListLink (VariableNode "picker") ; [3320396016748559776][4] (PredicateNode "seen_picking") ; [4980394588905344669][4] ) ; [13783631960832222081][4] (ConceptNode "FALSE") ; [8059389032376030371][4] ) ; [15741508350878763237][4] (StateLink (ConceptNode "Robot01" (stv 1.000000 1.000000)) ; [8656126396895433734][4] (VariableNode "origin") ; [1432856408906525938][4] ) ; [16982141063225259837][4] (StateLink (ConceptNode "Picker01" (stv 1.000000 1.000000)) ; [5250680523874337442][4] (VariableNode "destination") ; [8732522677762917232][4] ) ; [18172667735726832559][4] ) ; [10202968835893361781][4] (AndLink (EvaluationLink (PredicateNode "linked") ; [7377131820250567544][4] (ListLink (VariableNode "origin") ; [1432856408906525938][4] (VariableNode "destination") ; [8732522677762917232][4] ) ; [16211263182419955128][4] ) ; [11737869013450940133][4] (StateLink (ListLink (VariableNode "picker") ; [3320396016748559776][4] (PredicateNode "has_crate") ; [2386365538716170588][4] ) ; [14008516234445170105][4] (ConceptNode "FALSE") ; [8059389032376030371][4] ) ; [14480148654898681519][4] (StateLink (ListLink (VariableNode "picker") ; [3320396016748559776][4] (PredicateNode "seen_picking") ; [4980394588905344669][4] ) ; [13783631960832222081][4] (ConceptNode "FALSE") ; [8059389032376030371][4] ) ; [15741508350878763237][4] (StateLink (ConceptNode "Robot01" (stv 1.000000 1.000000)) ; [8656126396895433734][4] (VariableNode "origin") ; [1432856408906525938][4] ) ; [16982141063225259837][4] (StateLink (ConceptNode "Picker01" (stv 1.000000 1.000000)) ; [5250680523874337442][4] (VariableNode "destination") ; [8732522677762917232][4] ) ; [18172667735726832559][4] ) ; [10202968835893361781][4] ) ; [10378290140134742943][4] ) ; [10056885220319300478][4] (AndLink (StateLink (stv 1.000000 1.000000) (ConceptNode "Robot01" (stv 1.000000 1.000000)) ; [8656126396895433734][4] (ConceptNode "WayPoint001" (stv 1.000000 1.000000)) ; [1461315689995762073][4] ) ; [10246810040960724207][4] (StateLink (stv 1.000000 1.000000) (ListLink (ConceptNode "Picker01" (stv 1.000000 1.000000)) ; [5250680523874337442][4] (PredicateNode "seen_picking") ; [4980394588905344669][4] ) ; [13553464137728764687][4] (ConceptNode "FALSE") ; [8059389032376030371][4] ) ; [10800256415231817922][4] (StateLink (stv 1.000000 1.000000) (ConceptNode "Picker01" (stv 1.000000 1.000000)) ; [5250680523874337442][4] (ConceptNode "WayPoint002" (stv 1.000000 1.000000)) ; [1421707021219169969][4] ) ; [12979417854504668522][4] (EvaluationLink (stv 1.000000 1.000000) (PredicateNode "linked") ; [7377131820250567544][4] (ListLink (ConceptNode "WayPoint001" (stv 1.000000 1.000000)) ; [1461315689995762073][4] (ConceptNode "WayPoint002" (stv 1.000000 1.000000)) ; [1421707021219169969][4] ) ; [12650955823366188636][4] ) ; [13021153103939626777][4] (StateLink (stv 1.000000 1.000000) (ListLink (ConceptNode "Picker01" (stv 1.000000 1.000000)) ; [5250680523874337442][4] (PredicateNode "has_crate") ; [2386365538716170588][4] ) ; [16000349526672526752][4] (ConceptNode "FALSE") ; [8059389032376030371][4] ) ; [13021724614411824842][4] ) ; [11420344547789796517][4] ) ; [13191677814610597869][4]) ; [12250320817453029415][4], (EvaluationLink (stv 1.000000 1.000000) (PredicateNode "linked") ; [7377131820250567544][4] (ListLink (ConceptNode "WayPoint001" (stv 1.000000 1.000000)) ; [1461315689995762073][4] (ConceptNode "WayPoint002" (stv 1.000000 1.000000)) ; [1421707021219169969][4] ) ; [12650955823366188636][4]) ; [13021153103939626777][4], (EvaluationLink (stv 1.000000 1.000000) (PredicateNode "URE:BC:target") ; [3655466572582412298][4] (AndLink (EvaluationLink (PredicateNode "linked") ; [7377131820250567544][4] (ListLink (VariableNode "origin") ; [1432856408906525938][4] (VariableNode "destination") ; [8732522677762917232][4] ) ; [16211263182419955128][4] ) ; [11737869013450940133][4] (StateLink (ListLink (VariableNode "picker") ; [3320396016748559776][4] (PredicateNode "has_crate") ; [2386365538716170588][4] ) ; [14008516234445170105][4] (ConceptNode "FALSE") ; [8059389032376030371][4] ) ; [14480148654898681519][4] (StateLink (ListLink (VariableNode "picker") ; [3320396016748559776][4] (PredicateNode "seen_picking") ; [4980394588905344669][4] ) ; [13783631960832222081][4] (ConceptNode "FALSE") ; [8059389032376030371][4] ) ; [15741508350878763237][4] (StateLink (ConceptNode "Robot01" (stv 1.000000 1.000000)) ; [8656126396895433734][4] (VariableNode "origin") ; [1432856408906525938][4] ) ; [16982141063225259837][4] (StateLink (ConceptNode "Picker01" (stv 1.000000 1.000000)) ; [5250680523874337442][4] (VariableNode "destination") ; [8732522677762917232][4] ) ; [18172667735726832559][4] ) ; [10202968835893361781][4]) ; [9437574303461310653][4], (EvaluationLink (PredicateNode "linked") ; [7377131820250567544][4] (ListLink (VariableNode "origin") ; [1432856408906525938][4] (VariableNode "destination") ; [8732522677762917232][4] ) ; [16211263182419955128][4]) ; [11737869013450940133][4], (EvaluationLink (stv 1.000000 1.000000) (PredicateNode "URE:BC:and-BIT") ; [7937878864955488923][4] (DontExecLink (BindLink (VariableList (VariableNode "picker") ; [3320396016748559776][4] (VariableNode "origin") ; [1432856408906525938][4] (VariableNode "destination") ; [8732522677762917232][4] ) ; [12560458022798011237][4] (AndLink (EvaluationLink (PredicateNode "linked") ; [7377131820250567544][4] (ListLink (VariableNode "origin") ; [1432856408906525938][4] (VariableNode "destination") ; [8732522677762917232][4] ) ; [16211263182419955128][4] ) ; [11737869013450940133][4] (StateLink (ListLink (VariableNode "picker") ; [3320396016748559776][4] (PredicateNode "has_crate") ; [2386365538716170588][4] ) ; [14008516234445170105][4] (ConceptNode "FALSE") ; [8059389032376030371][4] ) ; [14480148654898681519][4] (StateLink (ListLink (VariableNode "picker") ; [3320396016748559776][4] (PredicateNode "seen_picking") ; [4980394588905344669][4] ) ; [13783631960832222081][4] (ConceptNode "FALSE") ; [8059389032376030371][4] ) ; [15741508350878763237][4] (StateLink (ConceptNode "Robot01" (stv 1.000000 1.000000)) ; [8656126396895433734][4] (VariableNode "origin") ; [1432856408906525938][4] ) ; [16982141063225259837][4] (StateLink (ConceptNode "Picker01" (stv 1.000000 1.000000)) ; [5250680523874337442][4] (VariableNode "destination") ; [8732522677762917232][4] ) ; [18172667735726832559][4] ) ; [10202968835893361781][4] (AndLink (EvaluationLink (PredicateNode "linked") ; [7377131820250567544][4] (ListLink (VariableNode "origin") ; [1432856408906525938][4] (VariableNode "destination") ; [8732522677762917232][4] ) ; [16211263182419955128][4] ) ; [11737869013450940133][4] (StateLink (ListLink (VariableNode "picker") ; [3320396016748559776][4] (PredicateNode "has_crate") ; [2386365538716170588][4] ) ; [14008516234445170105][4] (ConceptNode "FALSE") ; [8059389032376030371][4] ) ; [14480148654898681519][4] (StateLink (ListLink (VariableNode "picker") ; [3320396016748559776][4] (PredicateNode "seen_picking") ; [4980394588905344669][4] ) ; [13783631960832222081][4] (ConceptNode "FALSE") ; [8059389032376030371][4] ) ; [15741508350878763237][4] (StateLink (ConceptNode "Robot01" (stv 1.000000 1.000000)) ; [8656126396895433734][4] (VariableNode "origin") ; [1432856408906525938][4] ) ; [16982141063225259837][4] (StateLink (ConceptNode "Picker01" (stv 1.000000 1.000000)) ; [5250680523874337442][4] (VariableNode "destination") ; [8732522677762917232][4] ) ; [18172667735726832559][4] ) ; [10202968835893361781][4] ) ; [10378290140134742943][4] ) ; [10056885220319300478][4]) ; [9756272752300218847][4], (SchemaNode "URE:BC:expand-and-BIT") ; [9124129740472279502][4]]
Result (SetLink (AndLink (StateLink (ConceptNode "Robot01") (ConceptNode "WayPoint001") ) (StateLink (ListLink (ConceptNode "Picker01") (PredicateNode "seen_picking") ) (ConceptNode "FALSE") ) (StateLink (ConceptNode "Picker01") (ConceptNode "WayPoint002") ) (EvaluationLink (PredicateNode "linked") (ListLink (ConceptNode "WayPoint001") (ConceptNode "WayPoint002") ) ) (StateLink (ListLink (ConceptNode "Picker01") (PredicateNode "has_crate") ) (ConceptNode "FALSE") ) ))Truth: (stv 1.000000 0.000000)
That's not normal. Alex, after setting up the log level, what do you get
from calling (in scheme)
(ure-logger-get-level)
execute_code = \ '''
(use-modules (opencog logger) (opencog ure))
(load-from-path "/home/rasberry/git/ure/tests/ure/rules/bc-deduction-rule.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/meta-rules/predicate/conditional-full-instantiation.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/meta-rules/predicate/conditional-partial-instantiation.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/meta-rules/predicate/universal-full-instantiation.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/rules/term/deduction.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/rules/propositional/modus-ponens.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/rules/propositional/contraposition.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/rules/wip/implication-scope-to-implication.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/rules/wip/implication-instantiation.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/rules/wip/negation-introduction.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/rules/wip/not-simplification.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/rules/wip/not-elimination.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/rules/wip/evaluation-to-member.scm")
(define rbs (Concept "deduction-rule-base")) (ure-set-complexity-penalty rbs 0.1)
(cog-logger-set-level! (cog-ure-logger) "DEBUG") (ure-logger-get-level) ''' scheme_eval(atomspace, execute_code)
You should BTW be able to use
(ure-logger-set-level! "DEBUG")
as long as the ure scheme module is loaded.
--
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 opencog+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/opencog/80b4f6ee-471c-48d2-936b-81578d38e892%40googlegroups.com.
Sanity check -- do you have the latest cogutils and the latest atomspace? Are you sure you installed to the same location (e.g. you don't have a second conflicting cogutils/atomspace in /opt vs /usr/local ?) Are you using the opencog-github versions instead of the singularity-net versions?
--
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 opencog+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/opencog/b71e0e12-b383-41f9-b186-d007a1b4c1f2%40googlegroups.com.
(use-modules (opencog) (opencog exec))(use-modules (opencog logger)); optional formating(cog-logger-set-stdout! #t)
(cog-logger-set-timestamp! #f)
(cog-logger-set-level! "fine")(cog-logger-info "this is an info test")(cog-logger-debug "another test at debug level")(cog-logger-fine "now fine grained logging")
execute_code = \ ''' (use-modules (opencog logger) (opencog ure) (opencog exec))
(load-from-path "/home/rasberry/git/ure/tests/ure/rules/bc-deduction-rule.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/meta-rules/predicate/conditional-full-instantiation.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/meta-rules/predicate/conditional-partial-instantiation.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/meta-rules/predicate/universal-full-instantiation.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/rules/term/deduction.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/rules/propositional/modus-ponens.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/rules/propositional/contraposition.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/rules/wip/implication-scope-to-implication.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/rules/wip/implication-instantiation.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/rules/wip/negation-introduction.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/rules/wip/not-simplification.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/rules/wip/not-elimination.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/rules/wip/evaluation-to-member.scm")
(define rbs (Concept "deduction-rule-base")) (ure-set-complexity-penalty rbs 0.1)
(ure-logger-set-level! "DEBUG") (cog-logger-set-stdout! #t) (cog-logger-set-timestamp! #f)
(cog-logger-info "this is an info test") (cog-logger-debug "another test at debug level") (cog-logger-fine "now fine grained logging")
(ure-logger-get-level) ''' scheme_eval(atomspace, execute_code)
execute_code = \ ''' (use-modules (opencog logger) (opencog ure) (opencog exec))
(load-from-path "/home/rasberry/git/ure/tests/ure/rules/bc-deduction-rule.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/meta-rules/predicate/conditional-full-instantiation.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/meta-rules/predicate/conditional-partial-instantiation.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/meta-rules/predicate/universal-full-instantiation.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/rules/term/deduction.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/rules/propositional/modus-ponens.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/rules/propositional/contraposition.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/rules/wip/implication-scope-to-implication.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/rules/wip/implication-instantiation.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/rules/wip/negation-introduction.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/rules/wip/not-simplification.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/rules/wip/not-elimination.scm") (load-from-path "/home/rasberry/git/opencog/opencog/pln/rules/wip/evaluation-to-member.scm")
(define rbs (Concept "deduction-rule-base")) (ure-set-complexity-penalty rbs 0.1)
(ure-logger-set-level! "DEBUG") (cog-logger-set-stdout! #t) (cog-logger-set-timestamp! #f)
(ure-logger-get-filename) (ure-logger-set-stdout! #t) (ure-logger-info "test message")
(ure-logger-debug "ure test at debug level") (ure-logger-fine "ure fine grained logging")
(cog-logger-info "this is an info test") (cog-logger-debug "another test at debug level") (cog-logger-fine "now fine grained logging")
(ure-logger-get-level) ''' scheme_eval(atomspace, execute_code)
and if I set the cog-logger also to debug I find ure and cog debug messages.I wasn't aware there were different loggers.
What I still don't see are any messages from the actual backward chaining process..
--
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 opencog+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/opencog/2a1ae7e6-aa39-4b6e-b77f-18e86ea9884f%40googlegroups.com.
variables = VariableList(TypedVariableLink(VariableNode("origin"), TypeNode("ConceptNode")), TypedVariableLink(VariableNode("destination"), TypeNode("ConceptNode")))
query = AndLink(EvaluationLink( PredicateNode("linked"), ListLink( VariableNode("origin"), VariableNode("destination"))))
chainer = BackwardChainer(atomspace, ConceptNode("None"), query, vardecl=variables)
chainer.do_chain()
variables= VariableList(TypedVariableLink(VariableNode("origin"), TypeNode("ConceptNode")), TypedVariableLink(VariableNode("destination"), TypeNode("ConceptNode")))
query = EvaluationLink( PredicateNode("linked"), ListLink( VariableNode("origin"), VariableNode("destination"))))
chainer = BackwardChainer(atomspace, ConceptNode("None"), query, vardecl=variables)
chainer.do_chain()
Yes, that's cause you need URE rules to deal with And, Or, Not links as
well. See
https://github.com/opencog/pln/tree/master/opencog/pln/rules/crisp/propositional
https://github.com/opencog/pln/tree/master/opencog/pln/rules/propositional
for examples of such rules.
Also, are you sure you want to use StateLink? I tend to think reasoning
works better on immutable structures.
On 1/16/20 3:22 PM, Alexander Gabriel wrote:
>
> So, from looking at the AndLink, I gather that it can only be applied
> to EvaluationLinks, InheritanceLinks, OrLinks, NotLinks,
> and ExecutionLinks. Is there a preferred way of how to apply it (and its
> brethren) to StateLinks, (and PresentLinks, AlwaysLinks and so on)?
I suppose so, just copy/paste it and modify it to your needs.
PresentLinks and AlwaysLinks are "reserved keywords" intended for the pattern matcher, only. If you defocus your eyes a bit, then sure, they seem to resemble the predicate-logic "there-exists" and "for-all" . But the were not designed for reasoning, there were designed for solving the "subgraph isomorphism problem" and for "term rewriting". So if you actually need the predicate-logic constructs "there-exists" and "for-all", then you should use the ThereExistsLink and ForAllLink. (These have been so under-utilized in the code base that they might have been stripped out; but they could be added back in. ).
I can't really tell, I've never used StateLink. As Linas suggested Value
might be better for various reasons. But as an AI-via-reasoning
fundamentalist I would think ideally you should avoid immutable
structures. That means for instance recording perceptions through time,
via for instance AtTimeLink, as opposed to changing states.
Doing this makes it easier to acquire a consciousness of time, but it's
obviously much more expensive. You have to learn (or have the system
learn) what to store in long-term memory, what to discard, etc.