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

  1. ImtDataModel getDataModel()
  2. setDataModel(ImtDataModel datamodel)
  3. ImtPrototypeRegistry getPrototypeRegistry()
  4. setPrototypeRegistry(ImtPrototypeRegistry prototypeRegistry)
  5. ImtFacilitator getFacilitator()
  6. 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:

  1. string getName()
  2. initialize()
  3. addObject(string path; variant obj)
  4. removeObject(string path)
  5. updateObject(string path; variant obj)
  6. 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:

  1. setPrototype(string classname, object prototype)
  2. object getPrototype(string classname)
  3. 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

  1. initializeBBSystem(ImtBlackboard blackboard)
  2. registerListener(ImtBBEventListner Subscriber, string path)
  3. removeListener(ImtBBEventListner Subscriber, string path)
  4. publishUpdate(variant BBObject; string path)
  5. addBBObject(string path; variant obj)
  6. removeBBObject(string path)
  7. 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:

  1. virtual Notify(variant BBObject; string path)

6. ImtAgent

This interface declares methods that Agents must implement.

Operations:

  1. virtual initialize()
  2. virtual shouldIExecute()
  3. virtual start()
  4. virtual stop()
  5. virtual suspend()
  6. virtual resume()

7. ImtScheduler

This interface declares methods that a scheduler must implement. A Scheduler is a subscriber to the blackboard events.

Operations:

  1. registerAgent(ImtAgent agent)
  2. virtual schedulerClient(ImtAgent agent)
  3. unregisterAgent(ImtAgent agent)

8. ImtPredicate

This interface serves as a mechanism for the Agents to express their execution.

Operations:

  1. 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.