23
Knowledge representation methods وم س ه س ل ج

Knowledge representation methods جلسه سوم. KR is AI bottleneck The most important ingredient in any expert system is knowledge. The power of expert systems

Embed Size (px)

Citation preview

Page 1: Knowledge representation methods جلسه سوم. KR is AI bottleneck The most important ingredient in any expert system is knowledge. The power of expert systems

Knowledge representation methods

سوم جلسه

Page 2: Knowledge representation methods جلسه سوم. KR is AI bottleneck The most important ingredient in any expert system is knowledge. The power of expert systems

KR is AI bottleneckThe most important ingredient in any expert system is knowledge. The power of expert systems resides in the specific, high-quality knowledge they contain about task domains. AI researchers will continue to explore and add to the current repertoire of knowledge representation and reasoning methods. But in knowledge resides the power. Because of the importance of knowledge in expert systems and because the current knowledge acquisition method is slow and tedious, much of the future of expert systems depends on breaking the knowledge acquisition bottleneck and in codifying and representing a large knowledge infrastructure.

Page 3: Knowledge representation methods جلسه سوم. KR is AI bottleneck The most important ingredient in any expert system is knowledge. The power of expert systems

Overview of knowledge representation

• Production rules• Semantic networks/web-ontologies• Frames• Propositional logic• Predicate logic• Probability (next meeting)

Page 4: Knowledge representation methods جلسه سوم. KR is AI bottleneck The most important ingredient in any expert system is knowledge. The power of expert systems

Production rules• Production rules are in the form of condition-action pairs:• “IF this condition(or premises or antecedent) occurs, THEN some action

(or result, or conclusion, or consequence) will (or should) occur.”• Ideally, each production rule implements an autonomous chunk of

expertise that can be developed and modified independently of other rules

• Production systems are composed of– production rules– working memory, and– a control

• Rules can be used as descriptive tools for problem-solving heuristics,• replacing a more formal analysis of the problem

– incomplete but useful guides to make search decisions• Rules can be viewed as simulation of the cognitive behavior of human

experts

Page 5: Knowledge representation methods جلسه سوم. KR is AI bottleneck The most important ingredient in any expert system is knowledge. The power of expert systems

Advantages and limitations of rulesAdvantages• Rules are easy to understand• Inference and explanations are easily derived• Modifications and maintenance are relatively easy• Uncertainty is easily combined with rules• Each rule is usually independent of all othersLimitations• Complex knowledge requires many, many rules: creating problems in• using and maintaining the systems• Builders likes rules: preventing the choices of more appropriate• representation• Systems with many rules may have a search limitation in the control• program: difficulty in evaluating rule-based systems and making• inferences

Page 6: Knowledge representation methods جلسه سوم. KR is AI bottleneck The most important ingredient in any expert system is knowledge. The power of expert systems

semantic network

• A semantic network is a graphic notation for representing knowledge in patterns ofinterconnected nodes and arcs. It is one way for knowledge visualization and presentation.

• What is common to all semantic networks is a declarative graphic representation that can be used either to represent knowledge or to support automated systems for reasoning about knowledge.

Page 7: Knowledge representation methods جلسه سوم. KR is AI bottleneck The most important ingredient in any expert system is knowledge. The power of expert systems

Semantic networks/web• Nodes represent objects and descriptive information about those

objects– Objects can be any physical item such as a book, car, desk, a person, and

etc.– Nodes can also be concepts, events, or actions, Netwon’s law, election,

building house, and etc.– Attributes of an object can also be used as nodes, e.g. color, size, class, age,

and etc.• Links show the relationship between various objects and descriptive

factors– Common links are of “IS-A”, “HAS-A”, “A-KIND-OF”, etc.

• Inheritance is a useful feature of semantic network– Various characteristics of some nodes can inherit the characteristics of

others

Page 8: Knowledge representation methods جلسه سوم. KR is AI bottleneck The most important ingredient in any expert system is knowledge. The power of expert systems

Semantic network example

Page 9: Knowledge representation methods جلسه سوم. KR is AI bottleneck The most important ingredient in any expert system is knowledge. The power of expert systems

Object, Attributes, and Values

• Objects, attributes, and values, the O-A-V triplet

• O-A-V can be used as a common way to represent knowledge

• The O-A-V triplet can be used to characterize all the knowledge in a semantic net.

DBPediaمثال •

Page 10: Knowledge representation methods جلسه سوم. KR is AI bottleneck The most important ingredient in any expert system is knowledge. The power of expert systems

Advantages and limitationsAdvantages• Flexibility in adding new nodes and links• The visualization is easy to understand• Inheritance• Similarity to that of human information storage• Ability to reason and create definition statements between nonlinked• nodes• XML/RDF standards for definition of nodes and relationshipsLimitations• Inheritance has difficulty with exceptions• The perception of the situation can place relevant facts at• inappropriate points• Procedural knowledge is difficult to represent

Page 11: Knowledge representation methods جلسه سوم. KR is AI bottleneck The most important ingredient in any expert system is knowledge. The power of expert systems

Frames

• A frame is a data structure that includes all the knowledge about a particular object (an application OOP to expert systems)

• A frame groups values that describe one object

• The knowledge is partitioned into slots• A slot can describe declarative and procedural

knowledge

Page 12: Knowledge representation methods جلسه سوم. KR is AI bottleneck The most important ingredient in any expert system is knowledge. The power of expert systems

A car frame

Page 13: Knowledge representation methods جلسه سوم. KR is AI bottleneck The most important ingredient in any expert system is knowledge. The power of expert systems

Propositional logic

• a formal way for representing complex statements that can be true or false

• Propositional logic is the simplest logic• propositions is a statement that may be true

or false• We use letters to show propositions

Page 14: Knowledge representation methods جلسه سوم. KR is AI bottleneck The most important ingredient in any expert system is knowledge. The power of expert systems

logical connective

The proposition symbols P1, P2 etc are sentences

Page 15: Knowledge representation methods جلسه سوم. KR is AI bottleneck The most important ingredient in any expert system is knowledge. The power of expert systems
Page 16: Knowledge representation methods جلسه سوم. KR is AI bottleneck The most important ingredient in any expert system is knowledge. The power of expert systems

Wumpus world sentences

Page 17: Knowledge representation methods جلسه سوم. KR is AI bottleneck The most important ingredient in any expert system is knowledge. The power of expert systems

Pros and cons of propositional logic

Propositional logic is declarative Propositional logic allows partial/disjunctive/negated

information– (unlike most data structures and databases)

Propositional logic is compositional: meaning of B1,1 P1,2 is derived from meaning of B1,1 and of P1,2

Meaning in propositional logic is context-independent (unlike natural language, where meaning depends on context) Propositional logic has very limited expressive power

– (unlike natural language)– E.g., cannot say "pits cause breezes in adjacent squares“

• except by writing one sentence for each square

Page 18: Knowledge representation methods جلسه سوم. KR is AI bottleneck The most important ingredient in any expert system is knowledge. The power of expert systems

Beyond Propositional logic

• Propositional logic not expressive enough – In Wumpus world we needed to explicitly write every case of

Breeze & Pit relation – Facts = propositions – “All squares next to pits are breezy”

• “Regular” programming languages mix facts (data) and procedures (algorithms) – World[2,2]=Pit – Cannot deduce/compose facts automatically – Declarative vs. Procedural

Page 19: Knowledge representation methods جلسه سوم. KR is AI bottleneck The most important ingredient in any expert system is knowledge. The power of expert systems

First-Order Logic• Propositional logic has very limited expressive power (unlike natural

language) E.g., cannot say “pits cause breezes in adjacent squares” except by writing one sentence for each square

• Whereas propositional logic assumes world contains facts, first-order logic (like natural language) assumes the world contains– Objects: people, houses, numbers, theories, Ronald McDonald, colors,

baseball games, wars, centuries. . .– Relations: red, round, bogus, prime, multistoried . . ., brother of, bigger

than, inside, part of, has color, occurred after, owns, comes between,. . .– Functions: father of, best friend, third inning of, one more than, end of

– Connectives:, , , , – Quantifiers: , – Universal: x : (Man(x) ) Mortal(x) )

– Existential: y : (Father(y, fred) )

Page 20: Knowledge representation methods جلسه سوم. KR is AI bottleneck The most important ingredient in any expert system is knowledge. The power of expert systems

Syntax of FOL: Basic elements

• Constants KingJohn, 2, NUS,... • Predicates Brother, >,...• Functions Sqrt, LeftLegOf,...• Variables x, y, a, b,...• Connectives , , , , • Equality = • Quantifiers ,

Page 21: Knowledge representation methods جلسه سوم. KR is AI bottleneck The most important ingredient in any expert system is knowledge. The power of expert systems

Truth in first-order logic• Sentences are true with respect to a model and an interpretation

• Model contains objects (domain elements) and relations among them

• Interpretation specifies referents for• constant symbols → objects

predicate symbols → relations

function symbols → functional relations

• An atomic sentence predicate(term1,...,termn) is trueiff the objects referred to by term1,...,termn

are in the relation referred to by predicate

Page 22: Knowledge representation methods جلسه سوم. KR is AI bottleneck The most important ingredient in any expert system is knowledge. The power of expert systems

Syntax of FOL: Basic elements

Page 23: Knowledge representation methods جلسه سوم. KR is AI bottleneck The most important ingredient in any expert system is knowledge. The power of expert systems

Wumpus world sentences in FOL