blackbrd

advertisement
Blackboard Systems
Applying opportunistic reasoning and moving towards agent based systems.
Aims
Objectives.
Introduction.
Section
Case Study
BLACKBOARD SYSTEMS AND THEIR RELATIONSHIP WITH OTHER DEVELOPMENTS
IN COMPUTING.
THE EVOLUTION OF AGENT BASED SYSTEMS.
Summary
Exercises
Assessment
Recommended Reading
"Knowledge Based Systems"
AIMS
To follow the development of knowledge based systems reasoning approaches.
To illustrate the association of blackboard systems with other improvements in both hardware
and software.
To introduce the basis for the emergence of software agents.
OBJECTIVES
To demonstrate blackboard system architectures.
To demonstrate the use of opportunistic reasoning.
To review the Hearsay II blackboard system and to introduce several other exemplar systems.
To consider the advantages and disadvantages of blackboard systems.
INTRODUCTION
Many classical KBS force domain knowledge to be represented in a single form, primarily
because they apply a fixed form of inference mechanism and this determines how knowledge is
to be represented. If you remember forward and backward reasoning are the two most common
forms of reasoning met so far. Forward chaining is good for situations where most of the data is
available at the start of a problem and reasoning moves from the data towards possible
conclusions. Backward chaining is suitable for diagnostic applications where the reasoning starts
from a goal and attempts to collect just sufficient data to prove or disprove that goal. However
where a problem is large and complex it may be helpful to support both forms of reasoning (and
indeed to incorporate others) and this is where blackboard systems and opportunistic reasoning
come in.
In opportunistic reasoning instead of sticking to one reasoning approach knowledge is applied to
the problem at the most suitable time and in the most appropriate manner. The specific reasoning
approach adopted at any point in the development of a solution is determined dynamically by the
current state of that solution and the possible set of knowledge which could be applied at that
point. This is achieved by partioning the knowledge into separate knowledge sources each of
which can be viewed as independent KBS with their own knowledge representation and
reasoning mechanism. These knowledge sources work together in order to solve problems. The
whole system operates something like a production system except that there are many sets of
knowledge interacting with the 'working memory'.
SECTION DETAILS
The Blackboard Architecture.
Blackboard systems (BB) are generally used to tackle large and complex problems which usually
need several people to work together in order to solve them. One can imagine a situation where a
company is trying to resolve a problem of falling income and various members of staff sit around
a table to discuss the matter. Such staff might include the company accountant, the production
manager, the sales manager, the purchasing manager, the distribution manager, the personnel
manager and so forth. Each would be able to contribute information about the problem to the
others. For example, the accountant might show that the sales figures were falling, the sales
manager might show that their prices were not competitive with other companies, the purchasing
and production managers might show that some costs involved in the materials and
manufacturing processes could be reduced, the distribution manager might show where
economies in the delivering goods could be made. The accountant could suggest that the
company reduce its product range and obtain economies of scale by increasing other products
and so on. The whole point here is that each member at the discussion has there own particular
areas of skill and knowledge and that each of them can contribute to a solution for the immediate
problem. In order to do this they work together, each offers information to the discussion and the
others use this to help them offer further information. During the discussion various possible
ways of solving the problem would be offered and supported by some or all of the others and
ultimately they would agree on a plan of action. This is what BBs are intended to mimic.
Blackboard systems essentially are built of three components, the knowledge sources, the
common blackboard and the control mechanism.
Knowledge Sources (KS).
These contain the domain knowledge needed to solve a particular set of problems and each
knowledge source is a self-contained problem solving component. The KS can each solve a part
of the problem and when they work together they can solve whole problems. As each KS is
individual the particular bit of the domain knowledge that they encode can be represented using
the most suitable knowledge representation e.g. procedural, rules, frames, scripts, classical logic
etc. This also means that each KS may need a different form of inferencing mechanism e.g.
forward, backward, logic, sequential etc.
In operation each KS has a set of prerequisites which must be met before it can form one of the
conflict set (the set of possible actions that the control mechanism can choose as the next thing to
be done). Each KS must determine if its own prerequisites have been met and they do this by
examining the blackboard. Many KS are dependent on work done by other KS and so cannot be
executed until other those KS have completed e.g. a KS which checks that the design of a gate in
a microprocessor cannot be executed until some other KS has designed the gate. Where the
prerequisites of a KS are satisfied and it is selected by the control mechanism then it reads data
from the blackboard, applies its knowledge to that data and posts updated information back to the
blackboard. This updating represents an improvement on the current state of the solutions present
on the blackboard.
Typically each KS can see and modify only a subset of the data on the blackboard and reading
and writing on the blackboard are the only ways in which one KS can communicate with
another. Remember the idea is that the KS co-operate to solve the problem and if some KS
communicated directly with a few others then data which could possibly be used by other KS
might not appear on the blackboard. It also increases the independence of the KS.
The Blackboard.
The Blackboard is a common resource which is used to allow the various KS to communicate
with each other. It holds the data gathered so far, and also the current set of partial solutions
which are being pursued simultaneously. In order to improve control and increase data
abstraction the Blackboard can be organised into a series of levels or hierarchies and KS are
associated with specific levels. Often KS may read data from one level and post updated data to a
higher level. This supports the ability to represent the solution, as well as the domain knowledge,
in forms which best suit the various levels of solutions.
Further differentiations of the Blackboard can be achieved by incorporating several distinct
panels which are used to display alternative representations of solutions, to show data read in,
data inferred, levels of uncertainty and so forth.
The Control Mechanism.
In the same way that classical KBS have to oversome the problem of conflict resolution
Blackboard systems also need a way of resolving situations where more than one KS indicates
that it could add something to the solutions. This is done in BB through the control mechanism
which co-ordinates the KS. The control mechanism looks at the current state of the BB and
checks the possible things which KS indicate they can add to that state. It then decides which KS
is to execute next on the basis of the current focus of attention - this shows what has just
occurred on the BB and helps to inform the control mechanism of the next most appropriate type
of action or object to fire. Focus of attention candidates are:
1. Particular KS which can be activated next.
2. Particular BB objects which should be examined next.
3. A combination of KS and BB object.
Note that as the control mechanism selects a focus of attention irrespective of what it does then
any form of inferencing can be performed and this is how opportunistic reasoning is an integral
part of BB.
Clearly the choice of the focus of attention is crucial to both the success and speed of devising
solutions and this is a critical aspect of BB systems. Hayes-Roth and Hewitt [BB1: An
Implementation of the Blackboard Control Architecture", Blackboard Systems, Englemore &
Morgan(eds), Addison-Wesley 1988, pp297-313] define the behavioural goals for intelligent
control in BB to be those that solve the control problem. Specifically these goals are defined as:
1. Control should decide which of the possible actions to implement, when to do them, and
must carry out those actions.
2. Control should select desirable actions from the set of possible actions.
3. Control should be able to apply both domain and meta-knowledge appropriately when
solving a problem.
4. Control should be aware of the effect of specific problem attributes on the nature of
desirable solutions and adjust accordingly.
5. Control should be able to react to any change on the problem characteristics as solutions
develop i.e. as the characteristics change some control heuristics may become less
important while others increase in relevance.
6. Control should integrate all control heuristics which are currently applicable (some may
be contradictory etc.)
7. Control should apply strategic approaches rather than tactical ones i.e. look for global
solutions rather than ones local to sub-problems.
8. Control must decide whether the next action should develop the current solutions or assist
the control mechanism in resolving its immediate problems.
The Execution of a Blackboard System.
When a BB system is running this is what happens:
1. A KS makes some change to the blackboard and this is also recorded in the control data
area.
2. Each KS checks its relevant part of the blackboard to see if it can add something to the
current state of the blackboard. If it can is indicates what changes it can make to the
control mechanism.
3. Using the information from the first two steps the control mechanism then chooses a
focus of attention.
4. Control gets things ready for the next execution:
1. If the focus of attention is a KS the some item on the blackboard needs to be
identified for it to examine
2. If the focus of attention is a blackboard object then some KS must chosen to
process it
3. If the focus of attention is a KS and a blackboard object then the system is ready
for execution
4. The KS updates the blackboard as a result of processing the blackboard object and
the sequence starts again with step 1.
The BB stops when some defined set of criteria are reached, typically these are incorporated
within one or more KS.
CASE STUDY: The Hearsay II System. (see Gonzalez & Dankel pp215-220)
This was an attempt to produce a real-time speech recognition and understanding system and
started in approximately 1971, lasting for some five years. Speech recognition and understanding
is a very complex problem because it requires both that the system could pick up the sounds as
spoken by various speakers and also that it could interpret the meaning of these utterances. Just
looking at speech recognition means that the system must capture the utterances as analogue
sound waves; this will also mean that any other simultaneous sounds such a someone coughing, a
bus going past etc. will also be picked up and form part of the sound waves. Thus the initial data
collection will incorporate noise - unwanted and distorting information. Consider the second part
of the problem, taking the nosiy sound waves and firstly converting them back into sentences and
then interpreting them. This is also a difficult problem to solve, think of the problems associated
with words that sound the same e.g. red and read, blue and blew etc. How do you cope with
them? How do you decide where one word ends and another starts e.g. is a stream of sounds
"how do you recognise speech" could be heard as "how do you wreck a nice beach". The point
here is that this problem is of such complexity that the approaches available in the early seventies
had no way of coping with it, they were too inflexible. Hence the use of BB.
The approach taken was to use the phonetic components of speech to build up the original
sentances and then to interpret these. What this means is that the sound waves for the lowest
phonetic speech parts, called phonemes, were stored as patterns and the incoming sound waves
from speech utterances were searched for matching (or near matching patterns). All possible
matches of pattern would be posted on the blackboard thus from the very start of the process
potentially many solutions are possible. Given that the phonetic components of the utterances are
on the blackboard KS would be applied to combine the phonemes into syllables, this process
would begin to eliminate some possibilities and would result into possible phonemes being
posted on the blackboard. Other KS would now attempt to join syllables into words, again
reducing the possible set of solutions. Once the words were on the blackboard yet other KS
would try to combine them into phrases and so on until sentences and their interpretations were
placed on the blackboard. Since this would occur in near real time then the state of the
blackboard would be changing rapidly as new sound waves were entered and completed
sentences derived. This problem offered a neat hierarchical split within the blackboard since the
KS at one level would post information for use by KS at the next level. This could be envisaged
as follows:
Given a sentence such as "Find papers on how to recognise speech." You should be able to see
that this could be recognised as follows:
fin|fine|find pap|cap|tap ers|errs|hers|ores on how|bow| to|too|two wreck|rec og|a nise|nice|nize
etc.
It is only as you begin to combine some low level possibilities that the number of potential
sentences begin to diminish e.g. fine cap hers on how to wreck a nice….. is a possibility that
would not be eliminated until you began to apply grammar rules to create sentences and phrases.
Gonzalez and Dankel also discuss several other BB systems and it is worth reading through these
accounts as they offer variations on approaches and applications for BB.
BLACKBOARD SYSTEMS AND THEIR RELATIONSHIP WITH OTHER
DEVELOPMENTS IN COMPUTING.
Artificial Intelligence systems have always promised much but delivered very little for a variety
of reasons. Some of the problems are associated with size, memory requirements and slow
speeds typically characteristic of AI systems. However with the advent of much larger RAM.
Larger backing store, more powerful processors and distributed systems AI can begin to produce
applications which take advantage of these advances to produce systems which offer more
realistic performance.
In the case of BB systems the splitting of the domain knowledge into separate KS means that the
possibility of adopting parallel processing is very high. In fact not only can you arrange matters
so that each KS has its own processor but that these processors may be distributed across a range
of computers. This offers very definite advantages for improving the speed of BB systems - each
KS can do its own work at the same time as others so the control mechanism may have fewer
conflicts to resolve but have a much greater need to monitor the updating of the blackboard. If
many KS can update the blackboard simultaneously there is the possibility of contradictory
updating, the need to ensure objects are updated by a single KS, if each KS has its own copy of
the blackboard then all copies must be kept in synchronisation with each other etc. Software
advances in the areas of concurrent and distributed processing together with distributed database
technology have all helped to make this a reality.
However the advent of separate KS has also meant the possibility of re-using KS across
applications and this lead to the need to develop KS which are as self contained as possible. One
outcome of this work was the idea of autonomous intelligent agents generally called software
agents and these have seen a major raise in use with the advent of the World Wide Web.
Essentially a software agent is a small self contained entity which offers a simple service and
which
THE EVOLUTION OF AGENT BASED SYSTEMS.
Essentially a software agent is a small self-contained entity which offers a simple service and
which has in built 'intelligence' which enables it to achieve this service.
SUMMARY
Blackboard systems apply opportunistic reasoning to help solve problems. Opportunistic
reasoning is the application of the most appropriate form of reasoning (forward, backward,
procedural etc) to the current state of the solution. This is achieved through the partioning of
knowledge into separate knowledge sources within which knowledge can be represented in the
most appropriate form and which can thus use the most relevant form of inference. The rest of a
blackboard comprises a common blackboard through which all knowledge sources communicate
and a control mechanism which selects the next action in the problem solving process.
The blackboard represents a common database which all knowledge sources can read from and
write to (knowledge sources do not communicate with each other directly) and it holds all
current partial solutions. Since all knowledge sources can see all partial solutions they can
indicate to the control mechanism what effect they can have on the current solutions i.e. they
take the opportunity to suggest developments of the current state and the control mechanism
chooses which source to apply.
Blackboard systems differ from classical KBS in that they:
1. Support separate knowledge sources. This allows knowledge to be represented in the
most suitable form e.g. procedural, rule based, frames etc.and also to apply the most
appropriate type of inferencing e.g. forward, backward, sequential etc.
2. This separation of knowledge into small self contained chunks supports both data
abstraction and also hierarchical knowledge structures.
3. Solutions are achieved through the co-operation of the knowledg sources and the
common blackboard.
4. Many potential solutions can be held on the blackboard simultaneously, this allows more
than solution to be pursued at the same time rather than just following the most likely
solution i.e. decisions can be delayed until the level of certainty can be reduced.
5. Support parallel and distributed approaches to problem solving.
6. Applicable to many types of problem but payoffs really generated where problems are
large, complex and not very easy to solve using more traditional approaches.
They have several disadvantages:
1. Costly to build and run.
2. No specific methdologies available to aid the partioning of knowledge
EXERCISES
1. What characterises applications which are suitable for BB systems?
2. How can BB systems capitalise on the development of hardware and software over the
last five years (think about memory, speed, parallelism, concurrency and distributed
systems, agent based systems)?
3. What benefits do BB systems offer over classical KBS?
4. What things could form objects on the blackboard?
5. Suggest several different sets of information that could be displayed via the blackboard
which would benefit the system users.
6. How could you take advantage of BB systems to improve the explanation systems
typically offered by classical KBS?
7. Consider the following problem concerning the timetabling of modules on a university
course. Some modules are taught in conjunction with the Combined Studies courses and
so must be scheduled on either a Monday afternoon(2pm - 5pm) or Thursday morning
(9am - 1pm). Some modules are also taught in conjunction with part time students and so
must be scheduled on Mondays (9am - 8pm) [some modules are taught in conjunction
with Combined Studies and part time students]. When scheduling modules you must
check that a room of sufficient size is available, that there are no clashes for students
studying a module and any other modules scheduled to run simultaneously (modules can
be scheduled at the same time so long as there are no student clashes), that the lecturer is
not scheduled to be teaching elsewhere at that time and that students are not taught in
consecutive blocks of more than 3 hours. Oh, yes, all students and staff must get a one
hour break each day during the hours of 12 noon to 2pm.
Is this problem suitable for a BB system? Determine the following things:
a. The various knowledge sources
b. Criteria to be used by the control mechanism when choosing KS
c. The information needed by the control mechanism in order to choose a KS
d. Describe the termination criteria and suggest how they might be applied
e. Suggest several reasons why BB systems are an improvement over classical KBS
for this type of problem
ASSESSMENT
RECOMMENDED READING
The Engineering of Knowledge Based Systems
Gonzalez and Dankel
Chapter 7 pages 207 - 231
Artificial Intelligence and the Design of Expert Systems
Luger and Stubblefield
Chapter 15 pages 561 - 563
Artificial Intelligence (2nd edition)
Rich and Knight
Chapter pages
Introduction to Expert Systems
Jackson
Chapter 22 pages 368 - 383
Download