Skip to content

Commit

Permalink
add development.conf and update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
amebel committed Dec 26, 2015
1 parent 4acb87b commit 4cb76a2
Show file tree
Hide file tree
Showing 8 changed files with 212 additions and 20 deletions.
2 changes: 1 addition & 1 deletion doc/README.osx
Expand Up @@ -12,7 +12,7 @@ by editing ~/.profile and specifying
A dynamic library search path failure will manifest itself with this
error message:

./opencog/cogserver/server/cogserver
./opencog/cogserver/server/cogserver -c ../lib/development.conf
Searching for config in default locations...
Found ../lib/opencog.conf
loaded configuration from file "../lib/opencog.conf"
Expand Down
4 changes: 2 additions & 2 deletions examples/agents/README
Expand Up @@ -10,7 +10,8 @@ how an agent can be written in C++.
To test this agent, do the following:

*) Start the cogserver: From a shell prompt, issue the command
./opencog/cogserver/server/cogserver from the build directory
./opencog/cogserver/server/cogserver -c ../lib/development.conf from the
build directory

*) Connect to the server: telnet localhost 17001

Expand Down Expand Up @@ -49,4 +50,3 @@ To test this agent, do the following:
time that it's run method is called.

That's all folks! The rest is up to you!

4 changes: 2 additions & 2 deletions examples/atomtypes/README
Expand Up @@ -13,7 +13,8 @@ The new atom types are loaded into the cogserver when the example module
is loaded. To load this module, and use the atom types, do this:

*) Start the cogserver: From a shell prompt, issue the command
./opencog/cogserver/server/cogserver from the build directory
./opencog/cogserver/server/cogserver -c ../lib/development.conf from the
build directory

*) Connect to the server: telnet localhost 17001

Expand Down Expand Up @@ -50,4 +51,3 @@ is loaded. To load this module, and use the atom types, do this:
guile>

That's all folks .. the rest is up to you.

8 changes: 4 additions & 4 deletions examples/module/README
Expand Up @@ -13,7 +13,8 @@ This directory provides an example of a very basic module.
To test this module, do the following:

*) Start the cogserver: From a shell prompt, issue the command
./opencog/cogserver/server/cogserver from the build directory
./opencog/cogserver/server/cogserver -c ../lib/development.conf from the
build directory

*) Connect to the server: telnet localhost 17001

Expand All @@ -22,12 +23,11 @@ To test this module, do the following:
You should see 'done' printed on a line by itself.

*) Verify that it has been loaded: at the cogserver prompt, issue the
command 'listmodules'. The module will be called
command 'listmodules'. The module will be called
opencog::ExampleModule, and so you should see:
Filename: libexample_module.so, ID: opencog::ExampleModule

*) Unload the module:
*) Unload the module:
opencog> unloadmodule opencog::ExampleModule

That's all folks! The rest is up to you!

192 changes: 192 additions & 0 deletions lib/development.conf
@@ -0,0 +1,192 @@
#
# This file provides an example configuration for a production OpenCog
# server. Particularly noteworthy is the list of automatically loaded
# modules.
#
SERVER_PORT = 17001
LOG_FILE = /tmp/cogserver.log

# Other possible log levels are "error", "warn", "info", "debug" and "fine"
# LOG_LEVEL = debug
LOG_LEVEL = info
LOG_TO_STDOUT = false
SERVER_CYCLE_DURATION = 100
IDLE_CYCLES_PER_TICK = 3

# Economic Attention Allocation parameters
STARTING_STI_FUNDS = 10000
STARTING_LTI_FUNDS = 10000
STI_FUNDS_BUFFER = 10000
LTI_FUNDS_BUFFER = 10000
MIN_STI = -400

ECAN_MAX_ATOM_STI_RENT = 15
ECAN_STARTING_ATOM_STI_RENT = 10
ECAN_STARTING_ATOM_LTI_RENT = 0
ECAN_STARTING_ATOM_STI_WAGE = 2
ECAN_STARTING_ATOM_LTI_WAGE = 2

#Used by ImportanceDiffusionAgent class
#0 => flat rent, 1 => exp rent, 2 => log rent, 3 => linear rent
ECAN_RENT_TYPE = 0
ECAN_RENT_AMNESTY = 5
ECAN_RENT_EQUATION_PARAMETER_0 = 0.05
ECAN_RENT_EQUATION_PARAMETER_1 = 0.0

#End of ImportanceDiffusionAgent class

#Used by SimpleImportanceDiffusionAgent class
#Maximum percentage of STI that is spread from an atom
ECAN_MAX_SPREAD_PERCENTAGE = 0.6

# If false, will diffuse along hebbian links only. If true,
# will also diffuse to all non-hebbian incident atoms in the
# incoming and outgoing sets
ECAN_SPREAD_HEBBIAN_ONLY = false

# Maximum percentage that will be available for diffusion to hebbian links
HEBBIAN_MAX_ALLOCATION_PERCENTAGE = 0.5
ECAN_CONVERT_LINKS = false
ECAN_CONVERSION_THRESHOLD = 15

# spread deciding function type (HPERBOLIC = 0 and STEP = 1 )
SPREAD_DECIDER_TYPE = 1
#END of SimpleImportanceDiffusionAgent params

#ForgettingAgent params
ECAN_FORGET_PERCENTAGE = 0.001

#END of Economic Attention Allocation parameters

# Use this command PROMPT when telnet/terminal doesn't support ANSI
PROMPT = "opencog> "
# Prompt with ANSI color codes
ANSI_PROMPT = "opencog> "
# Use this guile PROMPT when telnet/terminal doesn't support ANSI
SCM_PROMPT = "guile> "
# Prompt with ANSI color codes
ANSI_SCM_PROMPT = "guile> "
# Global option so that modules know whether they should output ANSI color
# codes
ANSI_ENABLED = true

# Cogserver in OSX will automatically change .so extension to .dylib
# if .so exists.
MODULES = opencog/cogserver/server/libbuiltinreqs.so,
opencog/cogserver/modules/libPersistModule.so,
opencog/cogserver/modules/libPersistZmqModule.so,
opencog/cogserver/modules/libQueryModule.so,
opencog/cogserver/shell/libscheme-shell.so,
opencog/cogserver/shell/libpy-shell.so,
opencog/nlp/types/libnlp-types.so,
opencog/cogserver/modules/libLGDictModule.so,
opencog/cogserver/modules/libSuRealModule.so,
opencog/attention/libattention-types.so,
opencog/attention/libattention.so,
opencog/embodiment/libembodiment-types.so,
opencog/spacetime/libspacetime-types.so,
opencog/cogserver/modules/python/libPythonModule.so,
opencog/cogserver/modules/libRuleEngineModule.so,
opencog/dynamics/openpsi/libOpenPsi.so


# Optional modules, not enabled by default
# opencog/cogserver/modules/benchmark/libbenchmark.so,
# opencog/moldules/events/libatomspacepublishermodule.so
# opencog/attention/libhebbiancreation.so
# opencog/learning/dimensionalembedding/libdimensionalembedding.so
# opencog/viterbi/libviterbi.so

# The below are appropriate if you've done a "sudo make install"
# The isntall files go into `/usr/local/share/opencog`.
# If you want to work from the build directory, then uncomment the
# additional files further down below.
SCM_PRELOAD = scm/opencog.scm,
scm/opencog/atom-types.scm,
scm/opencog/nlp.scm,
scm/opencog/nlp/microplanning.scm,
scm/opencog/nlp/sureal.scm,
scm/opencog/nlp/relex2logic.scm,
scm/opencog/nlp/fuzzy.scm,
scm/opencog/nlp/chatbot.scm

# scm/config.scm,
# server/scm/config.scm,
# scm/core_types.scm,
# spacetime/spacetime_types.scm,
# nlp/types/nlp_types.scm,
# dynamics/attention/attention_types.scm,
# embodiment/embodiment_types.scm,
# reasoning/pln/pln_types.scm,
# scm/core-docs.scm,
# scm/utilities.scm,
# scm/apply.scm,
# scm/file-utils.scm,
# scm/persistence.scm,
# scm/repl-shell.scm,
# scm/av-tv.scm,
# scm/rule-engine-utils.scm,
# nlp/scm/type-definitions.scm,
# nlp/scm/config.scm,
# nlp/scm/file-utils.scm,
# nlp/scm/nlp-utils.scm,
# nlp/scm/disjunct-list.scm,
# nlp/scm/processing-utils.scm,
# nlp/relex2logic/utilities.scm,
# nlp/relex2logic/rule-helpers.scm,
# nlp/relex2logic/post-processing.scm,
# nlp/lg-dict/utilities.scm,
# nlp/sureal/sureal.scm
# viterbi/viterbi_types.scm

# Uncomment if Python extensions are not stored in these locations,
# or the binary and source directories:
# /usr/local/share/opencog/python
# /usr/share/opencog/python
#
# Use a comma separated list for multiple dirs

PYTHON_EXTENSION_DIRS = ../opencog/python,
../opencog/python/web/api

# NOTE: If you want Python functions to be loaded at startup for acccess by
# Python code that runs via EvaluationLink or GroundedSchemaNode, then place
# them in the PYTHON_PRELOAD_FUNCTIONS directory. PYTHON_PRELOAD is only for
# MindAgent and Request Python handlers.
PYTHON_PRELOAD_FUNCTIONS = ../opencog/python/preload_functions

# Run these python cogserver modules on start up
PYTHON_PRELOAD = pyshell, restapi, agent_finder

# IMPORTANT!
# Database login credentials. Change these to reflect your actual setup!
# For information on how to set up atomspace persistance, see the README
# file in opencog/persist/sql/README.
#
# STORAGE = "opencog-atomspace"
# STORAGE_USERNAME = "opencog_user"
# STORAGE_PASSWD = "asdf"
#
# The sense-similarity tables hold precomputed values or the similarity
# of word WordNet-3.0 senses. These tables are referenced in
# nlp/wsd/SenseSimilaritySQL.cc These will *eventually* be replaced by
# a persistent opencog table of sense similarities. For now, they remain
# in use.
#
SENSE_SIMILARITY_DB_NAME = "lexat"
SENSE_SIMILARITY_DB_USERNAME = "linas"
SENSE_SIMILARITY_DB_PASSWD = "asdf"

# Parameters for ZeroMQ AtomSpace Event Publisher
ZMQ_EVENT_USE_PUBLIC_IP = TRUE
ZMQ_EVENT_PORT = 5563

# Parameters for RuleEngine
# RULE_ENGINE_TRIGGERED_ON = [1 ,2 ,3]
# 1-when atom added 2-when atom enters to AF 3-both on 1 and 2
RULE_ENGINE_TRIGGERED_ON = 1

# OpenPsi parameters
#PSI_FEELINGS = fear, anger, happiness, sadness
# Complete list of feelings
#PSI_FEELINGS = fear, pride, love, hate, anger, gratitude, happiness, excitement
14 changes: 7 additions & 7 deletions opencog/cogserver/modules/events/README.md
Expand Up @@ -88,7 +88,7 @@ Atom object
"attentionvalue": ATTENTIONVALUETYPE,
"truthvalue": {
"type": TRUTHVALUETYPE,
"details": TRUTHVALUEDETAILS
"details": TRUTHVALUEDETAILS
},
"outgoing": "[ UUID1, UUID2 ... ]",
"incoming": "[ UUID1, UUID2 ... ]"
Expand Down Expand Up @@ -201,13 +201,13 @@ float
Event types
===========

The AtomSpace change event publisher binds to Boost Signals2 signals generated
by the AtomSpace class. The signals are processed and serialized using a
The AtomSpace change event publisher binds to Boost Signals2 signals generated
by the AtomSpace class. The signals are processed and serialized using a
multithreaded task scheduler implemented using Intel TBB.

##### Timestamp
Each of the following event types contains a **timestamp** field, which provides
a timestamp of the atomspace event expressed as a UTC UNIX timestamp of seconds
Each of the following event types contains a **timestamp** field, which provides
a timestamp of the atomspace event expressed as a UTC UNIX timestamp of seconds
since epoch.

**The following event types are available:**
Expand Down Expand Up @@ -379,11 +379,11 @@ For historical purposes, the performance of the previous version was also tested

Benchmark procedure:
```
./opencog/cogserver/server/cogserver
./opencog/cogserver/server/cogserver -c ../lib/development.conf
> benchmark-fully-connected reset
> benchmark-fully-connected concurrent 2000 2
> shutdown
./opencog/cogserver/server/cogserver
./opencog/cogserver/server/cogserver -c ../lib/development.conf
> publisher-disable-signals
> benchmark-fully-connected reset
> benchmark-fully-connected concurrent 2000 2
Expand Down
2 changes: 1 addition & 1 deletion opencog/python/pln_old/README.md
Expand Up @@ -52,7 +52,7 @@ Before starting the CogServer, the opencog.conf file needs to include the **../o

Make sure you're in your opencog's build directory. In its lib directory should be the opencog.conf file which is mandatory for the CogServer.

Run cogserver now with ./opencog/cogserver/server/cogserver from your build directory.
Run cogserver now with ./opencog/cogserver/server/cogserver -c ../lib/development.conf from your build directory.

Switch to a second terminal and type 'telnet localhost 17001'. The opencog shell should now open.

Expand Down
6 changes: 3 additions & 3 deletions opencog/python/pln_old/examples/socrates_demo/README.md
Expand Up @@ -54,7 +54,7 @@ Run ```socrates_example.py```.

Include the MindAgent as a preloaded module in the cogserver by adding its
path, ```../opencog/python/pln_old/examples/socrates_demo```, to ```PYTHON_EXTENSION_DIRS```.
Start the cogserver at ```/opencog/build``` with ```./opencog/cogserver/server/cogserver```.
Start the cogserver at ```/opencog/build``` with ```./opencog/cogserver/server/cogserver -c ../lib/development.conf```.
Telnet into the cogserver with ```rlwrap telnet localhost 17001```.
Start the relex server at ```/relex``` with ```./opencog-server-sh```.
Make sure that the RelEx2Logic output is turned on in ```opencog-server.sh```.
Expand Down Expand Up @@ -174,7 +174,7 @@ Start the MindAgent with ```agents-start socrates_agent.SocratesAgent```.
##### 2) MemberToInheritance Rule

###### Input is previous output

###### Output
```
(InheritanceLink (stv 1.000000 1.000000)
Expand All @@ -200,7 +200,7 @@ Start the MindAgent with ```agents-start socrates_agent.SocratesAgent```.
(ConceptNode "men@a2905bdd-9214-4717-82c6-dfe21c1263bc") ; [353]
(ConceptNode "man") ; [284]
) ; [354]
(InheritanceLink (stv 1.000000 0.990000)
(ConceptNode "man@fbc51aff-8074-46d8-b3ba-1ccaeb1adb34") ; [283]
(ConceptNode "man") ; [284]
Expand Down

0 comments on commit 4cb76a2

Please sign in to comment.