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

2020-01-14 Thread Linas Vepstas
On Tue, Jan 14, 2020 at 10:13 AM Alexander Gabriel wrote: > 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. > I'm not sure how they designed the logger code, I think its supposed to just be a flag for tracing a

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"

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") >

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

2020-01-14 Thread Linas Vepstas
OK, that seems to be new enough and with self-consistent timestamps, it should work. Try fiddling with the logger all by itself, at the guile prompt, see if you can make it work. The only issue I can think of would be with regards to the cogserver: the logger works both with and without 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 >

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

2020-01-14 Thread Linas Vepstas
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? --

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

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

2020-01-14 Thread 'Nil Geisweiller' via opencog
On 1/14/20 2:08 PM, Alexander Gabriel wrote:     (cog-logger-set-level! (cog-ure-logger) "DEBUG") You should BTW be able to use (ure-logger-set-level! "DEBUG") as long as the ure scheme module is loaded. Nil -- You received this message because you are subscribed to the Google Groups

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 'Nil Geisweiller' via opencog
Hi, On 1/13/20 8:03 PM, Alexander Gabriel wrote: 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] [INFO] [global_python_initialize] Start [2020-01-13 17:58:15:775] [INFO] [global_python_initialize] Adding OpenCog

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

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 create this inheritance > link, it's not used anywhere.

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

2020-01-13 Thread Vitaly Bogdanov
>> It doesn't look like I can add the variables using an optional argument: > >It would be strange if such argument hasn't been ported. Any idea about >that Vitaly (or someone else)? Yes it is ported, the name of the parameter is `vardecl`. I believe the following should work: ```

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

2020-01-12 Thread 'Nil Geisweiller' via opencog
Hi Alex, Vitaly, Alex, please set the level of the ure logger to debug and attach the log file here. Vitaly, please tell Alex how to set the ure logger level if he doesn't know how. Also how can we find documentation about the Python API of the URE (I probably should learn it as well)?

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

2020-01-12 Thread 'Nil Geisweiller' via opencog
On 1/10/20 3:33 PM, Alexander Gabriel wrote: It doesn't look like I can add the variables using an optional argument: It would be strange if such argument hasn't been ported. Any idea about that Vitaly (or someone else)? I have no idea what the trace_as and control_as are used for. You

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

2020-01-12 Thread 'Nil Geisweiller' via opencog
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 create this inheritance link, it's not used anywhere. Where (in which doc or example) did you find it? So I can remove or add a note

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

2020-01-10 Thread Linas Vepstas
Yeah, beats me. I don't know how the chainer works. Nil will know more. --linas On Fri, Jan 10, 2020 at 4:50 PM Alexander Gabriel wrote: > > > Am Freitag, 10. Januar 2020 22:44:45 UTC schrieb linas: >> >> I'm not sure what to make of the email below. By "query", do you mean >> "run cog-execute!

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 22:44:45 UTC schrieb linas: > > I'm not sure what to make of the email below. By "query", do you mean "run > cog-execute! on a BindLink"? > I'm running this: queries = [] # WARN: if I add this to the queries it adds the links to the atomspace (as it

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

2020-01-10 Thread Linas Vepstas
I'm not sure what to make of the email below. By "query", do you mean "run cog-execute! on a BindLink"? if so, then you are only running the pattern matcher, and not the URE. The pattern matcher never sets or changes truth values, so you describe an impossible situation. So, I guess you are

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 Linas Vepstas
On Fri, Jan 10, 2020 at 7:58 AM Alexander Gabriel wrote: > > When I try to do that with rules defined in scheme like this: > > MemberLink(DefinedSchemaNode("bc-deduction-rule-name"), rbs) > > There's a typo in the above. It should be " bc-deduction-rule" not "bc-deduction-rule-name". Which is

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

2020-01-10 Thread Linas Vepstas
Hi Matt, Hi Alex: 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

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

2020-01-10 Thread Matthew Ikle
Hmmm. The code snippet I saw looks nothing like what the PLN deduction rule should look like, but rather a heuristic that binarizes the result perhaps for efficiency or for some specialized use case. As Linas says, Nil might know more about why that deduction rule is coded the way it is. The

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

2020-01-10 Thread Linas Vepstas
On Fri, Jan 10, 2020 at 2:49 PM Alexander Gabriel wrote: > 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

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

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

2020-01-10 Thread Linas Vepstas
Hi Alex, The following caught my eye: On Wed, Jan 8, 2020 at 8:39 AM Alexander Gabriel wrote: > 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 =

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-gabriel/8e4593e76120752cbccb9a5c73cec691>.

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

2020-01-10 Thread Vitaly Bogdanov
>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? The following Python code: MemberLink(DefinedSchemaNode("conditional-full-instantiation-implication-meta-rule-name"),

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

2020-01-10 Thread 'Nil Geisweiller' via opencog
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 . 1. I've never used the Python binding, but I would think/hope that you

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 06:20:01 UTC schrieb Nil: > > > 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

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

2020-01-09 Thread 'Nil Geisweiller' via opencog
Hi Alex, On 1/8/20 4:39 PM, Alexander Gabriel wrote: and the following inference rule (because I couldn't find PLN rule that covers this case): The existing deduction rules https://github.com/opencog/pln/blob/master/opencog/pln/rules/term/deduction.scm are only defined for implication and