Download coppin chapter 17

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Chapter 17
Advanced Knowledge
Representation
1
Chapter 17 Contents (1)








The Blackboard Architecture
Scripts
The Copycat Architecture
Nonmonotonic Reasoning
The Modal Operator M
Default Reasoning
Truth Maintenance Systems
Closed-World Assumption
2
Chapter 17 Contents (2)









Circumscription
Abductive Reasoning
The Dempster-Shafer Theory
MYCIN and Certainty Factors
Temporal Logic
Event Calculus
Mental Situation Calculus
Knowledge Engineering
Case-Based Reasoning
3
The Blackboard Architecture (1)
A method for structured knowledge
representation.
 Uses opportunistic reasoning – decides
whether to use forward or backward
reasoning as appropriate.
Allows knowledge from a
range of experts to be
combined together and
used in one system.

4
The Blackboard Architecture (2)




Information from the various knowledge sources
(experts) is written on the blackboard, which is a
shared data store.
When a knowledge source sees some data on the
blackboard that it can use, it derives a conclusion
and adds this as a new fact to the blackboard.
The opportunistic model means experts do not
need to take turns, but can add data whenever
they want.
Typically there is a control mechanism that
determines when knowledge sources can add data
to the blackboard, but this is not essential.
5
Scripts (1)




A script is a structured representation of a
situation, such as buying dinner in a
restaurant or going shopping.
A script has a set of preconditions called
entry conditions that determine when it
can be used.
Running a script generates an output
called a result.
Scripts are designed to enable us to
reason about motivations or reasons –
why did he do that?
6
Scripts (2)




A script is presented with a story, and attempts to
match elements of the story with its scripted
elements.
Scripts are encoded with a great deal of domain
knowledge, and so are able to answer questions
that are not explicitly answered in the story.
Scripts include roles, which define types of people
– for a restaurant the roles might be waiter, chef
and customer.
The individuals named in a story are matched with
these roles to assist with understanding the story.7
The Copycat Architecture (1)



A system for solving analogies such as:
abc => abd
Hence,
tuv => ?
Uses a non-deterministic approach, meaning
running it multiple times on the same problem
may generate different answers.
The above problem has several possible
answers, such as:
tuw
tud
8
The Copycat Architecture (2)



The architecture consists of the following
components:
 The Workspace
 The Coderack
 The Slipnet
The workspace is a working memory, similar to the
blackboard architecture.
The coderack contains a number of relationships
between objects. These are encoded as codelets.
For example:
the b in abc is the successor of a
9
The Copycat Architecture (3)


A simplified version of
the slipnet is shown
here.
The slipnet is the longterm memory.

Each concept in the slipnet has an activation level which
shows how relevant it is to the current problem.

Concepts within the slipnet show relationships between
other concepts – the example above shows the way the
slipnet records the idea that “first” is “opposite” to
10
“last”.
The Copycat Architecture (4)




The system uses temperature to represent how far it
is from a solution.
The higher the temperature, the more random its
codelets are allowed to be.
Copycat works by building rules that explain the
relationships between the letters in the example it is
given, and then by applying those rules to the
problem.
As the system runs, the temperature is gradually
lowered until it hits a threshold at which point it has
found a solution, and stops.
11
Nonmonotonic Reasoning



In a monotonic logical system, if conclusion C can
be derived from premises, P, then adding
additional facts to P cannot cause C to become
false.
Propositional and predicate logics are monotonic.
We will now examine some logical systems that
are not monotonic. These can be useful,
particularly as the real world does not usually
behave in a monotonic way:
 We often find ourselves changing our beliefs
and conclusions as we learn new facts. This is
nonmonotonic reasoning.
12
The Modal Operator M






Predicate calculus can be extended with the
modal operator M.
M represents the idea that a concept is consistent
with our beliefs.
For example:
x bird (x) Λ M flies (x)  flies (x)
“for all x, if x is a bird and it is consistent with our
beliefs to believe that x can fly, then x can fly”
(I.e.: “most birds can fly”)
Our beliefs can change – for example, when we
realise that dead birds cannot fly.
13
Default Reasoning




Another form of nonomonotonic reasoning:
Car (x) Λ :Has_Driver (x)  Has_Driver (x)
This can be read “if x is a car and we have no
reason to believe that x does not have a driver,
then we can conclude that x does have a driver.”
This allows us to set up default rules. The defaults
can be overridden by new facts.
If you saw the driver jump out a few seconds
before, or you know it’s a new driverless car, then
you’d know that in this case the car did not have a
driver.
14
Truth Maintenance Systems (1)





A TMS is used to store beliefs and information
about how those beliefs were derived.
The JTMS (Justification-based TMS) stores
reasons for each belief.
For example, belief Q might have the following
reason:
({P, R}, {¬S})
If P and R are both true, and ¬S is false, then we
can deduce that Q is true.
If we use this reason to conclude that Q is true,
and later discover that ¬S is true, then we must
retract our earlier conclusion.
15
Truth Maintenance Systems (2)





The JTMS stores beliefs and reasons in a network of
nodes.
It does not understand the beliefs or reason about
them, it simply stores them. A problem solving system
reasons about the beliefs and modifies the JTMS.
Each node is either in (believed to be true) or out
(believed to be false).
If a new belief is added which contradicts another
belief, dependency directed backtracking is used to
work back from the contradictory node to find the
assumptions that led to it.
Contradictions are retracted until no contradictions
remain.
16
Closed-World Assumption




Also known as negation by failure – used
by PROLOG and STRIPS
Assumes that any fact that is not specified
is false.
ADL uses the open world assumption –
any fact not stated to be false is assumed
to be true.
Systems that use the closed-world (or
open-world) assumption must be able to
reason nonmonotonically.
17
Circumscription




A nonmonotonic reasoning method designed to
deal with facts which are not explicitly stated
or denied.
The circumscription of predicate P in an
expression E is written:
E(Φ) Λ x (Φ(x)  P(x))  x (P(x)  Φ(x))
Where Φ(x) is the result of substituting all
occurrences of P with Φ in E.
Circumscription provides a way to modify a
FOPL expression so that it expresses that no
facts are true other than those specified.
18
Abductive Reasoning



Abductive reasoning is based on the following
rule, which is not logically sound:
B
A→B
A
Hence if B is true, and we know that A implies
B, then it is reasonable to assume that A is
true.
This does not guarantee to provide correct
solutions, but can be used to give a “good
enough” explanation for an observed
phenomenon, which can later be corrected if
new evidence arises.
19
The Dempster-Shafer Theory (1)




Used to describe the degree of belief in a
statement.
Bel (A) is used to express the degree to
which we believe A to be true.
Note that Bel (A) + Bel (¬A) does not have
to equal 1.
For example, we might feel fairly sure that
it is raining: Bel (rain) = 0.9; we might have
no reason at all to believe that it is not
raining: Bel (¬rain) = 0.
20
The Dempster-Shafer Theory (2)





The plausibility of x is written:
Pl (x) = 1 – Bel (¬x)
So, if Bel (x) = 0.9 and Bel (¬x) = 0:
Pl (x) = 1
We can now write this as a range:
[0.9, 1]
The fact that this range is narrow tells
us we are fairly sure about our belief.
A belief range of [0,1] means we know
nothing at all about the statement.
21
MYCIN and Certainty Factors (1)





MYCIN: an expert system used for medical
diagnosis.
Uses backward chaining and abductive
reasoning to determine which bacteria is most
likely to be causing the symptoms.
Certainty factors are used to express degrees
of belief:
MB(H|E) is the measure of belief of hypothesis
H, given evidence E.
MD(H|E) is the measure of disbelief of
hypothesis H, given evidence E.
22
MYCIN and Certainty Factors (2)
The certainty factor is written:
CF (H|E) = MB(H|E) – MD(H|E)
 If CF (H|E) = 1 this means that evidence
E gives a strong confidence that H is
true.
 If CF (H|E) = 0 this means that evidence
E gives a strong confidence that H is
false.

23
Temporal Logic (1)

Extends first order predicate logic with two
modal operators:
P
P

means from now on, P will be true
means that at some point in the
future P will be true
Other modal operators for dealing with time
include the following:
QP
means that Q is true until P is true
P
means that P will be true in the next
time interval
24
Temporal Logic (2)

1.
2.
3.
Temporal logic systems have the following
factors which define its behavior:
Safety conditions define behaviorrs which can
never occur.
Liveness conditions specify what the system
should do; how it should behave.
Fairness conditions define the behaviour of the
system in nondeterministic situations. For
example, deciding what an elevator should do if
two people call it at the same time from different
floors.
25
Event Calculus (1)

An event takes place in space and
time:
26
Event Calculus (2)



An extension of situation calculus that
deals with events.
An event is a bounded period of time.
Uses predicates such as:
Happens (e, t)
Starts (e, f, t)
Ends (e, f, t)
Where f is a fluent, e is an event and t is a
variable of time.
27
Mental Situation Calculus




Allows us to reason about beliefs of an agent, and
how they are affected by actions and the
environment.
Uses functions such as:
Holds (P, S) means that P holds in situation S
Believes (P) means that the agent believes P
Hence, we might write:
Holds (Believes (Fly (Pigs)), S)
This means that it is true in situation S that the
agent believes that pigs can fly.
28
Knowledge Engineering



Systems based on logic rely on knowledge.
Knowledge engineering is:
The process of gathering knowledge for
such a system, and of converting it into a
form suitable for the system.
Knowledge engineering involves selecting the
correct predicates, functions and constants to
represent knowledge appropriately.
29
Case-Based Reasoning


A case-based system stores solutions to
problems, along with information about
whether these solutions worked or not.
When presented with a new solution, a
case-based system identifies similar
problems it has solved in the past, and
uses their solutions to devise a solution
for the new problem.
30