Simple steps to create atomspace (scm file?) and run rule engine on it and read the resulting hypergraph (list of nodes and links)

54 views
Skip to first unread message

Alex

unread,
Mar 7, 2017, 4:41:32 PM3/7/17
to opencog
I have compiled OpenCog, I can start cogserver, I can connect to the server with telnet and I can start scm (guilde shell) from the terminal, I can execute initial load of modules (opencog, opencogquery, etc), I can issue simple commands like creating Nodes and Links in the scm shell.
I am closely following:

But now I would like to got further:
1) I would like to write my Atomspace (initial list of nodes and links) in the file (I guess it should be scm file). The question is - how can I load this file into scm (or should I load it in somwhere else?). As I described in https://groups.google.com/forum/#!topic/opencog/4jXqxM1k07c I did not manage to load my file in scm, there were error messages in scm and the warning in cogserver trace
2) I would like to run rule engine on my Atomspace to arrivet at the final (rewritten AtomSpace). What commands and in which shells should I use to do this run? This should be pretty basic and common tasks in the OpenCog usage: provide input AtomSpace, run RuleEngine and arrive at the final AtomSpace. Like some kind of business rules engine (e.g. like Droos https://docs.jboss.org/drools/release/6.5.0.Final/drools-docs/html_single/index.html where such activity is known as knowledge session, I have managed and where atomspace is called a working memory).

But I am stuck in these basic things - how to load file in scm, how to start forward chaining reasoning and how to write back the resulting Atomspace in file for further processing. I would like to use Scheme, not C++ or Python API/bindings.

Alex

unread,
Mar 7, 2017, 4:48:14 PM3/7/17
to opencog
I am aware of the tutorial http://wiki.opencog.org/w/URE_Configuration_Format I have not tried yet to enter the example in my scm shell but I guess, I will succeed in entering commands one by one.

My problems are:
1) I don't want to enter repeatedly my full atomspace manually. I want to save my atomspace in file and load this file into scm (or wherever it is appropriate).
2) How can I list/read the final Atomspace - that I can get after running forward chaining - are there some commands how can I write it into file, e.g. for the possible load in the next iteration in the role of initial Atomspace?

What are common scenarious of rule engine usage? Is there available some Hello World tutorial for this?

Vishnu Priya

unread,
Mar 8, 2017, 2:09:43 AM3/8/17
to opencog
Hi  Alex, 

you need to have a database to store and retrieve an Atomspace.
I hope this link helps you. 

Cheers,
Vishnu

Nil Geisweiller

unread,
Mar 8, 2017, 2:21:55 AM3/8/17
to ope...@googlegroups.com
Hi,

first note that if all you want is to populate an atomspace and run the
rule engine on it, you don't need the cogserver. Just enter guile, then
you can directly use guile commands to load a scheme file, save the
resulting scheme file, etc.

I suggest you take a look at

https://github.com/opencog/atomspace/tree/master/examples/rule-engine

and

https://github.com/opencog/opencog/tree/master/opencog/pln

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/9804fe78-dad9-4da7-8c3c-98055037ad07%40googlegroups.com
> <https://groups.google.com/d/msgid/opencog/9804fe78-dad9-4da7-8c3c-98055037ad07%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages