NameDateSize

..16-Mar-201612 KiB

.bzrignore19-Oct-20121.2 KiB

AUTHORS26-May-2012761

CMakeLists.txt24-Oct-201223.4 KiB

doc/26-May-20124 KiB

examples/26-May-20124 KiB

HACKING26-May-20121.6 KiB

include/19-Oct-20124 KiB

lib/19-Oct-20124 KiB

LICENSE26-May-201234 KiB

opencog/24-Oct-20124 KiB

opencog.spec22-Sep-20126.7 KiB

README22-Sep-20127.2 KiB

README.archlinux22-Sep-20121.6 KiB

README.cygwin26-May-2012136

README.fedora22-Sep-2012915

README.gentoo22-Sep-2012980

README.opensuse22-Sep-20121 KiB

README.osx26-May-20121.1 KiB

README.ubuntu22-Sep-20125.6 KiB

README.win3222-Sep-20122.1 KiB

scripts/08-Sep-20124 KiB

tests/24-Oct-20124 KiB

vendor/12-Oct-20124 KiB

README

1
2                          OpenCog
3                          -------
4
5OpenCog is a framework for developing AI systems, especially appropriate
6for integrative multi-algorithm systems, and artificial general intelligence
7systems.  Though much work remains to be done,
8it currently contains a functional core framework, and a number of
9cognitive agents at varying levels of completion, some already displaying
10interesting and useful functionalities alone and in combination.
11
12Prerequisites:
13--------------
14To build and run OpenCog, the following packages are required. With a
15few exceptions, most Linux distributions will have these packages.
16
17Older versions of CMake may not have scripts to find all of these packages,
18some needed CMake scripts are included in lib, but others in lib/compat are
19provided if you are trying to build with an old version of CMake (although the
20best option is to get the latest CMake if possible).
21
22boost       -- a C++ utilities package -
23               http://www.boost.org/
24               Debian/Ubuntu package libboost-dev
25
26cmake       -- a build management tool
27               http://www.cmake.org/
28               Debian/Ubuntu package cmake
29
30cxxtest     -- a test framework
31               http://cxxtest.sourceforge.net/
32               (Not originally available in Debian/Ubuntu; get cxxtest 
33               from https://launchpad.net/~dhart/+archive/ppa)
34
35guile       -- Embedded scheme interperter
36               http://www.gnu.org/software/guile/guile.html
37               Version 1.8.6 or newer is required.
38               Debian/Ubuntu package guile-1.8-dev
39
40libgsl      -- The GNU Scientific Library
41               Debian/Ubuntu package libgsl0-dev
42
43Optional prereqs
44----------------
45The following packages are optional. If they are not installed, some
46optional parts of OpenCog will not be built.  The CMake command, during
47the build, will be more precise as to which parts will not be built.
48
49curl        -- cURL groks URLs
50               Optional package
51               Required by opencog/ubigraph
52               http://curl.haxx.se/
53               Debian/Ubuntu package libcurl4-gnutls-dev
54
55expat       -- an XML parsing library - 
56               Optional package, needed for embodiment support.
57               http://www.jclark.com/xml/expat.html (version 1.2)
58               Debian/Ubuntu package libexpat1-dev
59               Alternatively Debian/Ubuntu package libxmltok1-dev 
60               (supplies expat v1.2) Version 2 seems to work as well.  
61               http://expat.sourceforge.net/
62
63HyperTable  -- Distributed storage.
64               Optional package, needed only for experimental support.
65               http://hypertable.org.
66               This requires SIGAR as well. 
67
68MPI         -- Message Passing Interface
69               Optional package
70               Required for compute-cluster version of MOSES.
71               Use either MPICHV2 or OpenMPI
72
73OpenGL      -- Open Graphics Library
74               Optional package
75               Required by opencog/spatial/MapTool
76               info: http://www.opengl.org
77               Commonly provided with your video card driver
78
79SDL         -- Simple DirectMedia Layer
80               Optional package
81               Required by opencog/spatial/MapTool
82               http://www.libsdl.org
83               Debian/Ubuntu package libsdl1.2-dev
84
85SDL_gfx     -- Simple DirectMedia Layer extension
86               Optional package
87               Required by opencog/spatial/MapTool
88               http://www.ferzkopp.net/joomla/content/view/19/14/
89               Debian/Ubuntu package libsdl-gfx1.2-dev
90
91unixODBC    -- Generic SQL Database client access libraries
92               Optional package
93               Required for the distributed-processing atomspace.
94               http://www.unixodbc.org/
95               Debian/Ubuntu packages unixodbc-dev
96
97xercesc     -- Apache Xerces-C++ XML Parser
98               Optional package
99               Requied for embodiment
100               Debian/Ubuntu packages libxerces-c28 and libxerces-c2-dev
101 
102xmlrpc      -- XML-RPC support
103               Optional package
104               Required by opencog/ubigraph
105               http://www.xmlrpc.com
106               Debian/Ubuntu package libxmlrpc-c-dev
107
108
109To build opencog:
110-----------------
111Peform the following steps at the shell prompt:
112
113   cd to project root dir
114   mkdir bin
115   cd bin
116   cmake -DCMAKE_BUILD_TYPE=Release ..
117   make
118
119Libraries will be built into subdirectories within bin, mirroring the
120structure of the source directory root. The flag -DCMAKE_BUILD_TYPE=Release
121results in binaries that are optimized for for performance; ommitting 
122this flag will result in faster builds, but slower executables.
123
124
125Unit tests:
126-----------
127To build and run the unit tests, from the ./bin directory enter (after
128building opencog as above): 
129
130   make test
131
132
133Running the server:
134-------------------
135The cogserver provides a simple server interface to the reasoning
136system.
137
138See CommandRequestProcessor.cc as an example control interface to
139the server.  This command processor understands 3 simple commands:
140load <xml file name>, ls and shutdown. There is an example XML file
141under tests/server/atomSpace.xml
142
143To run a simple test, build everything and execute
144bin/opencog/server/cogserver. Then, from another terminal, run
145"telnet localhost 17001". Try loading the example XML file and ls
146to see all the nodes and links.
147
148
149Config file
150-----------
151The operation of the server can be altered by means of a config file.
152This config file is in lib/opencog.conf. To make use of it, say 
153"cogserver -c <config-filename>" when starting the server.
154
155
156Scheme shell
157------------
158The cog server also includes a built-in scheme shell. The shell can be
159started by typing "scm" after entering the opencog server shell. It can
160be exited by placing a single . on a line by itself.  This shell allows
161opencog atoms and truth values to be created, manipulated and destroyed
162using a very simple but powerful interface.  Examples and documentation
163for the available OpenCog commands can be found in src/guile/README.
164See also the wiki for additional details.
165
166
167Modifying the list of basic types
168---------------------------------
169See the example under ./examples/atomtypes
170 
171
172CMake notes
173-----------
174Some useful CMake's web sites/pages: 
175
176 - http://www.cmake.org (main page) 
177 - http://www.cmake.org/Wiki/CMake_Useful_Variables 
178 - http://www.cmake.org/Wiki/CMake_Useful_Variables/Get_Variables_From_CMake_Dashboards
179 - http://www.cmake.org/Wiki/CMakeMacroAddCxxTest
180 - http://www.cmake.org/Wiki/CMake_HowToFindInstalledSoftware
181
182
183The main CMakeLists.txt currently sets -DNDEBUG. This disables Boost
184matrix/vector debugging code and safety checks, with the benefit of
185making it much faster. Boost sparse matrixes and (dense) vectors are
186currently used by ECAN's ImportanceDiffusionAgent. If you use Boost
187ublas in other code, it may be a good idea to at least temporarily
188unset NDEBUG. Also if the Boost assert.h is used it will be necessary
189to unset NDEBUG. Boost ublas is intended to respond to a specific 
190BOOST_UBLAS_NDEBUG, however this is not available as of the current
191Ubuntu standard version (1.34).
192
193-Wno-deprecated is currently enabled by default to avoid a number of
194warnings regarding hash_map being deprecated (because the alternative
195is still experimental!)
196
197
198

README.archlinux

1##############################################################################
2Installation and dependency resolution for ArchLinux users
3###############################################################################
4
5There exists a package in the AUR named opencog-bzr found at
6http://aur.archlinux.org/packages.php?ID=35449
7
8To get started with the AUR, please read:
9http://wiki.archlinux.org/index.php/AUR
10
11An AUR helper automates the use of the AUR.
12To use an AUR helper (yaourt) please read:
13http://wiki.archlinux.org/index.php/Yaourt
14
15Note that it's possible you will encounter a linkage error at the end
16OpenCog compiling, this is because the install script uses fakeroot,
17if so just compile it manually and it should work.
18
19----------------------------------------------------------
20
21Opencog depends on the many packages. Some of the more important ones are:
22
23   g++ cmake boost expat guile xerces-c-2 cxxtest unixodbc
24
25xerces, expat, unixodbc are optional.  See the main README for details.
26
27----------------------------------------------------------
28
29Archlinux puts xerces-c-2 in a nonstandard location--
30you will need to make sure the build can find its includes
31and shared libraries.
32
33You may set the environment variable XERCESCROOT to
34"/opt/xerces-c-2/", or you may add that folder to the
35PATHS section of the FIND_LIBRARY(XERCESC_LIBRARIES) command in
36opencog/lib/FindXercesC.cmake
37
38If you get an error about XERCESC_LIBRARIES or XERCESC_INCLUDE_DIR
39being undefined, it is probably because you did not set
40the XERCESROOT before running cmake.
41
42----------------------------------------------------------
43

README.cygwin

1Only Util, ComboReduct and MOSES components have been tried to be
2compiled on Cygwin. The only requirement is the Cygwin devel package.
3

README.fedora

1###############################################################################
2Instalation and dependency resolution for Fedora 9 users
3###############################################################################
4
5Opencog depends on the following packages:
6
7   gcc-c++ cmake boost boost-devel gsl-devel
8
9----------------------------------------------------------
10
11They may be downloaded and installed using the following commands:
12
13   wget http://downloads.sourceforge.net/cxxtest/cxxtest-3.10.1-1.noarch.rpm
14
15   sudo yum --nogpgcheck localinstall cxxtest-3.10.1-1.noarch.rpm 
16
17----------------------------------------------------------
18
19Opencog also optionally depends on the following packages:
20
21   unixODBC-devel     -- needed for SQL persistence
22
23   expat expat-devel  -- needed for embodiment
24
25   guile-devel        -- needed for scheme bindings
26
27----------------------------------------------------------
28

README.gentoo

1#######################################################################
2Instalation and dependency resolution for Gentoo (circa Sep. 2008)
3#######################################################################
4
5Opencog depends on the following packages:
6
7  dev-util/cmake dev-libs/boost sci-libs/gsl
8
9You might need to eselect the right boost version as well.
10
11----------------------------------------------------------
12
13Additionally, it depends on the following non-official packages:
14
15  cxxtest
16
17which are available in the 'vendor' directory. To install them, issue
18the following commands:
19
20  prompt# cd <opencog-base-dir>
21  prompt# ebuild vendor/cxxtest/gentoo/dev-cpp/cxxtest/cxxtest*.ebuild install qmerge
22
23----------------------------------------------------------
24
25Opencog also _optionally_ depends on the following packages:
26
27  dev-db/unixODBC  -- needed for SQL persistence
28
29  dev-scheme/guile -- needed for scheme bindings
30
31  dev-libs/expat   -- needed for embodiment
32
33

README.opensuse

1###############################################################################
2Instalation and dependency resolution for OpenSUSE 11.2 users
3###############################################################################
4
5Opencog depends on the following packages:
6
7   gcc-c++ make cmake boost-devel gsl-devel
8
9-------------------------------------------------------------------------------
10
11Additionally, it depends on the following non-official packages:
12
13   cxxtest
14
15They may be downloaded and installed using the following commands:
16
17   wget http://downloads.sourceforge.net/cxxtest/cxxtest-3.10.1-1.noarch.rpm
18
19   sudo rpm -Uhv cxxtest-3.10.1-1.noarch.rpm csockets-2.2.5-1.1.i586.rpm
20   
21-------------------------------------------------------------------------------
22
23Opencog also optionally depends on the following packages:
24
25   unixODBC-devel -- needed for SQL persistence
26
27   guile-devel    -- needed for scheme bindings
28
29   libexpat-devel -- needed for embodiment
30
31-------------------------------------------------------------------------------
32

README.osx

1
2Instructions for Apple Mac OSX users
3------------------------------------
4
5The MacPorts installer does not include /opt/local/lib into the shared
6library search path. Thus, any libraries installed there will fail to
7be found.  The search path needs to be fixed manually.  This can be done 
8by editing ~/.profile and specifying
9
10  export DYLD_LIBRARY_PATH=/opt/local/lib:$DYLD_LIBRARY_PATH
11
12A dynamic library search path failure will manifest itself with this
13error message:
14
15    ./opencog/server/cogserver
16    Searching for config in default locations...
17    Found ../lib/opencog.conf
18    loaded configuration from file "../lib/opencog.conf"
19    File: ../opencog/scm/utilities.scm line: 9
20    ERROR: In procedure dynamic-link:
21    ERROR: file: "libguile-srfi-srfi-1-v-3", message: "file not found"
22    ABORT: misc-error
23
24Proper operation can be confirmed with opencog, or by invoking guile on
25the command line:
26
27    $ guile
28    guile> (use-modules (srfi srfi-1))
29    guile>
30
31The above should not generate any errors when the shared libary load
32path is correctly configured.
33
34
35
36

README.ubuntu

1OpenCog is very easy to build under Ubuntu. Just follow this page
2
3http://wiki.opencog.org/w/Building_OpenCog_on_Ubuntu
4
5Below is a just copy/paste of it (Nov 18 2010)
6
7=========================================================
8
9Building OpenCog on Ubuntu
10From OpenCog
11
12There are two options if you are on Ubuntu, you can either use the setup scripts from the Cogbuntu release, or you can manually download and install the various depedencies...
13Contents
14[hide]
15
16    * 1 Use Cogbuntu scripts
17          o 1.1 Ubuntu 10.10
18          o 1.2 Ubuntu 10.04
19          o 1.3 Ubuntu 9.10
20    * 2 Manually installing depedencies
21          o 2.1 Install version control & build systems
22          o 2.2 Install the core libraries
23          o 2.3 Get the source code
24    * 3 Build the core
25    * 4 Build & run tests
26    * 5 Build the documentation
27    * 6 Build the Scheme interpreter
28    * 7 Build the Embodiment base system
29    * 8 Build the Embodiment proxy to Metaverse
30    * 9 Build the Embodiment question-answering support
31
32Use Cogbuntu scripts
33
34The Cogbuntu scripts are on launchpad at:
35
36https://code.launchpad.net/~opencog-dev/opencog/cogbuntu
37
38You'll need bzr to download them:
39
40 sudo aptitude install bzr
41
42Ubuntu 10.10
43
44If you checkout revision 29, you get all you need to install all dependencies for OpenCog on Ubuntu 10.10 So:
45
46bzr branch -r29 lp:~opencog-dev/opencog/cogbuntu cogbuntu-10.10
47cd cogbuntu-10.10
48
49then run
50
51mkdir temp
52sudo ./add-apt-repo.sh && sudo ./install-packages-opencog-dep.sh temp
53
54to install all that opencog needs. Beware that: add-apt-repo.sh is gonna add some Karmic packages repo in /etc/apt/sources.list.
55Ubuntu 10.04
56
57If you checkout revision 26, you get all you need to install all dependencies for OpenCog on Ubuntu 10.04 So:
58
59bzr branch -r26 lp:~opencog-dev/opencog/cogbuntu cogbuntu-10.04
60cd cogbuntu-10.04
61
62then run
63
64mkdir temp
65sudo ./add-apt-repo.sh && sudo ./install-packages-opencog-dep.sh temp
66
67to install all that opencog needs. Beware that: add-apt-repo.sh is gonna add some Karmic packages repo in /etc/apt/sources.list.
68Ubuntu 9.10
69
70If you checkout revision 1, you get all you need to install all dependencies for OpenCog on Ubuntu 9.10. So:
71
72bzr branch -r1 lp:~opencog-dev/opencog/cogbuntu cogbuntu-9.10
73cd cogbuntu-9.10
74
75then run
76
77sudo ./install-packages.sh
78
79These are instructions for a progressive build of OpenCog on Ubuntu 9.10 (karmic) and Ubuntu 10.04 (lucid).
80
81Please report any build issues on the #opencog channel at irc.freenode.net.
82Manually installing depedencies
83
84First insure your repository sources are up to date.
85
86Open a command line, e.g. from Applications > Accessories > Terminal. The boxes below surrounded with dotted lines are commands to be pasted onto the command line.
87
88Update your package repositories
89
90sudo aptitude update
91
92Install version control & build systems
93
94The OpenCog project uses the Bazaar source code version control system (analogous to SVN or CVS), and the CMake build system (analogous to GNU autoconf).
95
96sudo aptitude install bzr cmake
97
98note: the command above will also install necessary dependencies, such as a C compiler and other libraries and tools. If your system hasn't been used before to build software, it may take many minutes to download and install all dependencies.
99Install the core libraries
100
101OpenCog uses the Boost C++ Libraries and  the GNU Scientific Library.
102
103sudo aptitude install libboost-dev libgsl0-dev
104
105note: the command above will also install necessary dependencies, such as a C++ compiler and other libraries and tools. If your system hasn't been used before to build software, it may take many minutes to download and install all dependencies.
106Get the source code
107
108Do this in a convenient place, like your home directory or ~/src.
109
110bzr branch lp:opencog
111
112Make a local scratch copy
113
114bzr branch opencog ochack
115
116Build the core
117
118The core includes PLN and MOSES.
119
120Currently parts of OpenCog rely on a hard-coded relative build location, so create your build directory at ochack/bin.
121
122cd ochack; mkdir bin; cd bin
123
124Configure the build
125
126cmake ..
127
128Build OpenCog core
129
130make 
131
132Currently the OpenCog build system chooses which components to build based upon the existence of certain development packages installed (or not installed) on your system.
133Build & run tests
134
135OpenCog uses the CxxTest framework (analogous to JUnit).
136
137Only do the next two steps if you didn't install dependencies with the Cogbuntu scripts...
138
139Download the cxxtest package:
140
141wget https://launchpad.net/~dhart/+archive/ppa/+files/cxxtest_3.10.1-0ubuntu1~dhart1_all.deb
142
143Install the cxxtest package
144
145sudo dpkg -i cxxtest_3.10.1-0ubuntu1~dhart1_all.deb
146
147Re-configure the build
148
149cmake ..
150
151Setup OpenCog tests
152
153make
154
155Make & run OpenCog tests
156
157make test 
158
159note: tests can be run after building each following section.
160
161Build the Scheme interpreter
162
163Install the development packages for Guile (the GNU scheme interpreter).
164
165sudo aptitude install guile-1.8-dev 
166
167Re-configure the build
168
169cmake ..
170
171Build OpenCog with Scheme interpreter
172
173make
174
175Build the documentation
176
177Also available online at http://buildbot.opencog.org/doxygen/
178
179Install the graphviz and doxygen packages.
180
181sudo aptitude install graphviz doxygen
182
183Configure the build
184
185cmake ..
186
187Build OpenCog documentation
188
189make doxygen
190
191Build the Embodiment base system
192
193Enable the universe repository by editing /etc/apt/sources.list or ticking the list at System > Administration > Software Sources.
194
195Update your package repositories
196
197sudo aptitude update
198
199Install dependencies
200
201sudo aptitude install libxerces-c2-dev 
202
203Configure the build
204
205cmake ..
206
207Build OpenCog Embodiment
208
209make 
210
211TBD
212Build the Embodiment proxy to Metaverse
213
214TBD
215Build the Embodiment question-answering support
216
217uses Relex/NLGen
218
219TBD 
220

README.win32

1###############################################################################
2Installation and dependency resolution for Win32 users
3###############################################################################
4
5- Compiler -
6
7We recommend building with the latest Microsoft's Visual C++ Express Edition
8suite (as of this writing, the latest version is "VC++ 9 - 2008"). It may be
9freely downloaded from: "http://www.microsoft.com/express/download/"
10
11-------------------------------------------------------------------------------
12
13- Dependencies -
14
15Opencog depends on the following packages:
16
17    cmake:             http://www.cmake.org
18    stlport:           http://stlport.sourceforge.net/
19    pthreads:          http://sourceware.org/pthreads-win32/#download
20    boost:             http://www.boost.org/users/download/
21    expat:             http://sourceforge.net/project/showfiles.php?group_id=10127&package_id=11277
22    libxml/zlib/iconv: http://www.zlatkovic.com/pub/libxml/
23    cxxtest:           http://sourceforge.net/project/showfiles.php?group_id=52834
24
25-------------------------------------------------------------------------------
26
27- Building -
28
29Run the CMake UI: "Start Menu" -> "Program Files" -> "CMake" -> "CMake". Select
30the root of the opencog tree as the source and build directories. Then click on
31"Configure" and select the "Visual Studio 9" as the generator.
32
33A few error messages will show up, complaining about missing INCLUDE dirs and
34LIBRARIES. Select the appropriate paths using the main panel and rerun configure
35until all required paths are found. Finally click on "OK" to generate the build
36files and exit.
37
38A "OPENCOG.sln" file (along with several other ".vcproj" files)
39should be at the root of the opencog tree. Open it using the "Visual Studio"
40application and click on the menu "Build" -> "Build Solution" to compile the main
41"src" tree. Additional targets (such as "test") may be compiled using the
42"Solution Explorer" panel on the left.
43
44-------------------------------------------------------------------------------
45