Efficient Pattern Matching Algorithm for Memory Architecture
Blackboard architecture pattern
-
Upload
aish006 -
Category
Engineering
-
view
614 -
download
0
Transcript of Blackboard architecture pattern
BLACKBOARD ARCHITECTURAL PAT-TERN
G. Aish-warya
1GA12CS024
definition
Blackboard architecture pattern is useful for problems for which no deterministic solution strategies are knows.
In blackboard, several specialized subsystems assemble their knowl-edge to build a possibly partial or approximate solution
example – speech recognition
•Input – speech – in the form of wave•Output – “ARE ANY BY FEIGENBAUM”•Knowledge-sources :-
• Segments• Words• Phrases
context
WE ARE CONSIDERING THOSE PROB-LEMS WHICH DO NOT HAVE A FEASI-BLE / KNOWN SOLUTION i.e. NON-DE-TERMINISTIC PROBLEMS
structure•The blackboard pattern consists of 3 components –
• Blackboard• Knowledge-source• Control
Classblack-board
ClassKnowl-edge-source
Classcontrol
Respon… Respon… Respon…
Col.. Col.. Col..
structure•Blackboard
Central data storage Vocabulary – set of elements appearing on the
blackboard Acts as an interface for knowledge-sources to read
from or write to it.
Classblack-boardResponsibil-ity
Collabora-tors
•Manages cen-tral data
structure•Knowledge-sources
Independent sub-systems which exists separately Provides solution to some part of entire problem Results of all knowledge-sources are integrated to
solve the entire problem
ClassKnowledge-sourceResponsibil-ity
Collabora-tors
•Updates black-board•Computes a re-sult
•blackboard
structure•When can knowledge-source contribute to a solution?
Condition-part - Check if it is capable of contributing to the blackboard Action-part – if yes then cause a change to the con-tents of blackboard
ClassKnowledge-sourceResponsibil-ity
Collabora-tors
•Updates black-board•Computes a re-sult• Evaluate own’s capability
•blackboard
structure•Control
Monitor changes on blackboard periodically(run a loop)On identifying changes, decide the action to take placeSchedule knowledge-source execution
ClasscontrolResponsibil-ity
Collabora-tors
•Monitors black-board
•Schedule knowledge-source execution
•blackboard•Knowledge-source
dynamics – speech recognitionSTEP 1 – Control component starts the LOOP
STEP 2 – Control component calls nextSource() method to select the next Knowledge-source
STEP 3 – Verify if knowledge-sources can contribute partially to the solution by observing the blackboard. Here we get 3 knowledge-sources :-
• Segmentation• Syllable Creation• Word Creation
STEP 4 – Check condition-part of each knowledge-source whether it can contribute to the solution right now
STEP 5 – Assuming that Syllable Creation is a promising knowledge-source, execute its action-part i.e. create a syl-lable
STEP 6 – update the blackboard with the new syllable
dynamics – speech recognition
implementation•There are 7 steps in implementing a Blackboard Architecture Pattern-
• STEP 1 – Define the Problem• STEP 2 – Define the Solution Space for the Problem• STEP 3 – Divide Solution Process into Steps• STEP 4 – Divide knowledge into specialized
knowledge-sources with certain sub-tasks
• STEP 5 – Define the vocabulary of the blackboard• STEP 6 – Specify the control of the system• STEP 7 – Implement the knowledge-sources
implementation•STEP 1 – Define the Problem
•Specify the problem
•Specify the field of knowledge required to find the solution to the problem
•Define how user interact with the system
•Test the system by giving various kinds of in-puts
implementation•STEP 2 – Define solution space for the Problem
SOLU-TION
PARTIALCOM-PLETE
INTERMEDI-ATE
TOP-LEVEL
FULLABSTRACTION
PARTIALABSTRACTION
implementation
•STEP 3 – Divide solution process into steps
•Specify how solutions are transformed to higher-level solutions
•Specify the knowledge that can be used to ex-clude parts of solution space
implementation
•STEP 4 – Divide knowledge into specialized knowledge sources with certain subtasks
•The subtasks corresponds to areas of special-ization
•Knowledge sources must be complete
implementation
•STEP 5 – Define the vocabulary of the blackboard
•The vocabulary should be in such a way that the knowledge source should be able to make out whether to use the blackboard entry or not
•The vocabulary of the blackboard has to be de-fined regularly depending on the knowledge source
implementation
•STEP 6 – Specify Control of the system
•Decides which knowledge source can make changes to the blackboard
•Schedules the knowledge sources using heuris-tics
implementation
•STEP 7 – Implement knowledge sources
•Split knowledge sources into condition-part and action-part depending on the control com-ponent.
•Do not make any assumptions while implement-ing a knowledge source
variants
There are 2 variants –• Production system• Repository
variants
PRODUCTION SYSTEM – • Used in OPS language• Functions are represented as condition-action rules• Condition on left, action on right• If condition is satisfied, action is executed and rule is
selected
C1 = A1 ; R1C2 = A2 ; R2
variants
REPOSITORY – • Alternative/variant of blackboard architecture• Instead of blackboard, the central data struc-
ture is called repository
consequencesThere are 4 benefits of Blackboard architecture pattern –
• Experimentation• Changeability & Maintainability• Reusable Knowledge Sources• Fault Tolerance & Robustness
benefits1) EXPERIMENTATION –
useful in domains where solution is non-deterministic
2) CHANGEABILITY & MAINTAINABILITY – since knowledge-source, control component
and black board are separate
3) REUSABILITY – knowledge-sources do not confine to one prob-
lem. They are independent solutions which can combine with any larger problem
4) FAULT TOLERANCE & ROBUSTNESS – not all results survive. Results supported by
data only survive in blackboard
consequencesThere are 6 liabilities of Blackboard architecture pattern –
• Difficulty of Testing• Good solution not guaranteed• Low Efficiency• Difficulty to establish good con-
trol strategy• High development effort• No support for parallelism
liabilities
1) DIFFICULTY OF TESTING – since it doesn’t follow a deterministic algorithm
2) Good solution not guaranteed – can only solve a certain part of complete prob-
lem3) Low Efficiency –
suffers from computational overheads4) Difficulty to establish good control strategy –
control strategy can not be designed in a straight- forward way and needs an experimental approach
5) High development effort – most blackboard systems take years to evolve
6) No support for parallelism – doesn’t support parallel execution
Thank You