knowledge representation
DESCRIPTION
Knowledge representation. Plan. Knowledge representation and reasoning Logics Rules Frames Knowledge representation in logics First order logic Description logics Non-monotonic logics. Adam Mickiewicz. What we say and what we think. - PowerPoint PPT PresentationTRANSCRIPT
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
1/1
Knowledge representation
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
2
Plan
• Knowledge representation and reasoning– Logics– Rules– Frames
• Knowledge representation in logics– First order logic– Description logics– Non-monotonic logics
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
3
What we say and what we think
Time flies like an arrow but fruit flies like a banana.
Adam Mickiewicz
Chodzi mi o to aby język giętki powiedział wszystko co pomyśli głowa
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
4
What we say and what we think
I wish my tongue could express everything that my head can imagine
Adam Mickiewicz
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
5
General goal of knowledge representation
develop formalisms for providing high-level descriptions of the world
that can be effectively used to build intelligent applications
• formalisms – formal syntax + formal and unambiguous semantics
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
6
General goal of knowledge representation
develop formalisms for providing high-level descriptions of the world
that can be effectively used to build intelligent applications
• formalisms – formal syntax + formal and unambiguous semantics
• high level descriptions – which aspects should be represented and which left out
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
7
General goal of knowledge representation
develop formalisms for providing high-level descriptions of the world
that can be effectively used to build intelligent applications
• formalisms – formal syntax + formal and unambiguous semantics
• high level descriptions – which aspects should be represented and which left out
• intelligent applications – are able to infere new knowledge from given knowledge
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
8
General goal of knowledge representation
develop formalisms for providing high-level descriptions of the world
that can be effectively used to build intelligent applications
• formalisms – formal syntax + formal and unambiguous semantics
• high level descriptions – which aspects should be represented and which left out
• intelligent applications – are able to infere new knowledge from given knowledge
• effectively used – reasoning techniques should allow „usable” implementation
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
9
Mapping between facts and representation
FACTS INTERNAL REPRESENTATION
REASONING PROGRAMS
NATURAL LANGUAGE REPRESENTATION
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
10
Mapping between facts and representation
INITIAL FACTS FINAL FACTSrequired real reasoning
INTERNAL REPRESENTATION OF INITIAL FACTS
INTERNAL REPRESENTATION OF FINAL FACTS
program operation
foreward representation
mapping
backward representation
mapping
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
11
Spot
hastail(spot)
kanguro(X) => hastail(X)
kanguro(spot) X/spot
Modus ponens
Spot has a tail
Every kanguro has a tail.
Spot is a kanguro.
FACTS REPRESENTATION INFERENCE
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
12
Ambiguity of the mapping
All kanguros have tails.
Every kanguro has a tail.
Every kanguro has exactly one tail.
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
13
Representation and effectiveness of reasoning
White squares: 32
Black squares: 30
... .
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
14
Knowledge representation techniques
Relations between objects (databases) – weak inferencial capabilities.
Student File number Score Course
Abacki 123456 4.0 Mathematics
Babacki 123457 3.5 Management
Cabacki 123567 3.0 Management
Dabacki 123444 4.5 Physics
.................................................................................................................
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
15
Knowledge representation techniques
Inheritance– - corresponds to a set of attributes and associated values that together describe objects of the knowledge base.
student (age, sex, course, file number, average score)
person(age, sex)
student_passing_exam (age, sex, course, file number, average score, score)
Abacki (age, sex, course, file number, average score, score)
ISA
ISA
INSTANCE
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
16
Universal attributes
ISA
ISPART
INSTANCE
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
17
Knowledge representation techniques
Inferential knowledge – knowledge about mechanisms that can be used to infere new knowledge from the knowledge base.Examples: deduction, resolution, ...
Y)failed(X,3Y) score(X, course(Y)student(X) :YX,
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
18
Knowledge representation techniques
Procedural knowledge – „what to do when”
= b2 - 4ac
x1 = (-b - sqrt())/2
x2 = (-b + sqrt())/2
ax2 + bx + c = 0
delta := b*b – 4*a*c
if delta>0 then
begin
X[1] := (-b - sqrt(delta))/2
X[2] := (-b + sqrt(delta))/2
end
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
19
Classification of knowledge representation systems
• Logics• Predicate logic• Description logics• Nonmonotonic logics
• Procedural schemas• Production rules
• Structural schemas• Weak slot-and-filler structures
• Semantic networks• Frames
• Strong slot-and-filler structures• Conceptual dependencies• Stereotypes• Scripts
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
20
What’s wrong with predicate logic?
• It is undecidable • Reasoning is based only on syntax• Complexity: determining whether a set of
statements is satisfiable is NP-complete• Monotonicity: after adding a new fact we
can still inferre the same conclusions as from the „smaller” set
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
21
Production rules
Research conducted in psychology showed that people formulate complex knowledge in the form of production rules
IF A THEN B
IF the car does not start, THEN...
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
22
call the assistance center.
Production rules
Research conducted in psychology showed that people formulate complex knowledge in the form of production rules
IF A THEN B
IF the car does not start, THEN...
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
23
Production rules
Procedural rules:
IF situation THEN action
Eg: If you are hungry then eat something.
Declarative rules:
IF antecendent THEN consequent
Eg: If X is an elephant, then X is a mammal.
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
24
Inference mechanism
Expert system architecture
agenda
Knowledge base
Working memory
Explanation mechanism
Knowledge acquisition mechanism
User interface
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
25
Inference mechanism
Reasoning with rules
agenda
Knowledge base
1. ba ab 2. ca ac3. cb bc
Working memory
c b a c
Explanation mechanism
Knowledge acquisition mechanism
User interface
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
26
Inference mechanism
Reasoning with rules
agenda
Knowledge base
1. ba ab 2. ca ac3. cb bc
Working memory
c b a c
Explanation mechanism
Knowledge acquisition mechanism
User interface
3
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
27
Inference mechanism
Reasoning with rules
agenda
Knowledge base
1. ba ab 2. ca ac3. cb bc
Working memory
c b a c
Explanation mechanism
Knowledge acquisition mechanism
User interface
3, 1
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
28
Inference mechanism
Reasoning with rules
agenda
Knowledge base
1. ba ab 2. ca ac3. cb bc
Working memory
c a b c
Explanation mechanism
Knowledge acquisition mechanism
User interface
2
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
29
Inference mechanism
Reasoning with rules
agenda
Knowledge base
1. ba ab 2. ca ac3. cb bc
Working memory
a c b c
Explanation mechanism
Knowledge acquisition mechanism
User interface
3
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
30
Inference mechanism
Reasoning with rules
agenda
Knowledge base
1. ba ab 2. ca ac3. cb bc
Working memory
a b c c
Explanation mechanism
Knowledge acquisition mechanism
User interface
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
31
Reasoning algorithm (situation-action)
while not stop Conflict resolution:
Action:
Matching:
Stop condition:end while
select the rule with the highest priority
perform consecutively actions from the right hand side of the rule
update the agenda adding rules with left hand side in the working memory
If the stop condition is true then stop
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
32
Description logics
DL focus: representation of terminological logic or conceptual logic
• formalize the basic terminology of the modelled domain
• store it in an ontology / terminology / TBox for reasoning
• enable reasoning on that knowledge
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
33
Description logics
Core part of any DL: concept language
• Concept names assign a name to groups of objects
• Role names assign a name to relations between objects
• Constructors allow to relate concept names and role names
Person enrolled_at.University attends.UnderGradCourse
Different sets of constructors give rise to different concept languages
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
34
The description logic ALC
Concept names – (unary predicates, classes)
Example:
Student
{x | Student(x)}
Married
{x | Married(x)}
Role names – (binary predicates, relations)
Example:
FRIEND
{<x; y> | FRIEND(x; y)}
LOVES
{<x; y> | LOVES(x; y)}
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
35
The description logic ALCConstructors
C negation
C D conjunction
C D disjunction
R.C existencial restriction
R.C value restriction
Abbreviations
C D = C D implication
C D = C D D C bi-implication
T top concept
bottom concept
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
36
Examples
Person Female
Person attends.Course
Person attends.(Course Easy)
Person teaches.(Course attended_by.(Bored Sleeping))
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
37
Interpretations
Semantics based on interpretations (I, I)
I - is non-epmty set (the domain)
I – is the interpretation function mapping each concept
name A to a subset AI of I and each role name R to a binary relation RI over I.
Intuition: interpretation is a complete description of the world.
Technically: interpretation is a first order structure with only unary and binary predicates.
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
38
Semantics of complex concepts
(C)I = I \ CI
(C D)I = CI DI
(C D)I = CI DI
(R.C)I = {d | there is e I with (d,e) RI and e CI}
(R.C)I = {d | for all e I, (d,e) RI implies e CI}
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
39
Example
Person attends.Course
Person attends.(Course Difficult)
StudentPerson
CoursePerson Lecturer
teaches
StudentSleepingPerson
CourseDifficult
attendsattends attends
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
40
TBoxes
TBoxes are used to store concept definitions
Syntax
Finite set of concept equations A = Cwhere A – concept name and C – left hand side must be unique!
Semantics
Interpretation I satisfies A = C iff AI = CI
I is a model of T if it satisfies all definitions in T
Two kinds of concepts: defined and primitive.
Lecturer = Person teaches.Course
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
41
TBoxes
StudentPerson
CoursePerson Lecturer
teaches
StudentSleepingPerson
CourseDifficult
attendsattends attends
Tbox restricts the set of admissible interpretations.
Lecturer = Person teaches.Course
Student = Person attends.Course
Student
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
42
Lecturer attends.Course T Student
Reasoning task: sumsumption
C is subsumed by D with respect to T
Iff
CI DI holds for all models I of T
C T D
C T D
Intuition
If then D is more general than C.
Lecturer = Person teaches.Course
Student = Person attends.Course
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
43
PhDStudent = teaches.Course Student
Reasoning task: classification
Arrange all defined objects from TBox in a hierarchy with respect to generality.
Lecturer = Person teaches.CourseStudent = Person attends.Course
Student
Person
Lecturer
PhDStudent
Can be computed using multiple subsumption tests.
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
44
Then sibling.Woman sibling.Man Is unsatisfiable w.r.t. T.
Reasoning task: satisfiability
C is satisfiable w.r.t. T iff T has a model with CI .
Woman = Person FemaleMan = Person Female
Subsumption can be reduced to (un)satisfiability and vice versa.
Intuition: If unsatisfiable the concept contains a contradiction.
iff C D is not satisfiable w.r.t. TC T D
C T C is satisfiable w.r.t. T iff not
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
45
Description logics are more than concept language
Knowledge base
TBoxterminological knowledgebackground knowledge
ABoxknowledge about individuals
Use concept
language
DL Reasoner
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
46
Definitorial TBoxes
A primitive interpretation for TBox T interprets
• the primitive concept names
• all role names
A TBox is called definitorial if every primitive interpretation for T can be uniquely extended to a model of T.
i.e. primitive concepts (and roles) uniquely determine defined concepts.
Not all TBoxes are definitorial Person = parent.Person
Non-definitorial TBoxes describe constraints, e.g. from background knowledge.
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
47
Acyclic TBoxes
TBox is acyclic if there are no definitorial cycles.
Lecturer = Person teaches.Course
Course = hastitle.Title tought-by.Lecturer
Expansion of acyclic TBox T
exhaustively replace defined concept name with their definition (terminates due to acyclicity)
Acyclic TBoxes are always definitorial
first expand then set AI := CI for all A = C T
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
48
Acyclic TBoxes II
For reasoning acyclic TBoxes can be eliminated
• to decide with T acyclic• expand T• replace defined concept names in C, D with their
definition• decide
• analogously for satisfiability
C T D
C D
May yield an exponential blow-up.
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
49
ABoxes
An ABox is a finite set of assertions
a : C (a – individual name, C – concept)
(a,b) : R (a, b – individual names, R – role name)
E.g. {peter : Student, (ai-course, joanna) : tought-by}
Interpretations I map each individual name a to an element of I.
I satisfies an assertion
a : C iff aI CI
(a,b) : R iff (aI,bI ) RI
I is a model for an Abox A if I satisfies all assertions in A.
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
50
ABoxes
• Interpretations describe the state of the world in a complete way
• ABoxes describe the state of the world in an incomplete way
• An ABox has many models
• An ABox constraints the set of admissible models similar to a TBox
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
51
Reasoning with ABoxes
Given an ABox A and a TBox T do they have a common model?
ABox consistency
Given an ABox A, a TBox T , an individual name a, and a concept C does aI CI hold in all models of A and T ?
Instance checking
A, T = a : C
The two tasks are interreducible:
• A consistent w.r.t T iff A, T |= a :
• A, T = a : C iff A {a : C} is not consistent
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
52
Example
ABox
TBox
dumbo : Mammalt14 : Trunk(dumbo, t14) : bodypartg23 : Darkgrey(dumbo, g23) : color
Elephant = Mammal bodypart.Trunk color.GreyGrey = Lightgrey Darkgrey = Lightgrey Darkgrey
• ABox is inconsistent w.r.t. TBox.
• dumbo is an instance of Elephant.
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
53
Questions?
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
54
Semantic networks
W sieciach semantycznych informacja jest reprezentowana jako zbiór węzłów połączonych etykietowanymi łukami, które reprezentują relacje między węzłami.
Przeszukiwanie przekrojowe
Reprezentacja predykatów niebinarnych
Rozróżnienia
Podzielone sieci semantyczne
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
55
Sieć semantyczna z atrybutami o wielu argumentach
wynik(Lech, Legia, 3-0)
mecz
G23Legia
Lech
3-0
isawynikgoście
gospodarze
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
56
Sieci semantyczne
Pies ugryzł listonosza.
p g l
gryźćpies listonosz
isa isa isa
ofiaranapastnik
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
57
Sieci semantyczne
p g l
gryźćpies listonosz
isa isa isa
ofiaranapastnik
Każdy pies ugryzł (jakiegoś) listonosza.
sGSisa forma
SA
SI
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
58
Sieci semantyczne
p g l
gryźćpies listonosz
isa isa isa
ofiaranapastnik
Każdy pies ugryzł tego listonosza.
sGSisa
form
a
SA
SI
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
59
Sieci semantyczne
p g l
gryźćpies listonosz
isa isa isa
ofiaranapastnik
Każdy pies ugryzł każdego listonosza.
sGSisa forma
SA
SI
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
60
Ramy
Rama jest zbiorem atrybutów (zwykle nazywanych szczelinami) i związanych z nimi wartości (ewentualnie ograniczeniami nałożonymi na wartości) opisującym pewien obiekt. [Minsky, 1975]
Cechy mechanizmu wnioskującego:
• Sprawdzanie spójności podczas dodawania wartości szczeliny
• Utrzymywanie spójności między wartościami wzajemnie odwrotnymi
• Dziedziczenie wartości definiowanych i domyślnych zgodnie z relacjami isa i instance
• Obliczanie wartości if-needed
• Sprawdzanie wartości atrybutów jednowartościowych
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
61
Ramy - przykład
Osoba Prawaręka
Mężczyzna
isa
5-10wzrost
Zawodnik grający w baseball
isa6-10
0.252
wzrost
średni wynik
rzutyDowolna
lub Prawa
Pitcher Fielder 0.262średni wynikśredni wynik
0.252
Three-Finger-Brown
Pee-Wee-Reese
isaisa
BrooklynDodgers
drużynaChicago
Cubs
drużyna
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
62
Zależności pojęciowe*) (CD)
Zależności pojęciowe (conceptual dependency) stanowią koncepcję reprezentacji tego rodzaju wiedzy, która jest zwykle wyrażana w zdaniach języka naturalnego.Celem jest reprezentacja wiedzy w taki sposób, aby:
• ułatwiała wyprowadzanie konkluzji ze zdań,
• była niezależna od języka, w którym wypowiedziano zdanie.
_____________________
*) Schank (1973, 1975)
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
63
Zależności pojęciowe Elementarne kategorie
ACTs Czynności
PPs Obiekty (producenci obrazów)
AAs Modyfikatory czynności (opisy czynności)
PAs Modyfikatory obiektów (opisy obrazów)
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
64
Zależności pojęciowe Elementarne czynności
ATRANS Przekazanie abstrakcyjnej relacji (dać).
PTRANS Zmiana fizycznej lokalizacji obiektu (iść).
PROPEL Przyłożenie siły do obiektu (pchnąć).
MOVE Wykonanie Ruchu częścią ciała (kopnąć).
GRASP Ujęcie obiektu przez aktora (chwycić).
INGEST Wchłonięcie obiektu (łykać).
EXPEL Wydalenie czegoś z wewnątrz (płakać).
MTRANS Przekazanie informacji (powiedzieć).
MBUILD Utworzenie informacji (decydować).
SPEAK Wydawanie dźwięków (mówić).
ATTEND Skupienie uwagi (słuchać).
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
65
Zależności pojęciowe Formy czasowników
p czas przeszły f czas przyszły t zmiana ts początek zmiany
tf zakończenie zmiany k ciągłość ? pytanie / negacja nil czas teraźniejszy delta nieskończony c warunkowy
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
66
Zależności pojęcioweReguły
1. PP ACT Tomek czyta.
2. PP PA Tomek jest wysoki.
3. PA PP wesołe dziecko
4. PP PP książka Tomka
PP
5. ACT Tomek daje książkę Gosi.
PP
R
Strzałka zawsze wskazuje podmiot.
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
67
Zależności pojęciowePrzykład
Jaś dał książkę Marysi.
Jaśp
ATRANS
o
książka
R
Marysia
Jaś
<
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
68
Scenariusze
Warunki wejściowe Rezultaty Rekwizyty Role Ścieżki Sceny
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
69
Główne niedostatki popularnych schematów reprezentacji wiedzy
Rachunek zdań modeluje tylko wartości logiczne, a nie fakty
Rachunek predykatów trudne sterowanie wnioskowaniem
Reguły produkcji trudne zastosowanie do wiedzy nieproceduralnej
Relacyjne bazy danych trudne sterowanie wnioskowaniem
Hierarchia pojęć ograniczone do jednej relacji
Sieci semantyczne brak standardu
Ramy jest to jedynie metoda, a nie schemat
Ograniczenia brak standardu
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
70
Podsumowanie
• Forma reprezentacji wiedzy jest odpowiednikiem struktur danych
• Reprezentacja musi zapewniać zdolność i efektywność wnioskowania
• Wybór formy reprezentacji wiedzy zależy od dziedziny wnioskowania
• Wybór formy reprezentacji wiedzy wpływa na efektywność wnioskowania
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
71
Zalety reprezentacji deklaratywnej
• każdy fakt wymaga tylko jednokrotnego przechowywania w pamięci, niezależnie od tego, ile razy będzie wykorzystany
• łatwo dodawać nowe fakty do systemu bez zmiany innych faktów
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
72
Zalety reprezentacji proceduralnej
• łatwo reprezentować wiedzę o tym jak coś zrobić
• łatwo reprezentować wiedzę, która nie pasuje do schematów deklaratywnych
• łatwo reprezentować wiedzę heurystyczną, jak wykonać coś efektywnie
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
73
Relacje między atrybutami
Odwrotność
Hierarchia atrybutów
Techniki wnioskowania o wartościach
typ wartości
zakres wartości
reguły obliczania wartości (if needed rules)
reguły postępowania dla konkretnych wartości (if added rules)
Atrybuty jednowartościowe
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
74
Reprezentacja zbiorów obiektów
rozróżnienie wg nazwy
definicja ekstencjonalna
{Ziemia}
definicja intencjonalna
{X:sun-planet and human-inhabited(X)}
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
75
Granulacja (poziom) reprezentacji
Jest to zagadnienie wyboru obiektów, które będziemy traktować jako elementarne w rozważanej reprezentacji.
{matka, ojciec, syn, córka, brat, siostra}
{rodzic, dziecko, rodzeństwo, mężczyzna, kobieta}
Kasia = kobieta i dziecko(rodzeństwo (rodzic(Zosia)))
?Kasia jest kuzynką Zosi.
Kasia = córka(brat(matka(Zosia)))Kasia = córka(brat(ojciec(Zosia)))Kasia = córka(siostra(matka(Zosia)))Kasia = córka(siostra (ojciec(Zosia)))
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
76
Granulacja (poziom) reprezentacji
Mała liczba obiektów elementarnych powoduje:
• kanoniczność reguł
• łatwość poszukiwania struktury
• małą zajętość pamięci
• dużą pracochłonność transformacji z poziomu wyższego na niższy
Np. analiza tekstu na poziomie liter, słów, zdań, ....
Dr hab. inż. Joanna Józefowska, prof. PP
To
pic
s in
art
ific
ial i
nte
llig
en
ce
77
Granulacja (poziom) reprezentacji
Duża liczba obiektów elementarnych powoduje:
• dużą pracochłonność poszukiwania struktury
• dużą zajętość pamięci
• trudno zadecydować, które obiekty powinny mieć charakter elementarny
Np. relacje rodzinne