FederationX Engine: Blackboard API 0.1
This Version: 0.1
Publication Date: August, 2002
Publication Location:
Authors
Reggie Chen, Magnetar Games Inc.
Rajeswari Rajagopalan, Magnetar Games Inc.
Status
This section outlines the staus of this document at the time of its publication.
This is the first working draft of the blackboard API of the engines in FederationX. It must be noted that the future drafts may override this version.
Abstract
This document describes the Blackboard API of FederationX engine.
Copyright (c) Magnetar Games Corporation, 2002.
Table of Contents
Overview
Class diagram
Class and interface description
ImtBlackBoard
ImtDataModel
ImtPrototypeRegistry
ImtFacilitator
ImtBBeventListener
ImtAgent
ImtScheduler
ImtPredicate
TmtBBFacilitator
TmtBlackboardBase
TmtBBeventListenerAgent
TmtScheduler
TmtDataModel
TmtPrototypeDictionary
Overview
Magnetar blackboard API augments the classic three box blackboard design, which are knowledge source, blackboard, and control, with a facilitator. The facilitator acts as a facade for the blackboard, and insulates it from direct access. The facilitator also plays the role of "change manager" in the "publish-subscribe" pattern, providing registration services for agents and their scheduler. The API will be presented as Microsoft COM, with IDL and GUIDs for respective interfaces and objects.
Class
diagram
Class
and Interface Descriptions
1. ImtBlackboard
Every blackboard needs to implement this interface. It encapsulates the basic
properties of a blackboard. DataModel and PrototypeRegistry are the two
important properties of Blackboard. They provide ways to store and retrieve data
objects.
Facilitator acts as a facade for the Blackboard to communicate with Agents and the
scheduler.
Operations
- ImtDataModel getDataModel()
- setDataModel(ImtDataModel datamodel)
- ImtPrototypeRegistry getPrototypeRegistry()
- setPrototypeRegistry(ImtPrototypeRegistry prototypeRegistry)
- ImtFacilitator getFacilitator()
- setFacilitator(ImtFacilitator facilitator)
2.
ImtDataModel
The ImtDataModel interface encapsulates a data representation strategy for Blackboard. The data is actually stored, accessed, and modified using the DataModel of the blackboard.
The data object is accessed by path. The path serves as an index to the location of the object.
Operations:
- string getName()
- initialize()
- addObject(string path; variant obj)
- removeObject(string path)
- updateObject(string path; variant obj)
- variant getObject(string path)
3.
ImtPrototypeRegistry
This interface implements the prototype repository of the prototype pattern. It creates prototype instances when passed with class descriptors.
Operations:
- setPrototype(string classname, object prototype)
- object getPrototype(string classname)
- createInstance (string classname)
4.
ImtFacilitator
Facilitator acts as a broker for Blackboard and provides services to Agents. It handles Agent registration and distributes blackboard events to all the registered listeners.
PublishUpdate() is called by Blackboard when events are triggered.
addBBObject, removeBBObject and getBBObject provides operations on behalf of
Blackboard's datamodel member for Agents.
Operations
- initializeBBSystem(ImtBlackboard blackboard)
- registerListener(ImtBBEventListner Subscriber, string path)
- removeListener(ImtBBEventListner Subscriber, string path)
- publishUpdate(variant BBObject; string path)
- addBBObject(string path; variant obj)
- removeBBObject(string path)
- updateObject(string path; variant obj)
5.
ImtBBEventListener
This interface provides a way for Facilitator to notify clients of changes in Blackboard.
Scheduler or Agent that wants to get notified of blackboard events will implement this interface.
Operations:
- virtual Notify(variant BBObject; string path)
6.
ImtAgent
This interface declares methods that Agents must implement.
Operations:
- virtual initialize()
- virtual shouldIExecute()
- virtual start()
- virtual stop()
- virtual suspend()
- virtual resume()
7.
ImtScheduler
This interface declares methods that a scheduler must implement. A Scheduler is a subscriber to the blackboard events.
Operations:
- registerAgent(ImtAgent agent)
- virtual schedulerClient(ImtAgent agent)
- unregisterAgent(ImtAgent agent)
8.
ImtPredicate
This interface serves as a mechanism for the Agents to express their execution.
Operations:
- boolean executionCondition()
9. TmtFacilitator
This is the base class that implements ImtFacilitator.
10. TmtBlackboardBase
This is the base class that implements ImtBlackboard.
11. TmtBBEventListenerAgent
This is the base class for most agents. It implements ImtAgent and the listener
interface for blackboard events, ImtBBEventListener. TmtBBeventListenerAgent
also exposes ImtPredicate to express its execution condition.
12. TmtScheduler
This class acts as a base class for scheduler agents. A scheduler is a special
kind of agent that subscribes to the facilitator for blackboard changes and gets
notified every time there is a state change in the blackboard. It in turn
chooses agents that can contribute to the solution by calling shouldIExecute()
method in agents and activates them.
TmtSchedulerBase inherit from TmtBBEventListenerAgent and implements
ImtScheduler.
13. TmtDataModel
This is the base class that implements ImtDataModel.
14. TmtPrototypeDictionary
This is the base class that implements ImtPrototypeDictionary.