Hands On With OpenCog Fossils

From OpenCog

This is a copy of an outline for an in-depth, hands-on tutorial for some of the now-obsolete parts of OpenCog, the OpenCog Fossils. You'll get a tour of how things were meant to be, and, perhaps with a bit of work and tinkering, you can breath these subsystems back to life.

Lesson : The OpenCog Rule Engine

The most important lesson to be learned from the query language is that the queries themselves are also graphs, and can be stored in the AtomSpace. This allows one to perform meta-queries: queries of queries, recursively. This allows many nifty new things to be done. This includes building inference engines, rule engines, reasoning systems, theorem provers, path planners and constraint systems.

Many of these can be viewed as the process of assembling together a collection of different different queries (now called "rules") in such a way that the rules fit together into a coherent whole, they way one might in natural deduction or in a parse. Or a jig-saw puzzle.

The "universal rule engine" or URE is a backward/forward chainer that assembles chains of rules, so that they span a path between premises and conclusions.

The rule engine is built on a query trick: Given an "answer", one can search for all queries that would return that answer. This is done by the DualLink, and is the central powerhouse behind the rule engine.

Lesson : Hands On with Attention Allocation

As a general rule, doing any kind of reasoning or inferencing or chaining promptly leads to a combinatorial explosion of possibilities. One needs to have a strategy for weeding down the choices and possibilities, honing in something that seems promising. The current system for doing this in OpenCog is called attention allocation or ECAN for short.

Lesson : PLN by Hand

Probabilistic Logic Networks (PLN) is a specific set of rules of inference describing uncertain, probabilistic reasoning. It is currently the primary means of performing reasoning in OpenCog. It's a collection of rules that run on top of the rule engine.

This tutorial describes how to represent knowledge in such a way that PLN can access it, and perform deduction and inferencing on it. (Of course, you can represent your data (your collection of knowledge, your semantic netowrk) in other ways; but if you do, PLN won't be able to understand it.)

Lesson : PLN Forward Chaining

The rule engine currently has only two modes: forward and backward. This is one mode.

Lesson : PLN Backward Chaining

This is the other mode.

Lesson : Hands On with Action Selection

OpenCog has two rule engines: the second one is called OpenPsi. It works on very very different principles than the URE. The way that the rules are written are quite different, and the way it moves from one rule to the next is quite different. It does share ECAN with the URE as a general guiding system, however. This tutorial goes into that.

Lesson : Hands On with Emotion Modelling

Calling them "emotions" is perhaps a bit mis-named: this is not a good model of human emotions. It is, however, a mechanism by which not only attention can be focused, but also a means of assigning priorities and urgencies, a means of setting goals so that they result in desires to be fulfilled. A means of modulating and balancing different objectives. In short: it is another way of crawling over a collection of individual rules, and picking the next ones to run.

MOSES

Lesson : PLN Reasoning on MOSES Output

Natural Language Processing (NLP)

There's a lot to NLP. The tutorials below scratch the surface.

Lesson : The NLP Comprehension Pipeline

Lesson : PLN Inference based on Output of Language Comprehension

Lesson : NL Generation Pipeline

Mining Patterns

Warning: the pattern miner tutorial needs to be updated for the new pattern miner. Meanwhile see [1] which contains references to examples at the end.

Lesson : Using The Pattern Miner

Also see the Tutorial of running Pattern Miner in Opencog tute

Lesson : Pattern Miner Scheme Functions

Other Components

Lesson : Hands On with the Time Space Map

This componet is in the process of being redesigned; work is not complete, and so the tutorial won't be either.

Lesson : Concept Blending