General MindAgent configuration, output and storage.

Bug #250346 reported by ferrouswheel
4
Affects Status Importance Assigned to Milestone
OpenCog
Fix Released
Medium
Unassigned

Bug Description

MindAgents are likely to have many configuration options (at least, this is the case for attention allocation...) so it'd be nice to have a general configuration framework for MindAgents. In addition, there should be a default way to convert the configuration options to a string or print them to the OpenCog log.

One potential way is to store all the parameters in the util/Config class and then store the keys in the MindAgent. A default toString function would simply iterate through a key vector and print out the key:value pairs.

ferrouswheel (joel-pitt)
Changed in opencog:
importance: Undecided → Medium
milestone: none → release-1.0
status: New → Confirmed
Revision history for this message
ferrouswheel (joel-pitt) wrote :

fix provided by Jared Wigmore.

Changed in opencog:
status: Confirmed → Fix Committed
Revision history for this message
linas (linasvepstas) wrote :

FYI ... If you look at the history of guile, you will find that it goes back to the problem of "config files that hold key-value-pairs". Back in the early 90's, people started using tcl to overcome the limitations of olde-fashioned config file formats; see for example the Andrew code coming out of Carnegie-Mellon; it was simultanously realized that tcl was a decent command line too (see SGI's "wish" shell, or the AFS file system utilities). It became hip to use tcl for both config files, and also as a command-line interpreter.

Soon thereafter, Richard Stallman started the "tcl wars" by asserting that tcl sucked, and that scheme was much better for this sort of stuff; this lead to the birth of guile.

Around the same time, XML was also developed to solve some of the same problems: bridge the gap between config files, and structured data -- it was sold as the "human-friendly" version of ASN-1 markup (which was painfully binary). Meanwhile, the word-processing industry started using DSSSL (stylesheets, before W3C spec'ed them and XSLT -- these were basically LISP code designed to manipulate XML structures.)

Eventually, things went full-circle, as people started realizing that XML was like LISP but with an ugly syntax: see e.g. http://en.wikipedia.org/wiki/SXML and "impedance mismatch" and also JSON as the other "impedance mismatch" solution attempt.

Based on this swirl of history, I'd suggest that the best solution (the easiest to use, the most maintainable) is to just use s-exp's for the key-value pair notation -- i.e. use the existing scheme/guile bindings.

Revision history for this message
ferrouswheel (joel-pitt) wrote :

Well, I'd be happy to change the format to S-expressions. Although it's probably not urgent at this stage...

Most of a change like this would involve the ConfigManager, and maybe making parameters structured by the module they are a part of. e.g.

('libattention.so
   ('MAX_SPREAD_PERCENTAGE 0.5)
   ('STARTING_STI_RENT 5))

etc.

Want to open a bug report with your thoughts Linas? (so we don't forget..)

Revision history for this message
linas (linasvepstas) wrote : Re: [Bug 250346] Re: General MindAgent configuration, output and storage.

2008/11/30 ferrouswheel <email address hidden>:

> Want to open a bug report with your thoughts Linas? (so we don't
> forget..)

Nah, ... most people hate triaging old bug reports. Rather, its "food
for thought" -- if/when this becomes important, hopefully it will be
remembered.

--linas

linas (linasvepstas)
Changed in opencog:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.