<- Lecture 5  home  Lecture 7 ->



Architecture 2

Lecture 6

January 26, 2007




6.1 Outline of Topics
  Concepts and terms  
  Daemons, experts & parallel execution  
  Constructionist A.I.  
  Constructionist Design Methodology (CDM) I  
  Constructionist Design Methodology (CDM) II  
  Messages and their semantics  
  Psyclone + CDM  












Concepts and terms
  Expert, daemon, specialist, knowledge sources An expert is a process that collaborates with other daemons to find a solution to a problem. Often they use a Blackboard for this purpose.
  Blackboard Think "shared memory space"
  Agent, module Generic term that can be applied to any free-running, semi-independent entity in an AI system












  What it is

"Imagine a group of human specialists seated next to a large blackboard. The specialists are working cooperatively to solve a problem, using the blackboard as the workplace for developing the solution.

Problem solving begins when the problem and initial data are written onto the blackboard. The specialists watch the blackboard, looking for an opportunity to apply their expertise to the developing solution. When a specialist finds sufficient information to make a contribution, she records the contribution on the blackboard, hopefully enabling other specialists to apply their expertise. This process of adding contributions to the blackboard continues until the problem has been solved." [REF]

  When was it first proposed? 1959, in a paper by Oliver Selfridge, MIT.
  What it is composed of
  • Experts: Processing entities with domain expertise
  • Blackboard: Common data storage through which knowledge sources communicate
  • Control system, for deciding:
    • which experts should get which information
    • when experts should return results (how long they run)
  How does it work

The key is how experts are triggered by information that appears on the BB. This can be done in the BB or in the expert, or in both places.

Method I ("Soviet model"): The BB has a list of which experts are relevant for any kind of content. When content X appears on the BB, the BB will match it with its list of experts and send X to those experts that seem to be able to process and respond to it.

Method II ("market model"): In this version the BB is a dumb information bus (infobus); the BB has a complete list of all experts that exist and will simply forward all information that comes in to every expert. The experts will then have to decide, each for themselves, which of the information they are capable of acting upon.

Variation: Most systems are hybrids - a combination of the two extremes above, as method I puts too much burden on the BB and method II too much burden on the experts.












Blackboard example: Determining Part-of-Speech for misspelled sentences
  Example scenario Imagine a system that is trying to identify the words in a collection of misspelled writings. (Alternatively, imagine a system that is supposed to correct in real-time misspellings in an instant messaging system.) The system uses experts to propose various interpretations of the tokens as they arrive - tokens such as dawg, aite, and tha - which may not map directly to a single word or concept. This example shows the operation of a set of experts that tries to figure out the part-of-speech* of the tokens, based on a mapping from the tokens to known words.
  Given PoS: Part-of-speech
H: hypothesis
E : patterns describing the expertise of experts
P: pattern that describes a problem
  Example patterns, intended to be processed by experts (P (PoS dawg ?))
(P (PoS aite ?))
  Experts announce their expertise to the BB, in the form of a pattern
(question mark means "any value")
(PoS-Verb-Expert-X (E (PoS x ?)))
  Patterns arrive on the BB (pattern set S) (P (PoS the ?))
(P (PoS dawg ?))
(P (PoS aite ?))
(P (PoS tha ?))
(P (PoS bown ?))
  BB has list of PoS experts, e.g. PoS-Noun-Expert-1

Upon receiving a problem pattern, the BB matches it against the patterns of each expert.
In this example the BB finds expert PoS-Verb-Expert-1 to be relevant for all the problems, as the last part, (PoS x ?), of

(PoS-Noun-Expert-1 (E (PoS x ?)))

matches all problems posted in S.

  Hypotheses Posted by experts to the BB
  Resulting BB contents after PoS-Noun-Expert-1 has processed the Ps in S (H (PoS dawg noun))
(H (PoS bown noun))
  Resulting BB contents after PoS-Adjective-Expert-1 has processed the Ps in S

(H (PoS dawg noun))
(H (PoS bown noun))
(H (PoS bown adjective))


The experts would probably post the spelling of the words that they hyopthesize the tokens to stand for, e.g. (H (PoS bown brown adjective)) and (H (PoS bown bone noun)).

They might also include an estimated probability that their hypothesis is correct: (H 0.76 (PoS bown brown adjective))

  When all PoS experts have finished processing

(H (PoS the det))
(H (PoS dawg noun))
(H (PoS aite verb))
(H (PoS the det))
(H (PoS bown verb))
(H (PoS bown adjective))


* part-of-speech = orðflokkur

* adjective = l&yactue;singarorð










Constructionist A.I.
  What it is AI philosophy and design methdology developed by K. R. Thorisson and collaborators. Constructionist AI states that in order to create more intelligent machines we need to manually construct a large portion of it, and that the only viable way of doing so is to use a highly modular approach at multiple levels of abstraction. A direct result is the push for better tools.
  Why it exists AI systems that approximate human knowledge and skill, and systems like those we read about in classic science fiction stories, will not happen without the integration of a multitude of technologies, techniques, tricks, hard work, open-source software and close collaboration between industry and academia. A fundamental assumption behind Constructionist AI is that artificial intelligence is a science with a strong engineering foundation.
  Where it is The MINDMAKERS.ORG website is intended to help collect software developed in the spirit of the Constructionist approach.
  How we will use it The Psyclone system is based on the Constructionist AI philosophy; knowing it means being better at using Psyclone for the final project.











Constructionist AI

Constructionist AI mantra: No method off-limits - the goal is simply increased flexibility = increased machine intelligence.

Use well-known mechanisms to solve problems they apply well to

  • Expand existing architectures
  • Develop large architectures from scratch
  • Achive human-like features
  • Explore integration of very different mechanisms
  • Integrate learning into heterogeneous architectures


  Constructionist AI results in hybrid architectures

"Hybrid architectures"

  • Typically don't buy into a particular school of thought
  • Very often hierarchical like the subsumption architecture, but more flexible
  Basic building block of intelligence: Interacting modules Modules with input and output and some processing
  Input e.g. sensation and perception
  Output e.g. decisions
  Processing unit Processor with no memory, gets handed data along with instructions for anything it is supposed to do; produces output that contains results (plus side effects, if any)
  Local vs. global storage Processors with local memory can support simpler input and output
  Main elements
  • Modules
  • Messages
  • Blackboards
  • Publish-subscribe















Constructionist Design Methodology (CDM) I
  Provides step-by-step instructions for building modular systems  
  Blackboards Construct from early days of A.I.; not popular for a while; revived in CDM

- Old idea that is slowly filtering into the World Wide Web and business environments.
- Powerful for routing information where you don't know who might be interested in it.

  XML eXtensible Markup Language
  Message-based Message format from OpenAIR
  OpenAIR Data format and routing protocol














Constructionist Design Methodology (CDM) II
  Mutability Start with "empty boxes", create full system
Expand over time while running whole system together
  Write modules with resilience A distributed system can be very fragile; write modules to be resistent to downtime
  Write modules with temporal knowledge If the modules are unaware of the passing of time, they are less likely to represent the behavior of the system they are trying to simulate
  Determine the number of blackboards Blackboards with a lot of messages types can be hard to use; systems with many blackboards can be hard to use
  More info http://www.mindmakers.org/projects/CDM












  • Based on Constructionist AI philosophy
  • Module-based framework
  • Bridges between programming languages
  • Runs multi-module systems on multiple computers
  Research version download from http://www.mindmakers.org/projects/psyclone
  Framework for modeling real-time systems Built for A.I. & robotics; very good for modeling complex distributed systems
  Messages & streams We will only use the messaging mechanisms, which follow the OpenAIR specification
  Psyclone modules = executable code = semi-autonomous agents Bi-directional communication (via OpenAIR) with Psyclone, or more specifically, with AIRCentral or other named infobus
  Built on the blackboard philosophy Whiteboards: Psyclone equivalent of blackboards
  psySpec Central specification of modules and APIs. XML file that can be easily created.

















  Lightweight "modern verison" of blackboards  
  Usage Use one or more whiteboards to hold data of specific types or specific purposes.
At runtime, messages are posted by modules to the whiteboards.
Old messages can be retrieved by type, timestamp, and more.
  Whiteboards are the "memory" in the system Modules are "processors" -- try to keep modules stateless.
  Whiteboards handle streams and messages Important to keep in mind: Difference between "neural-like" information sources (streams, sensory data) and decisions, which are always binary. Both streams and discrete events need to be mixed in complex perception-action architectures.
  Hold a limited amount of history Can be specified in the <whiteboard> tag by setting a parameter, e.g.: <whiteboard max="1000">
  How does the whiteboard know what to do? Service registrations by modules: Modules tell whiteboards what they are interested in - whiteboard services the modules with data according to the registration.












Message Semantics
  From The unique name of the Poster - the system component (module) that authored and posted this Message
  To The main Receiver of this Message, which is always a dispatcher (e.g. whiteboard) that handles the dissemination of this Message
  Cc Any unique module name which should receive this Message, even though it may not be subscribed to receive this particular Message's Type
  postedTime The time at which this Message was released, or posted, by the module that authored and posted it
  receivedTime The time at which a receiving party received this Message
  Content The content of the Message - the main body. This slot has a parameter called language, which specifies the particular language of the content, e.g. XML, Prolog, Lisp, KQML, etc.
  Type A dot-delimited string which represents the name of the type of this Message.










Psyclone + CDM
  Defining message types Make a sensible message type tree where each branch has a definite, clear meaning in the system
  Defining whiteboards In psySpec, use the <whiteboard ...> tag
  psyProbe web-based monitoring tool for Psyclone
  publish-subscribe Java Listener subscribes; Java Poster sends messages (see examples provided with Psyclone)
  Registration Can be specified in the psySpec or sent to Psyclone/whiteboards dynamically











Programming project 1 (5%)
  Download CDIAHexapod Get it at Mindmakers.org/projects/CADIAHexapod
  Get the system running on your laptops  
  Program a new gait for the hexapod  
  Get the hexapod to perceive something in the environment  
  Check your code in Use CADIA SVN system - this will be ready on Monday
  Demonstrate in class Next Friday, Feb 2nd