How can I download all OpenCog Link definitions, and models behind them?

159 views
Skip to first unread message

Mindey I.

unread,
Dec 11, 2017, 2:44:33 PM12/11/17
to opencog
Hello everyone,

is there a simple way to download OpenCog KR model in a machine-readable format, so I could try representing knowledge, learning relations and reason with OpenCog links and models without installing the software per se?

For example, I'd like to get a list of all "Links", with machine-readable mathematical, linguistic, and ML model-based definitions, and reproducible code to re-learn them, or re-implement them.

My interest is in integration of all learning and reasoning systems, and I'd like to simply collect them into a machine-readable collection of models and processes, with more accessible human interface for reproducible engineering and science. (Wikipedia and arXiv are not good enough...)

Best regards,
Mindey




 

Nil Geisweiller

unread,
Dec 12, 2017, 1:56:13 AM12/12/17
to ope...@googlegroups.com
Hi,

On 12/11/2017 09:44 PM, Mindey I. wrote:
> Hello everyone,
>
> is there a simple way to download OpenCog KR model in a machine-readable
> format, so I could try representing knowledge, learning relations and
> reason with OpenCog links and models without installing the software per se?

I'm afraid not, certainly not easily. What format would you have in
mind? Prolog? KIF?

Beside the logic you'd also have to represent truth values (second order
probabilistic distributions representing uncertainty, though in
practice, for now we only use SimpleTruthValue that can be represented
by 2 numbers https://wiki.opencog.org/w/TruthValue#SimpleTruthValue).

Sure, everything is possible but it looks like you'd have to write the
translation tool yourself.

Nil

>
> For example, I'd like to get a list of all "Links", with
> machine-readable mathematical, linguistic, and ML model-based
> definitions, and reproducible code to re-learn them, or re-implement them.
>
> My interest is in integration of all learning and reasoning systems, and
> I'd like to simply collect them into a machine-readable collection of
> models and processes, with more accessible human interface for
> reproducible engineering and science. (Wikipedia and arXiv are not good
> enough...)
>
> Best regards,
> Mindey
>
>
>
>
> --
> 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
> <mailto:opencog+u...@googlegroups.com>.
> To post to this group, send email to ope...@googlegroups.com
> <mailto:ope...@googlegroups.com>.
> 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/62287087-a54c-47fa-98a4-4cc68be85bf4%40googlegroups.com
> <https://groups.google.com/d/msgid/opencog/62287087-a54c-47fa-98a4-4cc68be85bf4%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Linas Vepstas

unread,
Dec 12, 2017, 7:57:21 PM12/12/17
to opencog
On Tue, Dec 12, 2017 at 12:56 AM, 'Nil Geisweiller' via opencog <ope...@googlegroups.com> wrote:
Hi,

On 12/11/2017 09:44 PM, Mindey I. wrote:
Hello everyone,

is there a simple way to download OpenCog KR model in a machine-readable format, so I could try representing knowledge, learning relations and reason with OpenCog links and models without installing the software per se?

I'm afraid not, certainly not easily. What format would you have in mind? Prolog? KIF?

Well, technically, opencog does not have any KR model. It is a language for describing KR models. In some vague philosophical sense, it maybe could be able to describe itself, but there's just a huge amount of stuff buried in C++ code that this would never be workable in practice.  I don't think we could ever quite capture what the pattern matcher, pattern miner, rule engine, or PLN actually do, simply by writing some atomese (or kif or prolog or ...) that describe it.  You would need to have a C++-to-kif, or C++-to-prolog translator to capture the intricacies.

Opencog has something like half a dozen different KR models in it:

-- that used by PLN and R2L mostly consisting of ConceptNodes, PredicateNodes, InheritanceLinks and MemberLinks
-- that used the language subsystem, consisting of WordNodes, and the like
-- that used by the language learning subsystem, using SectionLinks, etc.
-- that used by ghost, using.. whatever ghost uses.
-- misc space and time KR subsystems
-- an old obsolete KR system used by the old/obsolete question-answering subsystem
-- and old obsolete system used for the minecraft virtual world



Beside the logic you'd also have to represent truth values (second order probabilistic distributions representing uncertainty, though in practice, for now we only use SimpleTruthValue that can be represented by 2 numbers https://wiki.opencog.org/w/TruthValue#SimpleTruthValue).

Sure, everything is possible but it looks like you'd have to write the translation tool yourself.

Nil


For example, I'd like to get a list of all "Links", with machine-readable mathematical, linguistic, and ML model-based definitions, and reproducible code to re-learn them, or re-implement them.

My interest is in integration of all learning and reasoning systems, and I'd like to simply collect them into a machine-readable collection of models and processes, with more accessible human interface for reproducible engineering and science. (Wikipedia and arXiv are not good enough...)

Best regards,
Mindey




--
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+unsubscribe@googlegroups.com <mailto:opencog+unsubscribe@googlegroups.com>.
To post to this group, send email to ope...@googlegroups.com <mailto:opencog@googlegroups.com>.
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
"The problem is not that artificial intelligence will get too smart and take over the world," computer scientist Pedro Domingos writes, "the problem is that it's too stupid and already has."

Mindey I.

unread,
Dec 13, 2017, 4:54:33 AM12/13/17
to opencog
Thank you Nil and Linas for the detailed answers.

 but there's just a huge amount of stuff buried in C++ code that this would never be workable in practice. 

If the semantics is so tightly linked to the software, then, maybe it would be more useful instead, to have namespaces for symbols like Links per representation system? For example, if we have atomese `HebbianLink` symbol, we could say that it's namespace is `atomese`, and use a `:` to reference it, like `atomese:HebbianLink`. If it comes from another system, say, KIF, and it's symbol `revappend`, we would reference it by `KIF:revappend`, if OpenCyc, and it's symbol `#$colorOfObject` - as `opencyc:#$colorOfObject`, etc. Given that each piece of software itself defines the precise meaning of the links, probably the best that such namespaces could do, is provide unified namespace for references these symbols in representation systems, and to the specific code lines in dictionaries or code repositories, or API methods that define or implement them.

Then, the question is, do we have such a global namespace of symbols per reasoning system somewhere, which would allow to easily think about and combine the different reasoning systems, or is this something to discussed and created? What is the set of notable reasoning systems?


Linas Vepstas

unread,
Dec 13, 2017, 12:32:08 PM12/13/17
to opencog
Mindey,

Atomese is not an ontology, like OpenCyc, nor is it a KR representation language, like KIF.  It is a meta-language that can describe these other two languages.  If you wish, you could take OpenCyc, and put it into the atomspace (this has been done before), or you could take anything in KIF, and put it into the atomspace.   But you cannot go in the other direction. So this doesn't make sense.  They're operating at different levels.

--linas





--
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+unsubscribe@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at https://groups.google.com/group/opencog.

For more options, visit https://groups.google.com/d/optout.

Mindey I.

unread,
Dec 13, 2017, 1:23:12 PM12/13/17
to opencog

Atomese is not an ontology, like OpenCyc, nor is it a KR representation language, like KIF.  It is a meta-language that can describe these other two languages.

For what I understand, it's an evolving generalized hypergraph database, linking hardware systems, not just software and concept definitions as hyperedges, and thus, having something else than itself to map its hyperedges is not readily possible, would that be a good way to put it? If not, what makes atomese unrepresentable in other languages?
 
If you wish, you could take OpenCyc, and put it into the atomspace (this has been done before), or you could take anything in KIF, and put it into the atomspace.   But you cannot go in the other direction. So this doesn't make sense.  They're operating at different levels.

How would things like this be addressed in atomspace? What would be the address for OpenCyc in it, or what about the address of IBM's Watson in it? A hardware I/O system is also a relation to me.

Mindey

Linas Vepstas

unread,
Dec 13, 2017, 4:39:26 PM12/13/17
to opencog
On Wed, Dec 13, 2017 at 12:23 PM, Mindey I. <min...@mindey.com> wrote:

Atomese is not an ontology, like OpenCyc, nor is it a KR representation language, like KIF.  It is a meta-language that can describe these other two languages.

For what I understand, it's an evolving generalized hypergraph database, linking hardware systems, not just software and concept definitions as hyperedges, and thus, having something else than itself to map its hyperedges is not readily possible, would that be a good way to put it? If not, what makes atomese unrepresentable in other languages?

It would be easiest to work out some examples.  Suppose your KR language has relations for "is-a", "has-part" -- these are two relations in WordNet.  In atomese, I can represent these as

EvaluationLink
     PredicateNode "is-a"
     ListLink
            Variable "$X"
            Variable "$Y"

and

EvaluationLink
     PredicateNode "has-part"
     ListLink
            Variable "$X"
            Variable "$Y"

But, in atomese, I can also write:

EvaluationLink
     PredicateNode "has-similar-color"
     ListLink
            Variable "$X"
            Variable "$Y"

Since WordNet does not have a "has similar color" relation, that's it, game over.

 
 
If you wish, you could take OpenCyc, and put it into the atomspace (this has been done before), or you could take anything in KIF, and put it into the atomspace.   But you cannot go in the other direction. So this doesn't make sense.  They're operating at different levels.

How would things like this be addressed in atomspace? What would be the address for OpenCyc in it, or what about the address of IBM's Watson in it? A hardware I/O system is also a relation to me.

I don't understand the question.  Perhaps this:

EvaluationLink
     PredicateNode "has URL"
     ListLink
            Concept "IBM Watson"
            Concept "http://www.ibm.com/watson/"

or perhaps

EvaluationLink
     PredicateNode "runs on hardware made from PowerPC"
     ListLink
            Concept "IBM Watson"

which would evaluate to "true" or "probably true".

Think of it this way:  atomese is kind-of-like json, or kind-of-like javascript, or kind-of-like prolog or kind-of-like SQL -- it is a little bit like all of these.

If your email asked: can I translate atomese into prolog, or atomese into javascript, I would have said, yes, sort-of-maybe with various difficulties.  If you asked "can I translate prolog into atomese" or "can I translate javascript into atomese" I would have said "yes, with various difficulties".

But instead you compared it to KIF and OpenCyc.  Can random prolog or javascript programs be converted to KIF or OpenCyc?  I don't think so, not in any normal sense.

--linas


 

Mindey

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at https://groups.google.com/group/opencog.

For more options, visit https://groups.google.com/d/optout.

Mindey I.

unread,
Dec 15, 2017, 6:18:02 AM12/15/17
to opencog
Linas,
 
It would be easiest to work out some examples.  Suppose your KR language has relations for "is-a", "has-part" -- these are two relations in WordNet. [...] But, in atomese, I can also write:

EvaluationLink
     PredicateNode "has-similar-color"
     ListLink
            Variable "$X"
            Variable "$Y"

Since WordNet does not have a "has similar color" relation, that's it, game over.

There is a database (Wikidata), that stores common relations, https://www.wikidata.org/wiki/Wikidata:List_of_properties/all , with their multilingual definitions. I think, a common database should serve this purpose, and ideally, we should be able to obtain a list of multilingually defined relations available in a representation language, and organize the generic relations into a list of relations coming from many representation languages. And, what I mean, is, much like we have the identifiers from various sources in Wikidata (e.g., https://www.wikidata.org/wiki/Q8495#identifiers ), I would consider the relations of metalanguages - a subject of being organized too.
 
or perhaps

EvaluationLink
     PredicateNode "runs on hardware made from PowerPC"
     ListLink
            Concept "IBM Watson"

which would evaluate to "true" or "probably true".

In such scenario, the relation "runs on hardware made from PowerPC" would also go to the compendium of relations, and the concept "IBM Watson", actually, may have concept identifier.

From what I understand, I could use atomese links like so:

EvaluationLink
    PredicateNode P1547
    ListLink
        Concept Q28817884

But I could use lisp, to say smth like:

(EvaluationLink (List (PredicateNode P1547) (ListLink (Concept Q28817884)))

which would be equivalent, but less human-readable. I suppose, the indentation syntax is part of atomese, which makes it more human-readable.

So, what remains that I wanted to know about "downloading" link definitions, is -- what is the full list of definitions of the generic symbols of atomese (like, EvaluationLink, PredicateNode, ListLink, Concept, Variable, etc.) with their definitions, and the additional syntax, like the percent sign before the variables ($X).

Think of it this way:  atomese is kind-of-like json, or kind-of-like javascript, or kind-of-like prolog or kind-of-like SQL -- it is a little bit like all of these.

Yes, I see, and grounding the EvaluationLinks, makes it possible to satisfy conditions defined in atomese.

If your email asked: can I translate atomese into prolog, or atomese into javascript, I would have said, yes, sort-of-maybe with various difficulties.  If you asked "can I translate prolog into atomese" or "can I translate javascript into atomese" I would have said "yes, with various difficulties".

But instead you compared it to KIF and OpenCyc.  Can random prolog or javascript programs be converted to KIF or OpenCyc?  I don't think so, not in any normal sense.

I see now, why. So, what I'd like to "download" so to speak, is the definition of the metalanguage in a single document (e.g., in model-theoretic sense, set of symbols and rules of language, with their definitions), rather than translating it.

Mindey

Linas Vepstas

unread,
Dec 15, 2017, 4:39:51 PM12/15/17
to opencog
On Fri, Dec 15, 2017 at 5:18 AM, Mindey I. <min...@mindey.com> wrote:
Linas,
 
It would be easiest to work out some examples.  Suppose your KR language has relations for "is-a", "has-part" -- these are two relations in WordNet. [...] But, in atomese, I can also write:

EvaluationLink
     PredicateNode "has-similar-color"
     ListLink
            Variable "$X"
            Variable "$Y"

Since WordNet does not have a "has similar color" relation, that's it, game over.

There is a database (Wikidata), that stores common relations, https://www.wikidata.org/wiki/Wikidata:List_of_properties/all , with their multilingual definitions.

Atomese defines exactly zero of relations/properties. It allows the user to define as many a they want, as long as they fit into RAM.  It provides tools for defining relations in terms of other relations; for example, there is a way to define "is an electrical part of a car" in terms of "part of", "electrical" and "car".   Similarly, one can define "car" intensionally, as a concept that has wheels, a motor, etc.   See https://wiki.opencog.org/w/EquivalenceLink

In practice, we have dozens of relations that we use informally, on a regular basis: for example, a "Word" - but these are not formally defined - the Word is currently a "string of utf8 characters from a text sentence" but we might someday bend this definition in the future, to include spoken words, or words with inflections, phonemic markup, its not rigid, we hack as we go along. 
 

 
or perhaps

EvaluationLink
     PredicateNode "runs on hardware made from PowerPC"
     ListLink
            Concept "IBM Watson"

which would evaluate to "true" or "probably true".

In such scenario, the relation "runs on hardware made from PowerPC" would also go to the compendium of relations, and the concept "IBM Watson", actually, may have concept identifier.

Yes, and we have a formal syntax by which one can define  "runs on hardware made from PowerPC"  in terms of "PowerPC", "made from", "hardware" and "runs on".  So there are two ways to create new relations: just write down a string of utf8 characters, from thin air, and don't explain what they mean, or provide a definition in terms of previous relations.  See https://wiki.opencog.org/w/EquivalenceLink

From what I understand, I could use atomese links like so:

EvaluationLink
    PredicateNode P1547
    ListLink
        Concept Q28817884

We use this indented white-space style in emails, and in books (there are 3-4 books on atomese) and published papers.

But I could use lisp, to say smth like:

(EvaluationLink (List (PredicateNode P1547) (ListLink (Concept Q28817884)))

which would be equivalent, but less human-readable.

We have scheme bindings, which use the above form. We also have python, haskell and c++ bindings.  If you think that the scheme bindings are not human-readable, then be aware that the python, haskell an c++ bindings are far worse.

I suppose, the indentation syntax is part of atomese,

Atomese does not have a canonical syntax.  It only has scheme, c++ python, haskell bindings, and if you want to create more, that's fine.  There is no pre-defined way of writing it down.  You can write it however you want to.
 
which makes it more human-readable.

So, what remains that I wanted to know about "downloading" link definitions, is -- what is the full list of definitions of the generic symbols of atomese (like, EvaluationLink, PredicateNode, ListLink, Concept, Variable, etc.)

These are not symbols, they are types.  Types in the sense of type theory. https://wiki.opencog.org/w/Atom_types
 
with their definitions,

Almost all of the atom types are not "fundamental". See for example, the very bottom of https://wiki.opencog.org/w/Atom_types to see how new types can be defined, at least formally.  However,  we have not bothered to give most of the atom types any kind of formal definition. They are loosey goosey, and we create a dozen new ones every year, and retire/discard a dozen others.
 
and the additional syntax,

There is a mechanism for the definition of syntax.  See for example, https://wiki.opencog.org/w/Type_constructor  and https://wiki.opencog.org/w/DefinedTypeNode 

Most atoms do not have a well-defined syntax.  None of them have a formal syntax definition.  I have experimented with syntax definitions, they are used in the type checker, but the deployment of the type checker is very ad hoc. Anyway, very few people use any of the higher-order type constructors in practical code.  There's very little interest in this.

Defining a syntax for atomese is an ongoing area of research, but basically, almost no one, except for Nil and I, are interested in pursuing this, so it proceeds in a very ad-hoc fashion.
 
like the percent sign before the variables ($X).

That's a convention for human readability. you can use any utf8 string that you wish.
 

Think of it this way:  atomese is kind-of-like json, or kind-of-like javascript, or kind-of-like prolog or kind-of-like SQL -- it is a little bit like all of these.

Yes, I see, and grounding the EvaluationLinks, makes it possible to satisfy conditions defined in atomese.

If your email asked: can I translate atomese into prolog, or atomese into javascript, I would have said, yes, sort-of-maybe with various difficulties.  If you asked "can I translate prolog into atomese" or "can I translate javascript into atomese" I would have said "yes, with various difficulties".

But instead you compared it to KIF and OpenCyc.  Can random prolog or javascript programs be converted to KIF or OpenCyc?  I don't think so, not in any normal sense.

I see now, why. So, what I'd like to "download" so to speak, is the definition of the metalanguage in a single document (e.g., in model-theoretic sense, set of symbols and rules of language, with their definitions), rather than translating it.

Can you download the definition of python in a  single document, in a model-theoretic sense? What about prolog? or SQL or haskell or F# or C++ or javascript or scheme?  That's actually an interesting question, and its been hotly discussed over the decades.  See, for example, lambda-the-ultimate.

Atomese is like a psychedelic mashup of F#, SQL and prolog.  In principle, it could be self-describing; its a principle we are moving towards very very slowly, but its unlikely to happen any time soon.

At any rate, the only "model theory" of atomese is written in C++, and its buggy, and changes every day.

--linas
 

Mindey

--

Mindey I.

unread,
Dec 16, 2017, 9:54:19 PM12/16/17
to opencog
Linas,
 
Can you download the definition of python in a  single document, in a model-theoretic sense? What about prolog? or SQL or haskell or F# or C++ or javascript or scheme?  That's actually an interesting question, and its been hotly discussed over the decades.  See, for example, lambda-the-ultimate.

It should be possible... I'll check out the lambda-the-ultimate... After all, it's lists all the way: lists that contain things; lists that leave things out.. a list of things that aren't on any list. :)

But certainly, downloading language implementation is easier by just downloading the git repository.

Atomese is like a psychedelic mashup of F#, SQL and prolog.  In principle, it could be self-describing; its a principle we are moving towards very very slowly, but its unlikely to happen any time soon.

At any rate, the only "model theory" of atomese is written in C++, and its buggy, and changes every day.

I see. It's amazing! Looks like a metalanguage as a set of efficient solvers implemented in C++.
It would be great to make it as easy to install as, say, lisp,.. but I found dockerization, the video and the book "Engineering General Intelligence," which answers my questions, for now.

Thanks!
Mindey

Nil Geisweiller

unread,
Dec 18, 2017, 1:15:48 AM12/18/17
to ope...@googlegroups.com
On 12/17/2017 04:54 AM, Mindey I. wrote:
> I see. It's amazing! Looks like a metalanguage as a set of efficient
> solvers implemented in C++.
> It would be great to make it as easy to install as, say, lisp,.. but I

According to my experimence installing

https://github.com/opencog/atomspace

which includes atomese, is actually easier than installing lisp! All you
need is boost and guile.

Nil

> found dockerization <https://github.com/opencog/docker>, the video
> <https://www.youtube.com/watch?v=qfwMV18is6M> and the book /"Engineering
> General Intelligence,"/ which answers my questions, for now.
>
> Thanks!
> Mindey
>
> --
> 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
> <mailto:opencog+u...@googlegroups.com>.
> To post to this group, send email to ope...@googlegroups.com
> <mailto:ope...@googlegroups.com>.
> 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/3ec03200-4a00-429e-a6d1-8e30346d6a8b%40googlegroups.com
> <https://groups.google.com/d/msgid/opencog/3ec03200-4a00-429e-a6d1-8e30346d6a8b%40googlegroups.com?utm_medium=email&utm_source=footer>.

Mindey I.

unread,
Sep 15, 2018, 4:41:58 AM9/15/18
to opencog
The message I get from definition of Atom is that it is a symbol table.
Naturally, the question is -- how do you download all the symbols of the table?

(each in its own environment if necessary,... and... where does the table live?)

Linas Vepstas

unread,
Sep 15, 2018, 4:49:23 AM9/15/18
to opencog
Hi Mindy,

To paraphrase the wiki page: "because atoms are unique, atoms resemble symbols, and the atomspace resembles a symbol table".

So if you want all of the symbols (aka atoms), you dump the entire contents of the atomspace.

--linas

To unsubscribe from this group and stop receiving emails from it, send an email to opencog+unsubscribe@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
cassette tapes - analog TV - film cameras - you

Mindey I.

unread,
Sep 15, 2018, 4:57:43 AM9/15/18
to opencog
Linas,

So if you want all of the symbols (aka atoms), you dump the entire contents of the atomspace.

any concrete example or command for doing it?

To unsubscribe from this group and stop receiving emails from it, send an email to opencog+u...@googlegroups.com.

To post to this group, send email to ope...@googlegroups.com.
Visit this group at https://groups.google.com/group/opencog.

Linas Vepstas

unread,
Sep 15, 2018, 5:08:20 AM9/15/18
to opencog
On Sat, Sep 15, 2018 at 11:57 AM, Mindey I. <min...@mindey.com> wrote:
Linas,

So if you want all of the symbols (aka atoms), you dump the entire contents of the atomspace.

any concrete example or command for doing it?

One of the very first tutorials show how to create atoms and print them.

--linas

To unsubscribe from this group and stop receiving emails from it, send an email to opencog+unsubscribe@googlegroups.com.

To post to this group, send email to ope...@googlegroups.com.
Visit this group at https://groups.google.com/group/opencog.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages