Blackboard architecture pattern

27
BLACKBOARD ARCHITECTURAL PATTERN G. Aishwarya 1GA12CS024

Transcript of Blackboard architecture pattern

Page 1: Blackboard architecture pattern

BLACKBOARD ARCHITECTURAL PAT-TERN

G. Aish-warya

1GA12CS024

Page 2: Blackboard architecture pattern

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

Page 3: Blackboard architecture pattern

example – speech recognition

•Input – speech – in the form of wave•Output – “ARE ANY BY FEIGENBAUM”•Knowledge-sources :-

• Segments• Words• Phrases

Page 4: Blackboard architecture pattern

context

WE ARE CONSIDERING THOSE PROB-LEMS WHICH DO NOT HAVE A FEASI-BLE / KNOWN SOLUTION i.e. NON-DE-TERMINISTIC PROBLEMS

Page 5: Blackboard architecture pattern

structure•The blackboard pattern consists of 3 components –

• Blackboard• Knowledge-source• Control

Classblack-board

ClassKnowl-edge-source

Classcontrol

Respon… Respon… Respon…

Col.. Col.. Col..

Page 6: Blackboard architecture pattern

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

Page 7: Blackboard architecture pattern

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

Page 8: Blackboard architecture pattern

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

Page 9: Blackboard architecture pattern

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

Page 10: Blackboard architecture pattern

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

Page 11: Blackboard architecture pattern

dynamics – speech recognition

Page 12: Blackboard architecture pattern

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

Page 13: Blackboard architecture pattern

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

Page 14: Blackboard architecture pattern

implementation•STEP 2 – Define solution space for the Problem

SOLU-TION

PARTIALCOM-PLETE

INTERMEDI-ATE

TOP-LEVEL

FULLABSTRACTION

PARTIALABSTRACTION

Page 15: Blackboard architecture pattern

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

Page 16: Blackboard architecture pattern

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

Page 17: Blackboard architecture pattern

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

Page 18: Blackboard architecture pattern

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

Page 19: Blackboard architecture pattern

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

Page 20: Blackboard architecture pattern

variants

There are 2 variants –• Production system• Repository

Page 21: Blackboard architecture pattern

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

Page 22: Blackboard architecture pattern

variants

REPOSITORY – • Alternative/variant of blackboard architecture• Instead of blackboard, the central data struc-

ture is called repository

Page 23: Blackboard architecture pattern

consequencesThere are 4 benefits of Blackboard architecture pattern –

• Experimentation• Changeability & Maintainability• Reusable Knowledge Sources• Fault Tolerance & Robustness

Page 24: Blackboard architecture pattern

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

Page 25: Blackboard architecture pattern

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

Page 26: Blackboard architecture pattern

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

Page 27: Blackboard architecture pattern

Thank You