Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

The OpenCog hypergraph database, query system and rule engine

License

NotificationsYou must be signed in to change notification settings

nko5/atomspace

 
 

Repository files navigation

master:Build Statusstable:Build Status

The OpenCog AtomSpace is a knowledge representation (KR) database andthe associated query/reasoning engine to fetch and manipulate that data,and perform reasoning on it. Data is represented in the form of graphs,and more generally, as hypergraphs; thus the AtomSpace is a kind ofgraph database, the query engine is a general graph re-writing system,and the rule-engine is a generalized rule-driven inferencing system.The vertices and edges of a graph, known as "Atoms", are used torepresent not only "data", but also "procedures"; thus, many graphsare executable programs as well as data structures.

There are pre-defined Atoms for many basic knowledge-representation andcomputer-science concepts. These include Atoms for relations, such assimilarity, inheritance and subsets; for logic, such as Boolean and, or,for-all, there-exists; for Bayesian and other probabilistic relations;for intuitionist logic, such as absence and choice; for parallel(threaded) synchronous and asynchronous execution; for expressions withvariables and for lambda expressions and for beta-reduction and mapping;for uniqueness constraints, state and a messaging "blackboard"; forsearching and satisfiability and graph re-writing; for the specificationof types and type signatures, including type polymorphism and typeconstruction (dependent types and type variables TBD).

Because of these many and varied Atom types, constructing graphs torepresent knowledge looks kind-of-like "programming"; the programminglanguage is informally referred to as "Atomese". It vaguely resemblesa strange mashup of SQL (due to queriability), prolog/datalog (due tothe logic and reasoning components), lisp/scheme (due to lambdaexpressions), haskell/caml (due to the type system) and rule engines(due to the graph rewriting and forward/backward chaining inferencesystems). This "programming language" is NOT designed for use byhuman programmers (it is too verbose and awkward for that); it isdesigned for automation and machine learning. That is, like anyknowledge representation system, the data and procedures encodedin "Atomese" are meant to be accessed by other automated subsystemsmanipulating and querying and inferencing over the data/programs.Also, viewed as a programming language, it can be very slow andinefficient and not scalable; it was not designed with efficiencyand programming tasks in mind, nor with scalability; but rather, itwas designed to allow the generalized manipulation of networks ofprobabilistic data by means of rules and inferences and reasoningsystems. It extends the idea of probabilistic logic networks to ageneralized system for automatically manipulating and managing data.

The use of the AtomSpace, and the operation and utility of Atomese,remains a topic of ongoing research and change, as various dependentsubsystems are brought online. These include machine learning,natural language processing, motion control and animation, planningand constraint solving, pattern mining and data mining, questionanswering and common-sense systems, and emotional and behavioralpsychological systems. Each of these impose sharply conflictingrequirements on the system architecture; the AtomSpace and "Atomese"is the current best-effort KR system for satisfying all these variousneeds in an integrated way. It is likely to change, as the variouscurrent short-comings, design flaws, performance and scalabilityissues are corrected.

The main project site is athttp://opencog.org

Theexamplesdirectory contains demonstrations of the various components of theAtomSpace, including the python and scheme bindings, the patternmatcher, the rule engine, and many of the various different atom typesand their use for solving various different tasks.

Prerequisites

To build the OpenCog AtomSpace, the packages listed below are required.With a few exceptions, most Linux distributions will provide thesepackages. Users of Ubuntu 14.04 "Trusty Tahr" may use the dependencyinstaller at/scripts/octool. Users of any version of Linux mayuse the Dockerfile to quickly build a container in which OpenCog willbe built and run.

boost
cmake
cogutil
guile

Optional Prerequisites

The following packages are optional. If they are not installed, someoptional parts of the AtomSpace will not be built. The CMake command,during the build, will be more precise as to which parts will not be built.

cxxtest
Cython
  • C bindings for Python.
  • Strongly recommended, as many examples and important subsystemsassume python bindings.
  • http://cython.org |apt-get install cython
Haskell
Postgres
  • Distributed, multi-client networked storage.
  • Needed for "remembering" things between shutdowns.
  • http://postgres.org |apt-get install postgresql postgresql-client
unixODBC
  • Generic SQL Database client access libraries.
  • Required for the distributed-processing atomspace.
  • http://www.unixodbc.org/ |apt-get install unixodbc-dev
ZeroMQ (version 3.2.4 or higher)
Google Protocol Buffers

Building AtomSpace

Perform the following steps at the shell prompt:

    cd to project root dir    mkdir build    cd build    cmake ..    make

Libraries will be built into subdirectories within build, mirroringthe structure of the source directory root.

Unit tests

To build and run the unit tests, from the./build directory enter(after building opencog as above):

    make test

Install

After building, you MUST install the atomspace.

    sudo make install

Using the AtomSpace

The AtomSpace can be used in one of three ways, or a mixture of all three:By using the GNU Guile scheme interface, by using Python, or by runningthe OpenCog cogserver.

Guile provides the easiest interface for creating atoms, loading theminto the AtomSpace, and performing various processing operations onthem. For examples, see the/examples/guile and the/examples/pattern-matcher directories.

Python is more familiar than scheme (guile) to most programmers, andit offers another way of interfacing to the atomspace. See the/examples/python directory for how to use python with the AtomSpace.

The OpenCog cogserver provides a network server interface to OpenCog.It is required for running embodiment, some of the reasoning agents,and some of the natural-language processing agents. The cogserver isonly available in the main OpenCog project; it is not a part of theAtomSpace.

CMake notes

Some useful CMake's web sites/pages:

The main CMakeLists.txt currently sets -DNDEBUG. This disables Boostmatrix/vector debugging code and safety checks, with the benefit ofmaking it much faster. Boost sparse matrixes and (dense) vectors arecurrently used by ECAN's ImportanceDiffusionAgent. If you use Boostublas in other code, it may be a good idea to at least temporarilyunset NDEBUG. Also if the Boost assert.h is used it will be necessaryto unset NDEBUG. Boost ublas is intended to respond to a specificBOOST_UBLAS_NDEBUG, however this is not available as of the currentUbuntu standard version (1.34).

About

The OpenCog hypergraph database, query system and rule engine

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++60.1%
  • Scheme29.1%
  • CMake4.8%
  • Python4.2%
  • Haskell1.2%
  • Shell0.2%
  • Other0.4%

[8]ページ先頭

©2009-2025 Movatter.jp