functional example of opencog principles

143 views
Skip to first unread message

antican...@gmail.com

unread,
Apr 17, 2016, 11:17:21 PM4/17/16
to opencog
Hi everyone

In my past mails I asked questions about MOSES, Thanks to your answers
Im pretty much done understanding it now. 

I would also like to explore the other functions of opencog.
As I understand it,  opencog's heart is atomspace, a directed graph for
generalized knowledge representation. Various specialized algorithms then work
on this generalized knowledge to produce intelligent behavior.

I want to go through the code using GDB, but was unable to find a good 
executable file to start. Of the files in the example folder, only hopfield seems
to work.

Thus I want to ask, what file is there to run to give a good show of opencog function.
In moses for example, going through the onemax example and running the truth table in the moses main
executable file gave a pretty good picture on how moses works.
I want something similar for opencog.

Is there something like an artificial ant or chatbot I can run with opencog?


Nil Geisweiller

unread,
Apr 18, 2016, 1:26:49 AM4/18/16
to ope...@googlegroups.com
Hi,

if you like to run examples inside gdb I highly suggest running unit tests.

For instance you could run the following pattern matcher utests

GetLinkUTest::test_not_equal()
GetLinkUTest::test_disconnected_binary_get()

in

<ATOMSPACE_ROOT>/tests/query/GetLinkUTest.cxxtest

GetLinkUTest::test_not_equal() is gonna teach how nodes and links are
added, and then how the pattern matcher is invoked. Then the other utest
gives you some more interesting pattern matcher use.

Please have a look at

http://wiki.opencog.org/wikihome/index.php/Development_standards#GDB

it contains 2 wonderful gdb functions

poc -- to print (supposedly any) opencog C++ object
patomspace -- to print the entire atomspace

If you'd like to see more opencog classes supported by poc, either let
me know or add support to them yourself.

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 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/2c6749e7-b6e3-4e6f-b266-18f077b9e69b%40googlegroups.com
> <https://groups.google.com/d/msgid/opencog/2c6749e7-b6e3-4e6f-b266-18f077b9e69b%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

antican...@gmail.com

unread,
Apr 18, 2016, 10:32:52 PM4/18/16
to opencog
Thanks for the rapid response , will try out!

Linas Vepstas

unread,
Apr 20, 2016, 1:31:07 PM4/20/16
to opencog
Hi,

As far as I know, *all* of the examples in the examples folder should work. If some don't then open a bug report.

Exploring opencog with gdb seems ... counter-productive.  Depends on what you want to do.  Using the atomspace is very different from understanding how it works.  You can use it just fine, without trying to understand how it works.  However, if you want to do low-level maintenance ... for that, sure, gdb is OK. But the interesting parts of opencog are NOT the low-level parts.   I mean, we do need a good low-level maintainer, to fix/finish stuff that is poorly designed in there.  But its not high-level.

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

antican...@gmail.com

unread,
Apr 21, 2016, 11:11:19 PM4/21/16
to opencog, linasv...@gmail.com

As far as I know, *all* of the examples in the examples folder should work. If some don't then open a bug report.

I found only a single executable file in the folder 'hopfield' all other folders e.g. agents, atomtypes.... do not contain executable files at all.
although all of the folders in 'tests' do contain executables that run. But no explanation of about what they do
.

Exploring opencog with gdb seems ... counter-productive.  Depends on what you want to do.  Using the atomspace is very different from understanding how it works.  You can use it just fine, without trying to understand how it works.

Well, using it is not the only thing I'm doing .
For one I do need to understand if its workings is valid at all. After all opencog is not a data analystical tool certified for its statistical validity.

And frankly I found Opencog less than applicable as it is with virtually no documentation of what I should be typing into the command line, what
executable to use for what purpose.

The reason I'm still using it is because Im sensing its potential not because its practical, for just data analysis, commercial packages  are by far superior.
But opencog does provide a way to explore data analysis in an intelligent and integrative manner e.g. If I want to have something that
automatically decides what regression algorithm to use, what virtual drug test to perform etc. thats where AGI stuff like Opencog shines. and to
try things like this out does involve some dev work for which I need to understand how it works.

Opencog as it is is just poorly understandable (again no really useable documentation at all) and even less intergrative with any existing modules (say the  statistical packages in python or R). And rewritting it into other frameworks that suits me is a way of dealing with the messy setup of opencog, for which again i need to know how it works



But the interesting parts of opencog are NOT the low-level parts.

Again, with the mess of opencogs file setup I cant even find explanation of what each of the executable files does let alone use any of its functions.
With moses as an example it was only after I tore it apart with GDB that I actually felt what it could be used for aside from simple boolean regression,

Linas Vepstas

unread,
Apr 25, 2016, 8:14:31 PM4/25/16
to antican...@gmail.com, opencog
On Thu, Apr 21, 2016 at 10:11 PM, <antican...@gmail.com> wrote:

As far as I know, *all* of the examples in the examples folder should work. If some don't then open a bug report.

I found only a single executable file in the folder 'hopfield' all other folders e.g. agents, atomtypes.... do not contain executable files at all.
although all of the folders in 'tests' do contain executables that run. But no explanation of about what they do

Ahh, the hopfield stuff is old and probably obsolete.

A reasonable place to start is with the examples here:  




And frankly I found Opencog less than applicable as it is with virtually no documentation of what I should be typing into the command line, what
executable to use for what purpose.

There are hundreds of pages of wiki documentation.  However, that documentation will be useless until you start going through examples.

The examples will be useless unless you have some idea of what you want to accomplish, though. 
 

The reason I'm still using it is because Im sensing its potential not because its practical, for just data analysis, commercial packages  are by far superior.

opencog is not meant for data analysis, never was, and in a sense, never will be.  Its really a research platform for exploring AGI.

Given what you write below: ... it doesn't do regression, it does not know what regression is, it does not provide or support any sort of statistical analysis.  

What it does provide is a rule engine, with bodies of rules for dealing with natural language and probabilistic reasoning.   Current efforts are focused on memory and self-awareness and time perception.

--linas

antican...@gmail.com

unread,
Apr 25, 2016, 11:08:23 PM4/25/16
to opencog, antican...@gmail.com, linasv...@gmail.com
The reason I complained about documentation is because while I did found alot of readme files in the opencog wiki. I didnt found texts that says are beginner friendly.
With beginner friendly I mean some kind of instructions that demonstrate every step of a particular example e.g. An example that shows
the use of Chatbot with opencog. Step 1: got to this and that folder, Step2. type ./run -i input.txt -o output.txt.............
Basically something that shows the workings of opencog in a straightfoward manner.



The examples will be useless unless you have some idea of what you want to accomplish, though

Well, I wont be able to decide what I want to accomplish with opencog If I cant have a good look on what that thing can do. Usually if I'm trying to
learn something potentially usefull of which I dont have any good understanding of. I just run a couple of its represenative examples. For example
for regression modelling, which is correlating a set of X variable (say drug property) with Y variables (e.g. drug activity). If a new algorithm is available But I dont
know of its strengh and weakness I just run a few representative data sets and see the results before deciding if its useful


But thanks for the hint, I'm first trying Nil's example then go over to the atom space example you have suggested.

Linas Vepstas

unread,
Apr 25, 2016, 11:35:52 PM4/25/16
to antican...@gmail.com, opencog
On Mon, Apr 25, 2016 at 10:08 PM, <antican...@gmail.com> wrote:
The reason I complained about documentation is because while I did found alot of readme files in the opencog wiki. I didnt found texts that says are beginner friendly.
With beginner friendly I mean some kind of instructions that demonstrate every step of a particular example e.g. An example that shows
the use of Chatbot with opencog. Step 1: got to this and that folder, Step2. type ./run -i input.txt -o output.txt.............
Basically something that shows the workings of opencog in a straightfoward manner.

That's kind of like saying "something that shows the workings of python in a straightfoward manner"

opencog is kind-of-like a programming language: however, unlike an ordinary language, its more like a "rule language",  kind-of-like a rule-engine, and kind-of-like prolog, and kind-of-like an abstract syntax tree re-writing system, and kind-of-like a query language (think SQL) but graphical (think of neo4j or cipher or gremlin or tinkerpop) except its kind of like all of these, mashed up into one, and different from all.

Its evolving still, as we use it, we discover what works and what doesn't.  I'm currently interested in .. well, its complicated to explain. Its like parsing or constraint satisfaction. Because my current set of problems require that. 

Meanwhile the rule-engine mostly works (URE) and probabilistic reason (PLN) is coming together, and a planning-solver called OpenPsi is coming together.

--linas

antican...@gmail.com

unread,
Apr 25, 2016, 11:41:59 PM4/25/16
to opencog, antican...@gmail.com, linasv...@gmail.com
  one more question. Which folder contain the examples of Unit pattern matcher utests suggested by Nil and atomspace/tree/master/examples? suggested by Linas?

I looked into my folder it goes like this: Home/opencog/build/opencog/atomspace. However, inside atomspace there is only one executable named "atomspace_sync" and there are subfolders at all.

If those examples are found only on the newest Opencog version, is there a way for me to update my opencog without completely reinstalling it with the opkcg script?

antican...@gmail.com

unread,
Apr 25, 2016, 11:46:13 PM4/25/16
to opencog, antican...@gmail.com, linasv...@gmail.com


That's kind of like saying "something that shows the workings of python in a straightfoward manner"

precisely that, when someone learns python, one first tries out the 'hello world' program first now doesnt he? And then one tries out basic arithmetric operations, and then functions and then file i/o. You can find it in every Python book

Linas Vepstas

unread,
Apr 25, 2016, 11:48:45 PM4/25/16
to antican...@gmail.com, opencog
On Mon, Apr 25, 2016 at 10:41 PM, <antican...@gmail.com> wrote:
  one more question. Which folder contain the examples of Unit pattern matcher utests suggested by Nil and atomspace/tree/master/examples? suggested by Linas?



I looked into my folder it goes like this: Home/opencog/build/opencog/atomspace. However, inside atomspace there is only one executable named "atomspace_sync" and there are subfolders at all.

If those examples are found only on the newest Opencog version, is there a way for me to update my opencog without completely reinstalling it with the opkcg script?

I don't know.

--linas 

Linas Vepstas

unread,
Apr 25, 2016, 11:49:39 PM4/25/16
to antican...@gmail.com, opencog
On Mon, Apr 25, 2016 at 10:46 PM, <antican...@gmail.com> wrote:


That's kind of like saying "something that shows the workings of python in a straightfoward manner"

precisely that, when someone learns python, one first tries out the 'hello world' program first now doesnt he? And then one tries out basic arithmetric operations, and then functions and then file i/o. You can find it in every Python book

antican...@gmail.com

unread,
Apr 25, 2016, 11:57:36 PM4/25/16
to opencog, antican...@gmail.com, linasv...@gmail.com
okay, thanks for the info, I will reinstall opencog t run them.

Michael Duncan

unread,
Apr 26, 2016, 2:10:13 PM4/26/16
to opencog, antican...@gmail.com
while it's not opencog proper, if you're interested in data analysis we've been doing boolean regression with the stand-alone MOSES binary.  i've written a (minimally documented) series of R functions to analyze high dimension -omics data sets that can be found here.  if you're interested i'd be happy to walk you through the pipeline.  you only need to compile and install the cogutils then the moses repo contents, and have the "caret" and stringR" R packages.

mike

antican...@gmail.com

unread,
Apr 27, 2016, 12:21:52 AM4/27/16
to opencog, antican...@gmail.com
It does look interesting.
For now I think I can try it ou myself. 

But big thanks for the info. I'll mail you if I have questions.
Reply all
Reply to author
Forward
0 new messages