The OpenCog Rule Engine

From OpenCog
Jump to: navigation, search

This tutorial is broken into parts


A prerequisite to this tutorial is some understanding of forward and backward chaining (see glossary Forward Chainer & Backward Chainer).

In general the unified rule engine (URE) project aims at building a generic opencog rule engine on top of the Pattern Matcher, applicable to rules written in a scheme representation, such as for PLN and R2L. The main components of the URE includes a forward chainer (FC) and a backward chainer (BC). This will enable the usage of Backward and Forward chaining inferences. At the moment, these rules are written as Pattern Matcher's BindLink, though that can be changed in the future as these rules are not applied as strict Pattern Matching queries.

Rules are organized inside a "Rule Base", which are customizable control policies for controlling the inferences (such as the number of steps, the weight of a rule, etc).

The overall design can be found on the wiki pages:

How is Forward/Backward Chaining relevant to the Rule Engine?


If someone wants to use the rule engine there are only 2 components (Forward Chainer & Backward Chainer as described above).

Links to hands on examples:

(We decided to keep the code on the other pages as it was difficult to maintain many instances of the same code across the wiki)

Also see the 'examples' folder in the OpenCog install on Ubuntu

to get there
$ cd ~/opencog/atomspace/build/examples/C++-api

Trouble shooting

Don't forget to link to libraries atomspace and atomcore and once linked compile like this:

$  g++ -latomspace -latomcore


Maintainers: (Misgana, maybe w/ help from Eddie) Priority: Very High Priority

The Rule Engine documentation is kind of a mess, it needs lots of reorganization and detail added,

This should be made as clean and simple as the Pattern Matcher documentation