Hi Nil,
Now I'm getting the following error. I type:
(define P (PredicateNode "p" (stv 0.3 1))
(cog-execute! negation-introduction-rule)
And I get this error:
[2018-12-17 10:50:42:031] [ERROR] Backtrace:
7 (opencog-extension cog-execute! (#))
6 (apply-smob/1 #<catch-closure 15faba0>)
5 (apply-smob/1 #<catch-closure 15fab20>)
In ice-9/eval.scm:
191:27 4 (_ #f)
223:20 3 (proc #<directory (guile-user) 112f140>)
In unknown file:
2 (%resolve-variable (7 . r2l-check-name) #<directory
(guile-user) 112f140>)
In ice-9/boot-9.scm:
751:25 1 (dispatch-exception 0 unbound-variable (#f "Unbound variable:
~S" (r2l-check-name) #f))
In unknown file:
0 (apply-smob/1 #<catch-closure 15faae0> unbound-variable #f
"Unbound variable: ~S" (r2l-check-name) #f)
ERROR: In procedure apply-smob/1:
Unbound variable: r2l-check-name
ABORT: unbound-variable
(/tmp/atomspace-master/opencog/guile/SchemeEval.cc:1068)
Stack Trace:
2: Logger.cc:512 opencog::Logger::logva(opencog::Logger::Level,
char const*, __va_list_tag*)
3: Logger.cc:524 opencog::Logger::Error::operator()(char const*,
...)
4: exceptions.cc:55
opencog::StandardException::parse_error_message(char const*,
__va_list_tag*, bool)
5: exceptions.cc:82
opencog::StandardException::parse_error_message(char const*, char const*,
__va_list_tag*, bool)
6: exceptions.cc:142
opencog::RuntimeException::RuntimeException(char const*, char const*, ...)
7: SchemeEval.cc:1068
opencog::SchemeEval::apply_v(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, opencog::Handle)
8: SchemeEval.h:185
opencog::SchemeEval::apply_tv(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, opencog::Handle)
9: shared_ptr_base.h:658
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
10: DefaultPatternMatchCB.cc:528
opencog::DefaultPatternMatchCB::clause_match(opencog::Handle const&,
opencog::Handle const&, std::map<opencog::Handle, opencog::Handle,
std::less<opencog::Handle>, std::allocator<std::pair<opencog::Handle const,
opencog::Handle> > > const&)
11: PatternMatchEngine.cc:1582
opencog::PatternMatchEngine::clause_accept(opencog::Handle const&,
opencog::Handle const&)
12: PatternMatchEngine.cc:1517
opencog::PatternMatchEngine::do_term_up(std::shared_ptr<opencog::PatternTerm>
const&, opencog::Handle const&, opencog::Handle const&)
13: PatternMatchEngine.cc:1397
opencog::PatternMatchEngine::explore_single_branch(std::shared_ptr<opencog::PatternTerm>
const&, opencog::Handle const&, opencog::Handle const&)
14: PatternMatchEngine.cc:1327
opencog::PatternMatchEngine::explore_choice_branches(std::shared_ptr<opencog::PatternTerm>
const&, opencog::Handle const&, opencog::Handle const&)
15: PatternMatchEngine.cc:1298
opencog::PatternMatchEngine::explore_link_branches(std::shared_ptr<opencog::PatternTerm>
const&, opencog::Handle const&, opencog::Handle const&)
16: PatternMatchEngine.cc:1169
opencog::PatternMatchEngine::explore_term_branches(opencog::Handle const&,
opencog::Handle const&, opencog::Handle const&)
17: PatternMatchEngine.cc:2078
opencog::PatternMatchEngine::explore_clause(opencog::Handle const&,
opencog::Handle const&, opencog::Handle const&)
18: InitiateSearchCB.cc:830
opencog::InitiateSearchCB::variable_search(opencog::PatternMatchEngine*)
19: PatternMatch.cc:358
opencog::PatternLink::satisfy(opencog::PatternMatchCallback&) const
20: PatternMatch.cc:339
opencog::BindLink::imply(opencog::PatternMatchCallback&,
opencog::AtomSpace*, bool)
21: Implicator.cc:102 opencog::do_imply(opencog::AtomSpace*,
opencog::Handle const&, opencog::Implicator&, bool)
22: DefaultImplicator.h:35
opencog::DefaultImplicator::~DefaultImplicator()
23: Satisfier.cc:182 opencog::satisfying_set(opencog::AtomSpace*,
opencog::Handle const&, unsigned long)
24: Instantiator.cc:476
opencog::Instantiator::walk_tree(opencog::Handle const&, bool)
25: Instantiator.cc:637
opencog::Instantiator::instantiate(opencog::Handle const&,
std::map<opencog::Handle, opencog::Handle, std::less<opencog::Handle>,
std::allocator<std::pair<opencog::Handle const, opencog::Handle> > >
const&, bool)
26: stl_tree.h:858 std::_Rb_tree<opencog::Handle,
std::pair<opencog::Handle const, opencog::Handle>,
std::_Select1st<std::pair<opencog::Handle const, opencog::Handle> >,
std::less<opencog::Handle>, std::allocator<std::pair<opencog::Handle const,
opencog::Handle> > >::~_Rb_tree()
27: SchemeModule.cc:69
opencog::FunctionWrap::as_wrapper_v_h(opencog::Handle)
28: shared_ptr_base.h:658
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
29: SchemePrimitive.cc:162
opencog::PrimitiveEnviron::do_call(scm_unused_struct*, scm_unused_struct*)
30: vm-engine.c:787 vm_debug_engine()
31: vm.c:1258 scm_call_n()
32: eval.c:664 scm_primitive_eval()
33: eval.c:696 scm_eval()
34: script.c:454 scm_shell()
35: init.c:342 invoke_main_func()
36: continuations.c:422 c_body()
37: vm-engine.c:787 vm_regular_engine()
38: vm.c:1258 scm_call_n()
39: throw.c:139 catch()
40: continuations.c:367 scm_i_with_continuation_barrier()
41: continuations.c:461 scm_c_with_continuation_barrier()
42: threads.c:664 with_guile()
43: misc.c:1968 GC_call_with_stack_base()
44: threads.c:711 scm_with_guile()
45: init.c:328 scm_boot_guile()
46: guile.c:103 main()
47: libc-start.c:325 __libc_start_main()
48: [0x400a09] ??() ??:0
ERROR: In procedure opencog-extension:
Throw to key `C++-EXCEPTION' with args `("cog-execute!"
"Backtrace:\n 7 (opencog-extension cog-execute! (#))\n
6 (apply-smob/1 #<catch-closure 15faba0>)\n 5 (apply-smob/1
#<catch-closure 15fab20>)\nIn ice-9/eval.scm:\n 191:27 4 (_ #f)\n
223:20 3 (proc #<directory (guile-user) 112f140>)\nIn unknown
file:\n 2 (%resolve-variable (7 . r2l-check-name) #<directory
(guile-user) 112f140>)\nIn ice-9/boot-9.scm:\n 751:25 1
(dispatch-exception 0 unbound-variable (#f \"Unbound variable: ~S\"
(r2l-check-name) #f))\nIn unknown file:\n 0 (apply-smob/1
#<catch-closure 15faae0> unbound-variable #f \"Unbound variable: ~S\"
(r2l-check-name) #f)\n\nERROR: In procedure apply-smob/1:\nUnbound
variable: r2l-check-name\nABORT: unbound-variable\n
(/tmp/atomspace-master/opencog/guile/SchemeEval.cc:1068)\nFunction
args:\n((BindLink\n (TypedVariableLink\n (VariableNode
\"$X\")\n (TypeChoice\n (TypeNode
\"EvaluationLink\")\n (TypeNode \"InheritanceLink\")\n
(TypeNode \"PredicateNode\")\n (TypeNode \"ConceptNode\")\n
)\n )\n (AndLink\n (VariableNode \"$X\")\n
(EvaluationLink\n (GroundedPredicateNode \"scm:
gt-zero-confidence\")\n (VariableNode \"$X\")\n )\n )\n
(ExecutionOutputLink\n (GroundedSchemaNode \"scm:
negation-introduction-formula\")\n (ListLink\n
(NotLink\n (VariableNode \"$X\")\n )\n
(VariableNode \"$X\")\n )\n )\n)\n)")'.
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
I'm I missing some modules?
On Monday, December 17, 2018 at 6:01:19 AM UTC, Nil wrote:
>
> On 12/14/18 5:49 PM, Johannes Castner wrote:
> > How is the negation-introduction-rule invoked?
> >
> > I'm doing the following:
> >
> > (define p (PredicateNode "p" (stv 0.6 0.8)))
> >
> > (negation-introduction-rule p)
>
> A rule, in its given form cannot be applied on a given source (or
> target), rather it is applied over the entire atomspace (or possibly its
> attentional). Thus
>
> (cog-execute! negation-introduction-rule)
>
> The following methods
>
>
> https://github.com/opencog/atomspace/blob/master/opencog/rule-engine/Rule.h#L230-L266
>
>
> can be used to unify a rule with a given source or target and thus
> restrict its applying to that given source or target, however it hasn't
> been exposed to scheme yet.
>
> Nil
>
> >
> > and then I'm getting this error:
> >
> > ERROR: Wrong type to apply: (BindLink
> > (TypedVariableLink
> > (VariableNode "$X")
> > (TypeChoice
> > (TypeNode "EvaluationLink")
> > (TypeNode "InheritanceLink")
> > (TypeNode "PredicateNode")
> > (TypeNode "ConceptNode")
> > )
> > )
> > (AndLink
> > (VariableNode "$X")
> > (EvaluationLink
> > (GroundedPredicateNode "scm: gt-zero-confidence")
> > (VariableNode "$X")
> > )
> > )
> > (ExecutionOutputLink
> > (GroundedSchemaNode "scm: negation-introduction-formula")
> > (ListLink
> > (NotLink
> > (VariableNode "$X")
> > )
> > (VariableNode "$X")
> > )
> > )
> > )
> >
> >
> > On Friday, December 14, 2018 at 6:59:41 AM UTC, Nil wrote:
> >
> > Hi Johannes,
> >
> > On 12/13/18 6:08 PM, Johannes Castner wrote:
> > > I have a question about predicates and truth values: How is it
> > said in
> > > PLN that if predicate p has (stv 0.6 1) then Not p should
> > obviously have
> > > (stv 0.4 1) right ...if it is true that being fast has certain
> > > probability 0.6 then not being fast should automatically be
> assigned
> > > certain probability 0.4 right? Or am I wrong?
> >
> > Correct.
> >
> > See
> >
> >
> https://github.com/opencog/opencog/blob/master/opencog/pln/rules/wip/negation-introduction.scm
>
> > <
> https://github.com/opencog/opencog/blob/master/opencog/pln/rules/wip/negation-introduction.scm>
>
>
> >
> >
> > Soon you'll be able to use pln by loading the pln module in say
> scheme
> >
> > ```
> > (use-modules (opencog pln))
> > ```
> >
> > and choose amongst some predefined rule sets.
> >
> > It's not there yet however, the Not rule would not be loaded for
> > instance, the best is to configure your rule base yourself. See
> > https://wiki.opencog.org/w/URE_Configuration_Format
> > <https://wiki.opencog.org/w/URE_Configuration_Format> for more
> > information (it's a bit outdated but still mostly relevant). See
> also
> > examples
> >
> >
> https://github.com/opencog/atomspace/tree/master/examples/rule-engine <
> https://github.com/opencog/atomspace/tree/master/examples/rule-engine>
> >
> > https://github.com/opencog/opencog/tree/master/examples/pln
> > <https://github.com/opencog/opencog/tree/master/examples/pln>
> >
> > Nil
> >
> > >
> > > Johannes
> > >
> > > On Thursday, December 13, 2018 at 11:00:25 AM UTC, Nil wrote:
> > >
> > > On 12/13/18 9:18 AM, Linas Vepstas wrote:
> > > > So maybe use GPN's, but then "hide" them behind
> "well-known"
> > > > DefinedPredicateNodes.
> > > > Since they're defined, they could be used for reasoning.
> I
> > > dunno. I
> > > > still don't really
> > > > know how to do reasoning ...
> > >
> > > In principle reasoning can be performed on anything, even
> > > GroundedPredicateNodes. All you need is to "axiomatize" them,
> > for
> > > instance if you want to say that `near` is symmetric you'd
> write
> > >
> > > ImplicationScope (stv 1 1)
> > > VariableList
> > > Variable "$X"
> > > Variable "$Y"
> > > Evaluation
> > > GroundedPredicate "near"
> > > List
> > > Variable "$X"
> > > Variable "$Y"
> > > Evaluation
> > > GroundedPredicate "near"
> > > List
> > > Variable "$Y"
> > > Variable "$X"
> > >
> > > or if you already have higher knowledge about symmetry, maybe
> > you'd
> > > just write
> > >
> > > Member (stv 1 1)
> > > GroundedPredicate "near"
> > > Concept "symmetric"
> > >
> > > In practice I don't know how well the URE would chew on
> > > GroundedPredicate though, as they have a special meaning to
> the
> > > pattern matcher, as virtual clauses. Would need to try and
> > fix what
> > > needs to be fixed, quote what needs to be quoted, etc. Alexey
> > and his
> > > team have already stumbled on that kind of problems when
> > trying to
> > > incorporate neural nets to the URE.
> > >
> > > Nil
> > >
> > > --
> > > 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] <javascript:>
> > > <mailto:[email protected] <javascript:>>.
> > > To post to this group, send email to [email protected]
> > <javascript:>
> > > <mailto:[email protected] <javascript:>>.
> > > Visit this group at https://groups.google.com/group/opencog
> > <https://groups.google.com/group/opencog>.
> > > To view this discussion on the web visit
> > >
> >
> https://groups.google.com/d/msgid/opencog/217bfe32-13e2-4bc8-9b6d-8973350e0877%40googlegroups.com
>
> > <
> https://groups.google.com/d/msgid/opencog/217bfe32-13e2-4bc8-9b6d-8973350e0877%40googlegroups.com>
>
>
> >
> > >
> > <
> https://groups.google.com/d/msgid/opencog/217bfe32-13e2-4bc8-9b6d-8973350e0877%40googlegroups.com?utm_medium=email&utm_source=footer
>
> > <
> https://groups.google.com/d/msgid/opencog/217bfe32-13e2-4bc8-9b6d-8973350e0877%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
>
> >
> > > For more options, visit https://groups.google.com/d/optout
> > <https://groups.google.com/d/optout>.
> >
> > --
> > 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] <javascript:>
> > <mailto:[email protected] <javascript:>>.
> > To post to this group, send email to [email protected]
> <javascript:>
> > <mailto:[email protected] <javascript:>>.
> > Visit this group at https://groups.google.com/group/opencog.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/opencog/a43ca4cd-12e0-4b30-b4bb-9b9924da46e4%40googlegroups.com
>
> > <
> https://groups.google.com/d/msgid/opencog/a43ca4cd-12e0-4b30-b4bb-9b9924da46e4%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
>
> > For more options, visit https://groups.google.com/d/optout.
>
--
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/opencog.
To view this discussion on the web visit
https://groups.google.com/d/msgid/opencog/1ade30e5-5ac9-4e53-8fd1-8a445cc83c15%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.