[opencog-dev] Trying to implement path reasoning on Predicates but running into inference problems.

2020-01-08 Thread Alexander Gabriel
Hiya! I'm using opencog in an agri-robotics project. What I'm trying to do is reason over a map/graph of nodes to find out if there is a free path from the robot to a human co-worker. To that end I introduced predicates like this: EvaluationLink( PredicateNode("linked"), ListLi

Re: [opencog-dev] Trying to implement path reasoning on Predicates but running into inference problems.

2020-01-10 Thread Alexander Gabriel
trength even for GetLink results, right? Is there a way to avoid adding the query to the atomspace in python? > So something unintended seems to be happening. Can you point me to the > full script of your experiment? > I boiled the test code down a bit to make it ea

Re: [opencog-dev] Trying to implement path reasoning on Predicates but running into inference problems.

2020-01-10 Thread Alexander Gabriel
Am Freitag, 10. Januar 2020 12:45:48 UTC schrieb Nil: > > 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-gabr

Re: [opencog-dev] Trying to implement path reasoning on Predicates but running into inference problems.

2020-01-10 Thread Alexander Gabriel
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

Re: [opencog-dev] Trying to implement path reasoning on Predicates but running into inference problems.

2020-01-10 Thread Alexander Gabriel
Hi Linas! > 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. > Thanks for the tip! :) Do you have any idea why the formula/code fails to produce proper infere

Re: [opencog-dev] Trying to implement path reasoning on Predicates but running into inference problems.

2020-01-10 Thread Alexander Gabriel
Hi Linas, > 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.

Re: [opencog-dev] Trying to implement path reasoning on Predicates but running into inference problems.

2020-01-10 Thread Alexander Gabriel
uery) chainer.do_chain() results = chainer.get_results() print("Result {:}".format(results)) try: print("Truth: {:}".format(results.get_out()[0].tv)) except: pass print("\n

Re: [opencog-dev] Trying to implement path reasoning on Predicates but running into inference problems.

2020-01-13 Thread Alexander Gabriel
Am Montag, 13. Januar 2020 06:23:15 UTC schrieb Nil: > > Alex, > > On 1/10/20 3:58 PM, Alexander Gabriel wrote: > > InheritanceLink( > > rbs, > > ConceptNode("URE")) > > so you know, as of today, you don't need to crea

Re: [opencog-dev] Trying to implement path reasoning on Predicates but running into inference problems.

2020-01-13 Thread Alexander Gabriel
Hi Nil, Am Montag, 13. Januar 2020 06:46:06 UTC schrieb Nil: > > Hi Alex, Vitaly, > > Alex, please set the level of the ure logger to debug and attach the log > file here. > I set the debug level as indicated by Vitaly, but the only output in the opencog.log is this : [2020-01-13 17:58:15:775

Re: [opencog-dev] Trying to implement path reasoning on Predicates but running into inference problems.

2020-01-14 Thread Alexander Gabriel
Hi! > That's not normal. Alex, after setting up the log level, what do you get > from calling (in scheme) > > (ure-logger-get-level) > I added that line right after the line where I set the log level as such: execute_code = \ ''' (use-modules (opencog logger) (opencog ure)) (

Re: [opencog-dev] Trying to implement path reasoning on Predicates but running into inference problems.

2020-01-14 Thread Alexander Gabriel
> > You should BTW be able to use > > (ure-logger-set-level! "DEBUG") > > as long as the ure scheme module is loaded. > That works as well as the other line, no error, same minimal log output, no cli output from the get command. -- You received this message because you are subscribed to the

Re: [opencog-dev] Trying to implement path reasoning on Predicates but running into inference problems.

2020-01-14 Thread Alexander Gabriel
Hi Linas, Am Dienstag, 14. Januar 2020 15:12:35 UTC schrieb linas: > > 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 > u

Re: [opencog-dev] Trying to implement path reasoning on Predicates but running into inference problems.

2020-01-14 Thread Alexander Gabriel
> > (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") > (co

Re: [opencog-dev] Trying to implement path reasoning on Predicates but running into inference problems.

2020-01-14 Thread Alexander Gabriel
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" gr

[opencog-dev] Re: Trying to implement path reasoning on Predicates but running into inference problems.

2020-01-15 Thread Alexander Gabriel
Hi all, I ran another test concerning the interaction between AndLink and EvaluationLink variables = VariableList(TypedVariableLink(VariableNode("origin"), TypeNode("ConceptNode")), TypedVariableLink(VariableNode("destination"), TypeNode("ConceptNode"))) query = AndLink(EvaluationLink(

Re: [opencog-dev] Re: Trying to implement path reasoning on Predicates but running into inference problems.

2020-01-16 Thread Alexander Gabriel
> > 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. > >

Re: [opencog-dev] Re: Trying to implement path reasoning on Predicates but running into inference problems.

2020-01-16 Thread Alexander Gabriel
> > Also, are you sure you want to use StateLink? I tend to think reasoning > works better on immutable structures. > The robot needs to decide what to do based on the state of the human and the environment, so if the human has a crate do this, if not do that. Thus I need to keep track of the

Re: [opencog-dev] Re: Trying to implement path reasoning on Predicates but running into inference problems.

2020-01-16 Thread Alexander Gabriel
> > > 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

[opencog-dev] I guess my reasoning rule can't find the defined python function

2020-01-20 Thread Alexander Gabriel
Hiya, with your help I got most of my reasoning running in a test setting, running it under my ROS node though, fails due to the python function (which calculates truth values) not being called. Does anyone have a clue how the code searches for the function name when we call it like so:

Re: [opencog-dev] I guess my reasoning rule can't find the defined python function

2020-01-20 Thread Alexander Gabriel
better error logging .. finding the problem should not > require a dive into the bowels of teh code. Triple-check your error logs > ... > > --linas > > On Mon, Jan 20, 2020 at 3:03 PM Alexander Gabriel > wrote: > >> Hiya, >> >> with your help I got m

Re: [opencog-dev] I guess my reasoning rule can't find the defined python function

2020-01-20 Thread Alexander Gabriel
that would make this clear for the next > person. Anatoly, Vitaly, opinions? Can you fix this so that this kind of > user-error is easier to track down? > > --linas > > (I can't cc Anatoly, can't find his email.) > > On Mon, Jan 20, 2020 at 4:18 PM Alexander Gabriel &

[opencog-dev] backward chaining, IdenticalLink and NotLink seemingly misbehaving, strange occurrences of VariableLinks in chaining results

2020-02-26 Thread Alexander Gabriel
Hello all! Thank you again for all your support last I time I asked. In the meantime I made quite some progress on my project, but now I'm again at a point where I could use your expertise. I know most of you are more comfortable on the scheme side of things, so I converted my current problem s

[opencog-dev] chainer and cog-execute ignore grounded atoms and assume erroneous (default) truth values

2020-02-26 Thread Alexander Gabriel
Hiya everyone! Here is another problem that I ran into. When a query contains grounded atoms those are ignored (not evaluated) when considering the output. To demonstrate that I created this small example. (use-modules (opencog) (opencog logger) (opencog exec) (opencog ure)) (define rbs (Concep

Re: [opencog-dev] backward chaining, IdenticalLink and NotLink seemingly misbehaving, strange occurrences of VariableLinks in chaining results

2020-02-26 Thread Alexander Gabriel
Am Mittwoch, 26. Februar 2020 15:51:21 UTC schrieb linas: > > Hi Alex, > > You might need ...@Nil Geisweiller to give you the full, > complete reply, as I'm just not that good with the URE. But I think I can > help clarify a few issues. > > I didn't test, but I think that maybe your bug goes

Re: [opencog-dev] chainer and cog-execute ignore grounded atoms and assume erroneous (default) truth values

2020-02-26 Thread Alexander Gabriel
Am Mittwoch, 26. Februar 2020 18:22:29 UTC schrieb linas: > > Hi Alex, > > The answer: yes, or rather no, and there's a bug in your example. > > The URE is built on top of the pattern matcher, and as mentioned earlier, > the pattern matcher never alters truth values, and rarely looks at them, a

Re: [opencog-dev] chainer and cog-execute ignore grounded atoms and assume erroneous (default) truth values

2020-02-26 Thread Alexander Gabriel
Am Mittwoch, 26. Februar 2020 20:00:07 UTC schrieb linas: > > > > On Wed, Feb 26, 2020 at 12:47 PM Alexander Gabriel > wrote: > >> >> >> Am Mittwoch, 26. Februar 2020 18:22:29 UTC schrieb linas: >>> >>> Hi Alex, >>> >&

Re: [opencog-dev] chainer and cog-execute ignore grounded atoms and assume erroneous (default) truth values

2020-02-26 Thread Alexander Gabriel
Oh! This is super helpful. Thank you so much! :) I'm coding in python (and haven't seen a cog-link equivalent yet, but there might still be one. But since I want to stick this into a complex pattern, I will give (Get (State (Concept "stop-light") (Variable "x"))) a chance. That'd be another proble

Re: [opencog-dev] backward chaining, IdenticalLink and NotLink seemingly misbehaving, strange occurrences of VariableLinks in chaining results

2020-02-28 Thread Alexander Gabriel
> >> Nice, thank you! Yes adding the PresentLinks to the target reduced the >> number of results that came with the fuzzy-conjuction rule to one and the >> one is the right one, alice and bob. Unfortunately, the IdenticalLink still >> doesn't get a non-default truth value automatically and if

Re: [opencog-dev] chainer and cog-execute ignore grounded atoms and assume erroneous (default) truth values

2020-02-29 Thread Alexander Gabriel
Am Donnerstag, 27. Februar 2020 04:07:03 UTC schrieb Nil: > > Hi Alex, > > my recommendation is that you turn on the URE log and look at the > atomese code generated by the URE. > Hi Nil, I added the set_component method of the Logger class to the cython logger interface, but after setting

Re: [opencog-dev] backward chaining, IdenticalLink and NotLink seemingly misbehaving, strange occurrences of VariableLinks in chaining results

2020-02-29 Thread Alexander Gabriel
> > I would have to look at it more carefully (later as I'm busy these > days), but I'm almost sure that's the problem. The PLN formulae updates > the TV of the conclusion based on the TV stored on the premises. > > It would be cool if the URE could handle seamlessly fleeting values > though,

[opencog-dev] Backward Chainer performance difference problem

2020-03-01 Thread Alexander Gabriel
Hi guys! I've run into a performance problem. When I run the backward chainer with this query: (GetLink (VariableList (TypedVariableLink (VariableNode "picker") (TypeNode "ConceptNode")) (TypedVariableLink (VariableNode "human") (TypeNode "ConceptNode")) (TypedVariableLink (Vari

Re: [opencog-dev] Backward Chainer performance difference problem

2020-03-02 Thread Alexander Gabriel
Am Montag, 2. März 2020 07:22:23 UTC schrieb Nil: > > Hi Alex, > > On 3/2/20 4:55 AM, Alexander Gabriel wrote: > > When I run the backward chainer with this query: > > | > > (GetLink > >(VariableList > > (TypedVariableLink (Variab

Re: [opencog-dev] Backward Chainer performance difference problem

2020-03-02 Thread Alexander Gabriel
> No, it typically doesn't need to execute the link it is doing inference > on, rather it runs inference trees constructed from inference rules that > produces the target, including updating its TV. Whether this is fast or > slow depends on the inference trees, not so much the target. I'm

Re: [opencog-dev] chainer and cog-execute ignore grounded atoms and assume erroneous (default) truth values

2020-03-02 Thread Alexander Gabriel
Am Montag, 2. März 2020 07:07:09 UTC schrieb Nil: > > Hi Alex, > > On 2/29/20 6:20 PM, Alexander Gabriel wrote:> Do you know of a way to > get access to the URE logger from python that > > already works? > > Unfortunately I don't know a way, useless you c

Re: [opencog-dev] Backward Chainer performance difference problem

2020-03-02 Thread Alexander Gabriel
> > >> >> If I exclude it from both I get: >> terminate called after throwing an instance of >> 'opencog::InvalidParamException' >> what(): The variable (VariableNode "person2") does not appear >> (unquoted) in any clause! >> (/home/rasberry/git/atomspace/opencog/atoms/pattern/PatternLink.cc

Re: [opencog-dev] Backward Chainer performance difference problem

2020-03-02 Thread Alexander Gabriel
Am Montag, 2. März 2020 14:37:12 UTC schrieb linas: > > > >> Yes, that doesn't scale to what I intend to do. >> > > I'd like to know why you think that. (what you are trying to do). I'm > interested in understanding and solving scaling problems. > The robot needs to make sure it can reach the

Re: [opencog-dev] Backward Chainer performance difference problem

2020-03-02 Thread Alexander Gabriel
Am Montag, 2. März 2020 16:55:02 UTC schrieb linas: > > Ah! > -- So, if you just need a motion planner that works (as opposed to messing > with the theory of it) then, as a practical solution, I would recommend > just grabbing something off the shelf and wiring it in, ad hoc. > Yes, I'm aware

Re: [opencog-dev] Backward Chainer performance difference problem

2020-03-04 Thread Alexander Gabriel
> > Every time an inference tree is created it is executed, and results are > collected, and returned the user at the end. > I see, in that context, should this example take so long? https://github.com/opencog/ure/issues/67 Best, Alex -- You received this message because you are subscribed

Re: [opencog-dev] chainer and cog-execute ignore grounded atoms and assume erroneous (default) truth values

2020-03-04 Thread Alexander Gabriel
> > > Oh, I see, so in order to use opencog's logger in Python ones needs to > first create one with > > > https://github.com/opencog/atomspace/blob/f7b99ec12d920f7a385cc477dd54abdc0a8768b1/opencog/cython/opencog/logger.pyx#L38-L47 > > > Am I correct? > Hi Nil, you can also use the singleto

[opencog-dev] DefinedPredicateNode vs BackwardChainer

2020-04-27 Thread Alexander Gabriel
Hiya! I've stumbled upon a new problem I could use your help with. I've been trying to run a very rudimentary example to understand what goes wrong here: If I run the queries below through the backward chainer, query_A with the PredicateNode works fine, but if I run query_B with the DefinedPr

Re: [opencog-dev] DefinedPredicateNode vs BackwardChainer

2020-05-06 Thread Alexander Gabriel
Am Dienstag, 5. Mai 2020 09:10:54 UTC+1 schrieb Nil: > > Hi Alex, > > I think there is no reasoning needed here, a pattern matcher query would > suffice, that is said it the BC should succeed at the first iteration. > > I see query_B is using DefinedPredicateNode("is_tall_B") while your > Defin

Re: [opencog-dev] chainer and cog-execute ignore grounded atoms and assume erroneous (default) truth values

2020-05-06 Thread Alexander Gabriel
Hi Linas! Am Mittwoch, 26. Februar 2020 22:24:45 UTC schrieb linas: > > If you really need it to work in *all* cases, then something like this: > > (DefineLink > (DefinedPredicate "is in state") > (Lambda > (VariableList (Variable "a") (Variable "b")) > (Equal (Variable

Re: [opencog-dev] chainer and cog-execute ignore grounded atoms and assume erroneous (default) truth values

2020-05-06 Thread Alexander Gabriel
Am Mittwoch, 6. Mai 2020 18:42:33 UTC+1 schrieb linas: > > I think you are mis-using the StateLink. The intent of the StateLink is to > force an atomic one-and-only-one "membership", ever. Thus the example > (State (Concept "traffic light") (Concept "red")) means that "traffic > light" can onl

Re: [opencog-dev] chainer and cog-execute ignore grounded atoms and assume erroneous (default) truth values

2020-05-06 Thread Alexander Gabriel
Am Mittwoch, 6. Mai 2020 20:55:40 UTC+1 schrieb linas: > > I just realized that the example below has a misleading, confusing bug in > it. (besides the missing SetLink) The fix is ... > > On Wed, May 6, 2020 at 7:31 AM Alexander Gabriel > wrote: > >> >>

[opencog-dev] strange PresentLink, AbsentLink, NotLink, AndLink interactions

2020-05-19 Thread Alexander Gabriel
Hi guys, I'm somewhat confused regarding the results of this experiment. Am I doing something wrong or are there bugs responsible for the results? It seems to me like (NotLink (PresentLink ..)) doesn't produce the correct results, (NotLink (AndLink (PresentLink ...))) produces the same results.

Re: [opencog-dev] DefinedPredicateNode vs BackwardChainer

2020-05-19 Thread Alexander Gabriel
>(EvaluationLink > (DefinedPredicateNode "is_tall_B") > (VariableNode "person") >) > ) > > instead of calling the backward chainer? > it worked in the pattern matcher. > > On 5/6/20 1:31 PM, Alexander Gabriel wrote: