edu.mit.sketch.system
Class KnowledgeSource

java.lang.Object
  |
  +--edu.mit.sketch.system.KnowledgeSource
Direct Known Subclasses:
BottomUpTemplateCreatorKS, BottomUpTemplateFiller, LowLevelKS

public abstract class KnowledgeSource
extends Object

This is the base class for all of the "experts" that can bring their experience to bear on a specific aspect of a problem. Each KS has 3 main parts.

The triggers determine when the KS might possibly be relevent. The conditions are a more extensive set of tests that determine if there exists a complete set of parameters that the KS can execute on. The actions represent the changes that the KS makes to the BB based on the bindings that were found during the evaluation of the conditions.

Created: Tue Nov 20 14:20:36 2001
Copyright: Copyright (C) 2001 by MIT. All Rights Reserved.


Constructor Summary
KnowledgeSource(String name, String processType)
           
 
Method Summary
 String getName()
          Get the english name of this KS.
 String getProcessType()
          Get the process type.
 boolean hasProcessType(String type)
          Again, change this to use types instead of strings.
 String toString()
          Just use the name of the KS as its printable representation.
abstract  Collection trigger(BBItemHandler items, Blackboard bb)
          A function which takes the new BBItems and the Blackboard itself and returns (in constant time, relative to the stuff on the BB) a collection of Scheduler Items which are the triggered knowledge sources.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KnowledgeSource

public KnowledgeSource(String name,
                       String processType)
Method Detail

trigger

public abstract Collection trigger(BBItemHandler items,
                                   Blackboard bb)
A function which takes the new BBItems and the Blackboard itself and returns (in constant time, relative to the stuff on the BB) a collection of Scheduler Items which are the triggered knowledge sources. The triggerent KSs must implement the function "process" which checks more throuroughly to see if its conditions are met, and if so makes the appropriate changes to the Blackboard.

getProcessType

public String getProcessType()
Get the process type. Again, String should be replaced with a more sophisticated type class.

hasProcessType

public boolean hasProcessType(String type)
Again, change this to use types instead of strings.

getName

public String getName()
Get the english name of this KS.

toString

public String toString()
Just use the name of the KS as its printable representation.
Overrides:
toString in class Object