COMP219: Artificial Intelligence. Lecture 14: Knowledge Representation

Similar documents
AITA : Knowledge Representation

Module 8. Other representation formalisms. Version 2 CSE IIT, Kharagpur

6.034 Artificial Intelligence, Fall 2006 Prof. Patrick H. Winston. Problem Set 1

Lecture 4: January 12, 2015

COMP4418 Knowledge Representation and Reasoning

Data Structures and Algorithms


The Logic Paradigm. Joseph Spring. 7COM1023 Programming Paradigms

Downloaded from ioenotes.edu.np

Declarative programming. Logic programming is a declarative style of programming.

Artificial Intelligence. Chapters Reviews. Readings: Chapters 3-8 of Russell & Norvig.

OWL a glimpse. OWL a glimpse (2) requirements for ontology languages. requirements for ontology languages

Knowledge representation Semantic networks and frames

Knowledge Representation

Logic Programming. Let us have airline flight information of the form: 1. Application Domains: 2. Definitions

Integration of Application Business Logic and Business Rules with DSL and AOP

Semantic Web Systems Ontologies Jacques Fleuriot School of Informatics

6.001 Notes: Section 15.1

Artificial Intelligence Lecture 1

Lecture 7: January 15, 2014

For next Tuesday. Read chapter 8 No written homework Initial posts due Thursday 1pm and responses due by class time Tuesday

Question 1: 25% of students lost more than 2 points Question 2: 50% of students lost 2-4 points; 50% got it entirely correct Question 3: 95% of

Chapter 4 Fuzzy Logic

l A family of logic based KR formalisms l Distinguished by: l Decidable fragments of FOL l Closely related to Propositional Modal & Dynamic Logics

CS 416, Artificial Intelligence Midterm Examination Fall 2004

Knowledge Representation

CS-171, Intro to A.I. Mid-term Exam Fall Quarter, 2013

CHAPTER. Knowledge Representation

CPS331 Lecture: Fuzzy Logic last revised October 11, Objectives: 1. To introduce fuzzy logic as a way of handling imprecise information

Logical reasoning systems

Lecture Outline. Rule Based Systems. Production Systems. Production Systems. Production Systems. Production Systems

Propositional Logic. Part I

Introduction to Prolog

State Space Search. Many problems can be represented as a set of states and a set of rules of how one state is transformed to another.

STRUCTURES AND STRATEGIES FOR STATE SPACE SEARCH

6.001 Notes: Section 8.1

ER modeling. Lecture 4

First Order Predicate Logic CIS 32

Logic (or Declarative) Programming Foundations: Prolog. Overview [1]

Programming Languages Third Edition

6.001 Notes: Section 1.1

COMP 410 Lecture 1. Kyle Dewey

Knowledge Representation

Computer Science 9608 (Notes) Chapter: 4.1 Computational thinking and problem-solving

Knowledge Representation. Dr. Asaad Sabah Hadi

Propositional logic (Ch. 7)

Sardar Vallabhbhai Patel Institute of Technology (SVIT), Vasad M.C.A. Department COSMOS LECTURE SERIES ( ) (ODD) Code Optimization

Artificial Intelligence Lecture 1

Note that in this definition, n + m denotes the syntactic expression with three symbols n, +, and m, not to the number that is the sum of n and m.

Chapter 3: The IF Function and Table Lookup

Instances and Classes. SOFTWARE ENGINEERING Christopher A. Welty David A. Ferrucci. 24 Summer 1999 intelligence

Formal Semantics. Chapter Twenty-Three Modern Programming Languages, 2nd ed. 1

(Refer Slide Time: 02.06)

UNIT 14C The Limits of Computing: Non computable Functions. Problem Classifications

Question about Final Exam. CS 416 Artificial Intelligence. What do we like about propositional logic? First-order logic

Seach algorithms The travelling salesman problem The Towers of Hanoi Playing games. Comp24412: Symbolic AI. Lecture 4: Search. Ian Pratt-Hartmann

Horn Formulae. CS124 Course Notes 8 Spring 2018

Logik für Informatiker Logic for computer scientists

(Refer Slide Time: 4:00)

Knowledge Sharing Among Heterogeneous Agents

(QiuXin Hui) 7.2 Given the following, can you prove that the unicorn is mythical? How about magical? Horned? Decide what you think the right answer

Introduction to Spring 2007 Artificial Intelligence Midterm Solutions

16 April 2011 Alan, Edison, etc, Saturday.

Lecture Notes 3: Data summarization

Some Applications of Graph Bandwidth to Constraint Satisfaction Problems

Week 4. COMP62342 Sean Bechhofer, Uli Sattler

We will show that the height of a RB tree on n vertices is approximately 2*log n. In class I presented a simple structural proof of this claim:

a. Given that we search depth first from left to right, list all leaf nodes above that we need to search/expand. (35 Points)

1. Write two major differences between Object-oriented programming and procedural programming?

Computation Club: Gödel s theorem

CPS122 Lecture: From Python to Java

Searching: Where it all begins...

Concepts of Programming Languages

Finding optimal configurations Adversarial search

CSE P 501 Compilers. Parsing & Context-Free Grammars Hal Perkins Spring UW CSE P 501 Spring 2018 C-1

Properties of Criteria. 1. Applicability Property. Criteria

CS 540-1: Introduction to Artificial Intelligence

Homework #6 (Constraint Satisfaction, Non-Deterministic Uncertainty and Adversarial Search) Out: 2/21/11 Due: 2/29/11 (at noon)

Chapter 3. Set Theory. 3.1 What is a Set?

Chapter 3. Describing Syntax and Semantics

ARTIFICIAL INTELLIGENCE (CS 370D)

CS 561: Artificial Intelligence

Computer Organization & Assembly Language Programming

CPS122 Lecture: From Python to Java last revised January 4, Objectives:

ITCS 6150 Intelligent Systems. Lecture 13 First-Order Logic Chapter 8

Problem Solving through Programming In C Prof. Anupam Basu Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur

Introduction to predicate calculus

Artificial Intelligence Notes Lecture : Propositional Logic and Inference

Device Independent Principles for Adapted Content Delivery

SOFTWARE ENGINEERING Prof.N.L.Sarda Computer Science & Engineering IIT Bombay. Lecture #10 Process Modelling DFD, Function Decomp (Part 2)

The Metalanguage λprolog and Its Implementation

Invitation to Computer Science 7th Edition TEST BANK Schneider Gersting

Name: CSCI E-220: Artificial Intelligence Midterm Exam, Fall Term 2001

Lecture 4. Lecture 4: The E/R Model

Chapter 6: Entity-Relationship Model

Expert Systems Knowledge Based Systems

HEURISTIC SEARCH. 4.3 Using Heuristics in Games 4.4 Complexity Issues 4.5 Epilogue and References 4.6 Exercises

CS 125 Section #4 RAMs and TMs 9/27/16

Notes for Chapter 12 Logic Programming. The AI War Basic Concepts of Logic Programming Prolog Review questions

Chamberlin and Boyce - SEQUEL: A Structured English Query Language

Transcription:

COMP219: Artificial Intelligence Lecture 14: Knowledge Representation 1

Overview Last time Game playing Minimax decisions Alpha-beta pruning Today Introduce the need for explicit knowledge representation Describe means of knowledge representation Consider rules as one particular means of knowledge representation Learning outcome covered today: Distinguish the characteristics, and advantages and disadvantages, of the major knowledge representation paradigms that have been used in AI, such as production rules, semantic networks, propositional logic and first-order logic; 2

Knowledge in AI Search is a universal method for problem solving But real problems require methods with more power, which comes from tailoring to the specific problem Heuristic searches Evaluation functions for game playing Solution templates In order to solve the complex problems encountered in AI, one generally needs a large amount of knowledge, and suitable mechanisms for representing and manipulating all that knowledge 3

The Knowledge Principle Ed Feigenbaum:... power exhibited... is primarily a consequence of the specialist knowledge employed by the agent and only very secondarily related to... the power of the [computer] Our agents must be knowledge rich, even if they are methods poor 4

The Role of Knowledge Knowledge about a domain allows problem solving to be focused - it is not necessary to search exhaustively: useless branches need not be explored Explicit representations of knowledge allow a domain expert to understand the knowledge a system has, add to it, edit it, and so on Knowledge engineering Comparatively simple algorithms can be used to reason with the knowledge and derive new knowledge 5 Wikipedia, Author: M93

What is Knowledge? Knowledge is information about some domain or subject area, or about how to do something Knowledge can take many forms. Some simple examples are: Eve is a female, Adam is a male Females with children are mothers Mothers are females, fathers are males cf. Prolog facts and rules 6

How to Represent Knowledge? Why don t we use natural languages (e.g. English) to represent knowledge? Natural language is certainly expressive enough! But it is also too ambiguous for automated reasoning No clear semantics Syntactic ambiguities Time flies like an arrow; Fruit flies like a banana Semantic ambiguities bank can be river bank or financial bank 7

Dedicated KR Language 8

Dedicated KR Language requirements store facts reason ('inference') map from/to real world 9

Databases Simple databases are commonly used to good effect in computer science They can be use to store and manipulate virtually any kind of information But storage and display are not enough - we also need to manipulate the knowledge 10

Databases as a KR Advantages Databases are well suited to efficiently representing and processing large amounts of data (and derivation from a database is virtually independent of its size) We can build on traditional database systems to process more complex and more powerful representational devices (e.g. frames) 11

Databases as a KR Disadvantages Only simple aspects of the problem domain can be accommodated We can represent entities, and relationships between entities, but not much more Prolog facts Reasoning is very simple. Basically, the only reasoning possible is simple lookup, and we usually need more sophisticated processing than that 12

Knowledge Representation So, how can we represent knowledge in a form amenable to computer manipulation? Desirable features of a KR scheme representational adequacy inferential adequacy inferential efficiency well-defined syntax and semantics naturalness 13

Representational Adequacy A KR scheme must be able to represent the knowledge appropriate to our problem e.g. Chess: must represent type of piece, colour of piece, position Cannot permit two pieces on same square Some KR schemes are better for particular sorts of knowledge than others There is no one ideal KR scheme 14

Inferential Adequacy A KR scheme must allow us to make new inferences from old knowledge It must make inferences that are sound - the new knowledge really does follow from the old knowledge complete - it should make all the right inferences Soundness is usually easy, completeness is often very hard 15

Exercise Is there a problem with the following inference? Knowledge: John is a man All men are mortal Inference: Harry is mortal 16

Inferential Efficiency A KR scheme should be tractable - make inferences in reasonable (polynomial) time Unfortunately, any KR scheme with significant expressive power is not going to be efficient Often, the more general a KR scheme is, the less efficient it is Use KR schemes tailored to problem domain - less general, but more efficient KR scheme with expressive power: first-order logic, is undecidable Prolog uses Horn Clauses a tractable subset of first order logic 17

Syntax and Semantics It should be possible to tell whether any construction is grammatically correct how to read any particular construction - no ambiguity Thus a KR scheme should have a well-defined syntax It should be possible to precisely determine, for any given construction, exactly what its meaning is (the circumstances under which it is true) Thus a KR scheme should have well-defined semantics Syntax is easy, semantics is hard! 18

Example Arithmetics Syntax The expression A + B > 3 is correct while A + B > is not Semantics A + B > 3 evaluates to either true or false depending on the values of A and B Other examples: SQL, programming languages, etc. 19

Naturalness Ideally, KR scheme should closely correspond to our way of thinking, reading, and writing Allow knowledge engineer to read and check knowledge base Again, the more general a KR scheme is, the less likely it is to be readable and understandable People may have preferences: logic is natural to some; some people like diagrams or graphs while others do not 20

Basic Approaches Neither natural languages nor traditional computer formalisms are good enough for KR Some alternative basic approaches are Rule-based systems (a.k.a. production systems) Expert systems Semantic networks Graphical representation convenient for knowledge engineers Later developed into ontologies Logic Formal semantics 21

Basic Approaches Neither natural languages nor traditional computer formalisms are good enough for KR this and Some alternative basic approaches are next lecture Rule-based systems (a.k.a. production systems) Expert systems Semantic networks Graphical representation convenient for knowledge engineers Later developed into ontologies Logic Formal semantics further lectures 22

Rule-Based Systems Knowledge is specified as a collection of rules Each rule has the form condition -> action which may be read if condition then action condition (antecedent) is a pattern action (consequent) is an operation to be performed if the rule fires Rules are applied to facts - unconditional statements that are assumed to be correct (at the time they are used) A rule can fire if the condition matches the facts 23

Example Rule Base Action is ADD this fact 24

Example Rule Base Action is ADD this fact Suppose F1: kiwi has feathers 25

Example Rule Base Action is ADD this fact Suppose F1: kiwi has feathers R1 fires so add F2: kiwi is a bird 26

Example Rule Base Action is ADD this fact Suppose F1: kiwi has feathers R1 fires so add F2: kiwi is a bird R2 fires so add F3: kiwi can fly 27

Example Rule Base Action is ADD this fact Suppose F1: kiwi has feathers R1 fires so add F2: kiwi is a bird R2 fires so add F3: kiwi can fly R3 fires so add F4: kiwi is not scared of heights 28

Rule-Based System Architecture A collection of rules A collection of facts A rule fires if a fact matches the condition of the rule - Mechanism that fires rules is inference engine 29

What can we do with rules? See what new facts can be derived, e.g. F3: kiwi is not scared of heights Ask whether a fact is implied by the knowledge base and already known facts, e.g. Can a giraffe fly? 30

Rule-Based Systems as KR Advantages These systems are very expressive The rules lead to a degree of modularity Disadvantages There is a lack of precise semantics for the rules The systems are not always efficient What if several rules match the facts? 31

Relation to Search Using rules can be thought of as just another form of search The sets of facts are states Rules are the actions performed in states This suggests that there are schemes for applying rules that are similar to search techniques We will look at these in the next lecture 32

Summary Discussed the need for explicit knowledge representation Considered properties of KR schemes Looked at rules as one such scheme Next time Algorithms for reasoning with rules 33