Knowledge Representation

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

1 Knowledge Representation Introduction KR and Logic.
Logic Use mathematical deduction to derive new knowledge.
Agents That Reason Logically Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2004.
Propositional Logic CMSC 471 Chapter , 7.7 and Chuck Dyer
Logic.
Knowledge Representation I Suppose I tell you the following... The Duck-Bill Platypus and the Echidna are the only two mammals that lay eggs. Only birds.
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
Logical Agents Chapter 7. Why Do We Need Logic? Problem-solving agents were very inflexible: hard code every possible state. Search is almost always exponential.
Knowledge Representation & Reasoning (Part 1) Propositional Logic chapter 6 Dr Souham Meshoul CAP492.
Logical Agents Chapter 7. Why Do We Need Logic? Problem-solving agents were very inflexible: hard code every possible state. Search is almost always exponential.
Knowledge Representation I (Propositional Logic) CSE 473.
Knoweldge Representation & Reasoning
Knowledge Representation & Reasoning (Part 1) Propositional Logic chapter 5 Dr Souham Meshoul CAP492.
Let remember from the previous lesson what is Knowledge representation
Inference is a process of building a proof of a sentence, or put it differently inference is an implementation of the entailment relation between sentences.
Declarative vs Procedural Programming  Procedural programming requires that – the programmer tell the computer what to do. That is, how to get the output.
Fall 98 Introduction to Artificial Intelligence LECTURE 7: Knowledge Representation and Logic Motivation Knowledge bases and inferences Logic as a representation.
Pattern-directed inference systems
Logical Agents Logic Propositional Logic Summary
1 Knowledge Representation. 2 Definitions Knowledge Base Knowledge Base A set of representations of facts about the world. A set of representations of.
1 CMSC 471 Fall 2002 Class #10/12–Wednesday, October 2 / Wednesday, October 9.
지식표현 Agent that reason logically
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
CS6133 Software Specification and Verification
For Wednesday Read chapter 9, sections 1-3 Homework: –Chapter 7, exercises 8 and 9.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
11 Artificial Intelligence CS 165A Thursday, October 25, 2007  Knowledge and reasoning (Ch 7) Propositional logic 1.
Chapter 7. Propositional and Predicate Logic Fall 2013 Comp3710 Artificial Intelligence Computing Science Thompson Rivers University.
Dr. Shazzad Hosain Department of EECS North South Universtiy Lecture 04 – Part B Propositional Logic.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
1 UNIT-3 KNOWLEDGE REPRESENTATION. 2 Agents that reason logically(Logical agents) A Knowledge based Agent The Wumpus world environment Representation,
Review: What is a logic? A formal language –Syntax – what expressions are legal –Semantics – what legal expressions mean –Proof system – a way of manipulating.
Artificial Intelligence Knowledge Representation.
March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 1 Back to “Serious” Topics… Knowledge Representation.
Artificial Intelligence Logical Agents Chapter 7.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 04 : Logic.
Knowledge Representation Lecture 2 out of 5. Last Week Intelligence needs knowledge We need to represent this knowledge in a way a computer can process.
Logical Agents. Inference : Example 1 How many variables? 3 variables A,B,C How many models? 2 3 = 8 models.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Knowledge Representation Techniques
By P. S. Suryateja Asst. Professor, CSE Vishnu Institute of Technology
Chapter 7. Propositional and Predicate Logic
CS 4700: Foundations of Artificial Intelligence
Knowledge Representation and Reasoning
Discrete Mathematics Logic.
Knowledge and reasoning – second part
ARTIFICIAL INTELLIGENCE
Introduction to Knowledge-bases
Introduction to Prolog
EA C461 – Artificial Intelligence Logical Agent
Logical Agents Chapter 7.
Logic Use mathematical deduction to derive new knowledge.
Artificial Intelligence
Knowledge and reasoning – second part
Back to “Serious” Topics…
Computer Security: Art and Science, 2nd Edition
Discrete Mathematics Logic.
Logical Agents Chapter 7.
Chapter 7. Propositional and Predicate Logic
Knowledge Representation I (Propositional Logic)
CSNB234 ARTIFICIAL INTELLIGENCE
Propositional Logic CMSC 471 Chapter , 7.7 and Chuck Dyer
ece 720 intelligent web: ontology and beyond
Logical and Rule-Based Reasoning Part I
Representations & Reasoning Systems (RRS) (2.2)
Logical Agents Chapter 7 Andreas Geyer-Schulz and Chuck Dyer
Habib Ullah qamar Mscs(se)
Logical Agents Prof. Dr. Widodo Budiharto 2018
Presentation transcript:

Knowledge Representation General problem-solving techniques are useful, but effectiveness often depends on extensive, domain-specific knowledge. Knowledge-based systems use a KNOWLEDGE BASE (KB) of facts about the world Knowledge usually comes from “experts” who have experience solving problems in the domain. A language is needed to describe the knowledge and dictate how it can be used – this is the knowledge representation (KR) language.

How knowledge representations are used in artificial intelligence Questions, requests Answers, analyses Examples, Statements Contents of KB is part of cognitive model Some models hypothesize multiple knowledge bases. Inference Mechanism(s) Learning Mechanism(s) Knowledge Base

Examples of Data Age Jobs Integer,float? Unit? Range? What attributes do you need What descriptors are best

Examples of knowledge Is it possible to see a person’s skill level in a job description? If so, how can you get the computer to understand this? How about a diagnosis for a programming bug? How about managing programmers? And, the fast-increasing knowledge about computers, operating systems, web applications, etc.

Properties of a knowledge representation language Expressiveness – can all the knowledge required for the problem be represented adequately? Naturalness – Does the representation allow the knowledge to be input and manipulated in a natural fashion? Efficiency – Can the system access and process the domain knowledge efficiently? Inference – Does the representation support the generation of inferences? (new knowledge)

Levels of knowledge We can talk about knowledge at different levels: The knowledge level describes what is known independent of the representation. (e.g., knowing that robins are birds) The logical level describes the statement(s) in the KR model that represent a fact. (e.g., knowing that isa(robin,bird). The implementation level refers to the way in which the knowledge is encoded, (e.g., isa(robin,bird) might be encoded as a list, array, database record, etc.)

Getting started What types of information need to be represented? Which knowledge representation model should we use? How should information be encoded in the knowledge representation model? How will the information be accessed?

Knowledge Representation Closed World Assumption: Most AI systems assume that all true assertions about the world are contained in the KB (directly or inferable). This assumption can cause major problems if relevant information is omitted. The Frame Problem: During problem-solving a program must keep track of which facts change and which do not.

Types of Knowledge Declarative: facts about the world. EX: Robins have wings Procedural: Operations embodying knowledge EX: an algorithm for addition Analogy: Associating knowledge about different things. EX: Robins can fly. Robins are like sparrows. So I suspect that sparrows can fly too. Generalization: Making generalizations from specific examples: EX: Robins can fly, sparrows can fly, cardinals can fly…I suspect all birds can fly. Meta-level Knowledge: Knowledge about what is known. EX: I don’t know Jim Rogers, so I probably don’t know his phone number.

Explicit vs. Implicit Knowledge Explicit knowledge is information that is encoded directly in the representation. EX: robin has-part wing Implicit knowledge is information that can be derived from the representation. EX: bird has-part wing and robin isa a bird, therefore robin must have a wing too. Trade-off: Relying on implicit knowledge can reduce the size of the knowledge base, but it can increase the access time….

Knowledge Representation Models Propositional Logic Predicate Calculus Production Systems (rule-based systems) Semantic networks Frames Bayesian Networks

Logic Logic is a formal representation model. Logical statements are precise and unambiguous. A logical system consists of: 1. A language for expressing propositions about the world. 2. Rules for inferring new facts (propositions) from those already known. Rules of inference are syntactic. Inference can be done mechanically without knowing the meaning of the statements.

Propositional Logic In propositional logic, a symbol represents a whole proposition (facts). For example, P might mean that ``Elvis is alive''. Boolean connectives can generate complex statements. Propositional logic does not use variables or quantifiers. A propositional logic consists of: Logical Constants: true false Proposition Symbols: P, Q, R, ... Logical connectives: ^, -,=>,  Parentheses: ( ) Propositional logic is an extremely simple representation language!

The Logical Connectives  represents a conjunction, such as P  Q. The components are called conjuncts.  represents a disjunction, such as P  Q. The components are called disjuncts. represents implication, such as P  Q. P is the antecedent and Q is the consequent. (Essentially an if then statement!)  represents equivalence (sometimes called biconditional), such as P  Q and Q  P.  represents negation, such as  P. Negation is the only unary connective (i.e., operates on a single proposition).

Syntax Rules for Propositional Logic The constants true and false are propositions by themselves. A proposition symbol such as P or Q is a proposition by itself. Wrapping parentheses around a proposition produces a proposition. A proposition can be formed by using a logical connective to combine two propositions. Constants or proposition symbols by themselves make atomic propositions. Propositions containing a connective are called complex propositions.

A Grammar for Propositional Logic Sentence AtomicSentence  ComplexSentence AtomicSentence  true  false  P  Q  R  ... Connective       ComplexSentence  (Sentence) ComplexSentence  Sentence Connective Sentence ComplexSentence  Sentence

Ambiguity The grammar can be ambiguous, for example: P  Q  R. It is best to use parentheses to eliminate ambiguity. When ambiguity is present, we resolve it with operator precedence: (highest)      (lowest) For example: P  Q  R  S is equivalent to: (( P)  (Q  R))  S

Validity and Satisfiability Logical inference (or deduction) is the process that determines the relationship between propositions. A proposition is valid if it must be true. That is, if it is true under all possible interpretations of all possible worlds (a tautology). Example: (Elvis is alive) or (Elvis is not alive) A proposition is satisfiable if it can be true. That is, if there is an interpretation in some world for which it is true. Example: Elvis is alive. A proposition is unsatisfiable if it cannot be true. That is, if there is no interpretation in any world for which it is true. Unsatisfiable propositions are called selfcontradictory. Example: (Elvis is alive) and (Elvis is dead).

Formal Inference Although the computer does not know the meaning of propositions, it can deduce facts that must be true from its knowledge base. The power of formal inference is twofold: 1. The KB can be extremely large and propositions can be arbitrarily complex. 2. The computer only reports valid conclusions, so whatever propositions are returned must be true. Other informal representation languages can be used to capture probability and uncertainty.

Semantics of Propositional Logic A proposition symbol can meaning anything at all. The computer has no understanding of its meaning. The semantics of propositional logic specifies the meaning of the logical connectives and how they combine propositions. A truth table can be used to specify the semantics of the logical connectives.

Truth table for logical connectives

Inference Rules Rules of inference can be used to deduce validity without building a truth table. Some simple inference rules: AndElimination: From a conjunction you can infer any of the conjuncts. P1 P2  P3  P i AndIntroduction: From a list of propositions you can infer their conjunction. P1, P2, P3  P1  P2  P3 OrIntroduction: From a proposition you can infer its disjunction with anything else! P1  P1  P2  P3

More Inference Rules DoubleNegation Elimination: From a doubly negated proposition you can infer a positive proposition.  P  P. Unit Resolution: If one disjunct is false, then you can infer that the other one is true. (P  Q), ( Q)  P.

Even More Inference Rules 1. Modus Ponens: If: P  Q If raining, then soggy courts. and P It is raining. Then: Q Soggy courts. 2. Modus Tollens: and  Q No soggy courts. Then:  P It is not raining.

Resolution Inference Rule One of the most important inference rules is resolution. The intuition is that Q cannot be both true and false, so one of the other disjuncts must be true. (P  Q), ( Q  R)  (P  R)

Using inference rules “On winter days in Chicago, it is either bitterly cold or dark and damp outside. Today is a winter day in Chicago and it is not terribly cold outside.”

Formalizing a situation “On winter days in Chicago, it is either bitterly cold or dark and damp outside. Today is a winter day in Chicago and it is not terribly cold outside.” Winter = “It is a winter day in Chicago” Cold = “It is bitterly cold outside” Dark = “It is dark outside” Damp = “It is damp outside” (=> Winter (or Cold (and Dark Damp))) (and Winter (not Cold))

Using the Inference Rules 1. (=> Winter (or Cold (and Dark Damp))) Given 2.(and Winter (not Cold)) Given 3. Winter [AE 2] 4.(or Cold (and Dark Damp)) [MP 1,3] 5.(not Cold) [AE 2] 6.(and Dark Damp)[UR 4,5] 7. Dark [AE 6] 8. Damp [AE 6]

Properties of inference rules They are sound if when the premises are true, the consequence is true Many different sets of inference rules have been created with the same expressive power (i.e., complete) Sometimes restricted sets of inference rules used for tractability Example: Horn clauses in Prolog (=> (and A1 … An) C)

Problems with propositional logic Hard to identify “individuals” E.g., Mary, 3 Can’t directly talk about properties of individuals or relations between individuals e.g., tall(bill) Generalizations, patterns, regularities can’t easibly be represented. E.g., all triangles have 3 sides First-Order Logic (FOL or FOPC) is expressive enough to concisely represent..

Summary Intelligent agents need knowledge about the world for making good decisions The knowledge of an agent is stored in a knowledge base in the form of sentences in a knowledge representation language A knowledge-based agent needs a knowledge base and an inference mechanism. It operates by storing sentences in its knowledge base, inferring new sentences with the inference mechanism, and using them to deduce which actions to take. The interpretation of a sentence is the fact to which it refers. If this fact is part of the actual word, then the fact is true.

Summary cont. The process of deriving new sentences from old ones is called inference. Sound inference processes derives true conclusions give true premises. Complete inference processes derive all true conclusions from a set of premises. A valid sentence is true in all worlds under all interpretations. If an implication sentence can be shown to be valid, then – known its premise – its consequent can be derived. Propositional logic commits only to the existence of fact that may or may not be the case in the world being represented. It has a simple syntax and a simple semantic. It suffices to illustrate the process of inference Propositional logic quickly becomes impractical, even for small worlds.