Knowledge Representation Artificial Intelligence Lecture 5 Karim Bouzoubaa
Intelligence - K ¢ Every intellectual cognitive activity is definitely based on K ¢ Knowledge is power ¢ "The power of AI systems resides in the knowledge"
Connaissance Learning Planification & Problem Resolution NLP Knowledge Memory Nature & Types of K Reasoning
Nature &Types of K ¢ Human beings accumulate billions of 'chunk' of knowledge, connected together and combined in different ways l Knowledge about the world l Knowledge of specific areas l Knowledge about the human
General AI Model Other entities Environment Perception Communication Acts Learn Reason General and Actions Planning Specific Knowledge Actions Communication Acts
Human Intelligence: a characteristic of the whole ¢ Everything is intimately linked: l The basic trio: Knowledge, Reasoning, Memory (where knowledge is stored) l Overlapping cognitive processes, exploiting the basic trio: Learning, Planning & NLP l The means of perception (the input / output channels)
Operations on K ¢ At the basic level: use of operations to compare and manipulate knowledge: l Join two knowledge chunks l Find knowledge common to two knowledge chunks l Check if knowledge is contained in another l etc.
Reasonings ¢ Inferring knowledge from other knowledge. Take into account : l Types of inference (deduction, induction, abduction, analogy, etc.) l Degree of certainty (knowledge) of knowledge => approximate reasoning l The temporal character of all knowledge
Knowledge representation Major problem in AI ¢ The human being is intelligent because it is a 'machine' which consumes and generates continually knowledge ¢ Important question for AI: how to represent knowledge? ¢ The mode of representation has an impact on any process that manipulates the knowledge
Knowledge representation The Declarative / Procedural Dilemma ¢ Procedural representation: compact but difficult to present, extend, exploit, etc. ¢ Declarative representation: Independent description of use, easy to extend and modify
What is a good representation? ¢ A good system for the representation of complex K. structures in a particular domain should possess the properties (Rich 1983): l Representational Adequacy: the ability to represent all the kinds of K. that are needed in that domain l Inferential Adequacy: the ability to manipulate the representational structures in such a way as to derive new structures corresponding to new K. inferred from old one l Acquisitional Efficiency: the ability to acquire new information easily. The most simplest case involves direct insertion, by a person, of new K. in the KB
What is a representation? ¢ A representation is a set of syntactic and semantic conventions that make it possible to describe things ¢ The syntax of a representation specifies the symbols that may be used and the ways those symbols may be arranged ¢ The semantics of a representation specifies how meaning is embodied in the symbols and in the symbols arrangements allowed by the syntax
Formalisms to represent knowledge ¢ Propositional logic ¢ Predicate logic ¢ Frames ¢ Semantic network ¢ Conceptual Graph ¢ etc.
Propositional logic ¢ We need a formal notation to represent knowledge l Allowing automated inference and problem solving ¢ One popular choice is to use logic ¢ Proposition logic is the simplest form of logic l Symbols represent facts/propositions: p, q, etc. l We evaluate the truth value of a proposition l We don’t evaluate the meaning
Propositional logic ¢ Simple propositions l Example: earth is flat ¢ Composed propositions l Example: earth is flat and earth is a planet ¢ Simple propositions are joined by logical connectives (and, or, negation, implication) l P ∧ Q; P ∨ Q ; Q → R, ¬ S ¢ Given some statements in the logic we can deduce new facts
Propositional logic – Rules of Inference ¢ To derive true formulas from other true formulas, rules of inference are needed ¢ In a sound theory, the rules of inference preserve truth ¢ If all formulas in the starting set are true, only true formulas can be inferred from them. ¢ Some of the rules of inference for the propositional calculus are as follows: l Let symbols p, q and r represent any formula : Modus Ponens: From p and p → q , derive q Modus Tollens: From ¬ q and p → q , derive ¬ p Hypothetical Syllogism: From p → q and q → r , derive p → r Disjunctive Syllogism: From p ∨ q and ¬ p , derive q Conjunction: From p and q , derive p ∧ q
Limits of Propositional Logic ¢ Meaning in propositional logic is context- independent l unlike natural language, where meaning depends on context ¢ Limits of Propositional logic l Propositional logic is not powerful enough as a general knowledge representation language l Impossible to make general statements l Example: • all students take exams • if any student take an exam, s/he either passes or fails
Propositional Logic - Exercises ¢ Demonstrate that p → q is equivalent to ¬ (p ∧ ¬ q) l We have the succession of equivalences l p → q ⇔ ¬ p ∨ q (implication elimination) l ¬ p ∨ q ⇔ ¬ p ∨ ¬ ¬ q l ¬ p ∨ ¬ ¬ q ⇔ ¬ (p ∧ ¬ q) (De Morgan)
Formalisms to represent knowledge ¢ Propositional logic ¢ Predicate logic ¢ Frames ¢ Semantic network ¢ Conceptual Graph ¢ etc.
Predicate Logic ¢ Whereas propositional logic assumes the world contains facts, first- order logic (like natural language) assumes the world contains l Objects: people, houses, numbers, colors, wars, etc. l Relations: red, round, prime, brother of, part of, etc. ¢ In predicate logic the basic unit is a predicate/argument structure called an atomic sentence: l likes(ali, chocolate) l tall(zakaria) ¢ Arguments can be any of: l constant symbol, such as ‘ ali ’ l variable symbol, such as X l A function, such as sqrt(n) ¢ Examples: l Likes(X, chocolate) l Friends(zakaria, youssef)
Predicate Logic ¢ These atomic sentences can be combined using logic connectives l likes(ali,chocolate) ∧ tall(zakaria) l tall(zakaria) → play(zakaria, basket-ball) ¢ Sentences can also be formed using quantifiers ∀ (for all) and ∃ (there exists) to indicate how to treat variables: l ∀ X (mortal(X)) Everything is mortal l ∃ X (mortal(X)) Something is mortal l ∀ X (on(X,earth) → mortal(X)) Everything on earth is mortal ¢ We can have several quantifiers in an expression, such as: l ∀ X ∃ Y ( father(X, Y) ) l ∀ X ( expensive(X) → ∃ Y ( wants(Y, X) ) ) ¢ Here are identities common in predicate calculus: l ∃ X (P(X)) is identical to ¬ ∀ x ( ¬ P(X)) l ∀ x (P(X)) is identical to ¬ ∃ x ( ¬ P(X))
Predicate Logic ¢ We can define inference rules allowing us to say that if certain things are true, certain other things are sure to be true, e.g. ∀ X (P(X) → Q(X)) P(aa) ----------------- (so we can conclude) Q(aa ) ¢ This involves matching P(X) against P(aa) and binding the variable X to the symbol aa ∀ x (Chinois(x) → Pere(Mao, x)) ∧ Chinois(Ching) → ¢ Pere(Mao, Ching) ¢ Example: What can we conclude from the following? ∀ X Tall(X) → Strong(X) Tall(john) ∀ X Strong(X) → play(X, Boxe)
Logique des Prédicats Predicate Logic - Exercises ¢ Represent in terms of predicates: l Ahmed gives Ali a book l Somebody gives a book to Ali l Jacques envoie un livre à Marie l Chaque homme se promène l Certains hommes se promènent l Aucun homme ne se promène l Jacques envoie quelque chose à chacun l gives (Ahmed, Ali, book33) l or ∃ x (gives(Ahmed, Ali, x) ∧ Book(x) ) l ∃ y ∃ x (Gives(y, Ali, x) ∧ Person(y) ∧ Book(x) ) l Envoi(jacque1, Marie4, Livre2) l ∀ x (Homme(x) → Promener(x)) l ∃ x (Homme(x) → Promener(x)) l ¬ ( ∃ x (Homme(x) → Promener(x))) l ∃ y ∀ x (Envoi(jacque1, x, y))
Predicate Logic - Exercises ¢ Propose a definition for GrandParentOf(x,y) ¢ Propose a definition for Ancestor(x,y,n) l using Person(X), ParentOf(X,Y) GrandParentOf(x,y) ← Person(x) ∧ Person(y) ∧ ∃ z ( Person(z) ∧ ParentOf(x,z) ∧ ParentOf(z,y) ) Ancestor(x,y,n) ← Person (x) ∧ Person (y) ∧ ∃ z(Person(z) ∧ ParentOf(z,y) ∧ Ancestor(x,z,n-1) ) Ancestor(x,y,1) ← Person (x) ∧ Person (y) ∧ ParentOf(x,y)
Formalisms to represent knowledge ¢ Propositional logic ¢ Predicate logic ¢ Frames ¢ Semantic network ¢ Conceptual Graph ¢ etc.
Frames ¢ Family of object-oriented languages ¢ Advantages of object-oriented languages: l Data abstraction l Modularity / Modifiability l reusability l Readability / Understanding l Heritage ¢ Language of frames: OO + procedural attachment ¢ Frames are prototypes for specifying K that are poorly described in predicate calculus: typicality, default values, incomplete information.
Recommend
More recommend