111 Artificial Intelligence CS 165A Thursday, November 15, 2007  Knowledge Representation (Ch 10) 1.

Slides:



Advertisements
Similar presentations
Knowledge Representation using First-Order Logic
Advertisements

Artificial Intelligence
Situation Calculus for Action Descriptions We talked about STRIPS representations for actions. Another common representation is called the Situation Calculus.
Logic Use mathematical deduction to derive new knowledge.
Agents That Reason Logically Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2004.
Logic.
CS 484 – Artificial Intelligence1 Announcements Choose Research Topic by today Project 1 is due Thursday, October 11 Midterm is Thursday, October 18 Book.
Intelligent systems Lecture 6 Rules, Semantic nets.
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
Logic in general Logics are formal languages for representing information such that conclusions can be drawn Syntax defines the sentences in the language.
Computing & Information Sciences Kansas State University Lecture 11 of 42 CIS 530 / 730 Artificial Intelligence Lecture 11 of 42 William H. Hsu Department.
Knowledge Representation I (Propositional Logic) CSE 473.
Knoweldge Representation & Reasoning
Let remember from the previous lesson what is Knowledge representation
Logical Agents Chapter 7 Feb 26, Knowledge and Reasoning Knowledge of action outcome enables problem solving –a reflex agent can only find way from.
Logical Agents Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2005.
CPSC 433 Artificial Intelligence CPSC 433 : Artificial Intelligence Tutorials T01 & T02 Andrew “M” Kuipers note: please include.
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
Knowledge representation
February 20, 2006AI: Chapter 7: Logical Agents1 Artificial Intelligence Chapter 7: Logical Agents Michael Scherger Department of Computer Science Kent.
Artificial Intelligence
110/19/2015CS360 AI & Robotics AI Application Areas  Neural Networks and Genetic Algorithms  These model the structure of neurons in the brain  Humans.
Pattern-directed inference systems
1 Logical Agents CS 171/271 (Chapter 7) Some text and images in these slides were drawn from Russel & Norvig’s published material.
Logical Agents Logic Propositional Logic Summary
Logical Agents Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
Artificial Intelligence CS 165A Tuesday, November 20, 2007  Knowledge Representation (Ch 10)  Uncertainty (Ch 13)
Computing & Information Sciences Kansas State University Wednesday, 20 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 12 of 42 Wednesday, 20 September.
An Introduction to Artificial Intelligence – CE Chapter 7- Logical Agents Ramin Halavati
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 13 of 41 Monday, 20 September.
Computing & Information Sciences Kansas State University Lecture 13 of 42 CIS 530 / 730 Artificial Intelligence Lecture 13 of 42 William H. Hsu Department.
CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes Jan 17, 2012.
Logical Agents Chapter 7. Knowledge bases Knowledge base (KB): set of sentences in a formal language Inference: deriving new sentences from the KB. E.g.:
1 Logical Agents CS 171/271 (Chapter 7) Some text and images in these slides were drawn from Russel & Norvig’s published material.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 12 Friday, 17 September.
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
Computing & Information Sciences Kansas State University Monday, 25 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 14 of 42 Monday, 25 September.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 14 of 41 Wednesday, 22.
1 Logical Inference Algorithms CS 171/271 (Chapter 7, continued) Some text and images in these slides were drawn from Russel & Norvig’s published material.
CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes Jan 24, 2012.
KNOWLEDGE BASED SYSTEMS
Some Thoughts to Consider 8 How difficult is it to get a group of people, or a group of companies, or a group of nations to agree on a particular ontology?
© 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.
Reasoning with Propositional Logic automated processing of a simple knowledge base CD.
Dr. Shazzad Hosain Department of EECS North South Universtiy Lecture 04 – Part B Propositional Logic.
Computing & Information Sciences Kansas State University Lecture 12 of 42 CIS 530 / 730 Artificial Intelligence Lecture 12 of 42 William H. Hsu Department.
1 Propositional Logic Limits The expressive power of propositional logic is limited. The assumption is that everything can be expressed by simple facts.
Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 10 of 42 Wednesday, 13 September.
First-Order Logic Semantics Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read: FOL.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Lecture 8-2CS250: Intro to AI/Lisp What do you mean, “What do I mean?” Lecture 8-2 November 18 th, 1999 CS250.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 14 of 42 Wednesday, 22.
Some Thoughts to Consider 5 Take a look at some of the sophisticated toys being offered in stores, in catalogs, or in Sunday newspaper ads. Which ones.
Proof Methods for Propositional Logic CIS 391 – Intro to Artificial Intelligence.
Computing & Information Sciences Kansas State University Wednesday, 04 Oct 2006CIS 490 / 730: Artificial Intelligence Lecture 17 of 42 Wednesday, 04 October.
Representation and Search The function of a representation is to capture the critical features of the problem domain –and make the information accessible.
Computing & Information Sciences Kansas State University Friday, 13 Oct 2006CIS 490 / 730: Artificial Intelligence Lecture 21 of 42 Friday, 13 October.
Announcements  Upcoming due dates  Thursday 10/1 in class Midterm  Coverage: everything in lecture and readings except first-order logic; NOT probability.
Artificial Intelligence Logical Agents Chapter 7.
Artificial Intelligence
Computing & Information Sciences Kansas State University Monday, 18 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 11 of 42 Monday, 18 September.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
CS 4700: Foundations of Artificial Intelligence
EA C461 – Artificial Intelligence Logical Agent
Artificial Intelligence
CS 416 Artificial Intelligence
CPSC 433 : Artificial Intelligence Tutorials T01 & T02
Habib Ullah qamar Mscs(se)
Presentation transcript:

111 Artificial Intelligence CS 165A Thursday, November 15, 2007  Knowledge Representation (Ch 10) 1

2 Notes HW assignments –HW#4 due Wednesday (11/21), HW#5 due 12/4 Schedule –Three weeks left –Knowledge representation (Ch. 10), probabilistic reasoning (Ch. 13, 14) –What else?  Planning  Perception (speech, language, vision)  Robotics  Examples of AI research and/or applications Precedence of AND, OR

3 Precedence of operators (logical connectives) Levels of precedence, evaluating left to right 1.  (NOT) 2.  (AND, conjunction) 3.  (OR, disjunction) 4.  (implies, conditional) 5.  (equivalence, biconditional) P   Q  R –(P  (  Q))  R P  Q  R –P  (Q  R) P  Q  R  S –P  ((Q  R)  S) Correction to 10/30 Lecture notes, slide #9

4 Forward and Backward Chaining Forward chaining –Data driven or data directed –New version of T ELL (KB, p)  Add the sentence p, then apply inference rules to the updated KB until no more rules apply (“chaining” – “chain reaction”) Backward chaining –Goal oriented –A SK (KB, q) –If S UBST ( , q) is in KB, return q' = S UBST ( , q) –Else, find implication sentences p  q then set p as a subgoals  Keep doing this, working “backwards”  If p is not in KB, look for r  p, then set r as a subgoal  Etc….. –Backward chaining is the basis for logic programming (e.g., Prolog) What form would you want your KB to be in to best support backward chaining?

5 Forward chaining example KB = { } 1.T ELL (KB, Buffalo(x)  Pig(y)  Outrun(x,y)) 2.T ELL (KB, Pig(x)  Slug(y)  Outrun(x,y)) 3.T ELL (KB, Outrun(x,y)  Outrun(y,z)  Outrun(x,z)) 4.T ELL (KB, Buffalo(Bob)) 5.T ELL (KB, Pig(Pat)) 6.T ELL (KB, Slug(Steve)) What happens at every step?

6 Backward chaining example KB: Pig(y)  Slug(z)  Faster(y,z) Slimy(z)  Creeps(z)  Slug(z) Pig(Pat) Slimy(Steve) Creeps(Steve) A SK (KB, Faster(Pat, Steve)) q Is q in KB? No So look for p  q

7 At this point we have… A powerful logic (FOL) in which we can express many or most things of interest Two powerful inference rules and their normal forms –Generalized Modus Ponens –Generalized Resolution  Both use unification Ways to convert any FOL sentences (a KB) into normal form (CNF or INF) Inference strategies: data-driven and goal-driven –Forward chaining –Backward chaining Search methods and a problem formulation method

8 We have AI, more or less We can now build rational agents that receive percepts, reason about their world and implicit goals, and act upon their world –Problem-solving agents We could also consider how to set goals and subgoals for our agents; how to construct and execute plans that achieve the agent’s goals –Planning agents  Not covering in this course

9 Applications of logical reasoning systems Logical reasoning systems often referred to as –Knowledge-based systems –Rule-based systems Two common kinds of reasoning systems –Expert systems –Production systems Knowledge-based systems Expert systems Production systems

10 Expert systems Expert system: a computer program embodying knowledge and ability of expert in task domain –Built with the help and guidance of human experts –Seek to perform as well as or better than human experts on specific tasks –Historically rule-based (but less so now – could be probabilistic) –Many in use in business, science, engineering, and the military –Basic underlying theory: Horn KBs with resolution refutation Some examples –Medical diagnosis (MYCIN) –Science (DENDRAL – chemical spectral analysis) –Mathematics theorem proving –Geological exploration –System repair –VLSI chip layout –Help desk –Computer system configuration –Chess

11 Production systems A production is a condition-action rule –An “if-then” rule: if condition then action is valid A production system is a knowledge-based system that uses productions to match the state of the KB with applicable actions –p  q  action 1 –r  action 2 Aspects of a production system –A DD (KB, p) with forward chaining –Match phase –Conflict resolution phase –Choice of action Perceive Reason Act

12 Production systems (cont.) Match phase: Which rules have left-hand sides (“conditions”) that match the KB? –Rules (productions) are stored separately from knowledge –May have heuristic rules for ordering rule application Conflict resolution phase: Which of the matching rules should be executed? –I.e., which applicable action should be taken? Notes –Examples of early system: R1 for configuring VAX 780s –Led to early versions of expert systems

13 Limitations of formal logic Formal logic sometimes doesn’t perform well in the real world –“brittle” if have (hidden) contradiction in KB –Most categories have fuzzy boundaries –Most rules have exceptions –Cause/effect is usually not completely straightforward Examples: –Modus ponens and science –Medical diagnosis Issues: –Handling of arbitrary logical expressions –Complex semantics –Uncertainty –Computational efficiency –Human interaction P  Q Q If a patient has the flu, the patient will have a fever. The patient has a fever. What can be concluded? Answer: Logically, nothing

14 Logic and uncertainty For example, consider the rule “Raining(t)  WetGrass(t)” –Is this always true  Can [T,F] be applicable in real world?  What if it’s not raining? –We’d rather know the full relationship between Raining and WetGrass FOL deals with all, not all, some, none –The real world is not so simple Complexity is often manifested as uncertainty –Rather than a very large number of rules that cover every case, we may have a few rules that capture most of the cases –This may be a result of ignorance or laziness We need ways to reason about or in the presence of uncertainty [coming soon, Ch. 13 and 14]

15 Knowledge We’ve also mostly finessed the issues regarding what knowledge to represent and how –What is the domain of objects? –How do we represent more complex knowledge than simple predicates? –We can describe object properties and relations between objects, but how to describe actions, situations, and events? –What if the state of the world changes? –Can we reason about categories of objects? Chapter 10 raises these kinds of issues under the topic of knowledge representation

16 Thursday quiz Give an English description of the following sentence in FOL using situation calculus:  x, s Studying(x, s)  Failed(x, Result(TakeTest, s))

17 Knowledge engineering The process of knowledge base construction (either special-purpose or general-purpose KBs) is called knowledge engineering The knowledge engineering process: –Identify the task –Assemble the relevant knowledge –Decide on a vocabulary of predicated, functions, and constants –Encode general knowledge about the domain –Encode a description of the specific problem instance –Pose queries to the inference procedure and get answers –Debug the knowledge base See the electronic circuits domain example in Section 8.4

18 Ontological engineering Ontology – a theory of the nature of being or existence –What exists, what can be known (in a particular domain)? Ontological engineering builds a formal ontology for a particular domain –Defines categories and their relations (e.g., inheritance)  Taxonomy of categories and subcategories –Defines/limits what can possibly be stated, and reasoned about, in the domain Would like to reason about actions, events, and situations –Need a way to efficiently consider time, or time sequences

19 Reification Category  Object –Can represent basketballs using the predicate Basketball(x) or by reifying the category as an object, Basketballs  Member (x, Basketballs) –Object x is a member of the category Basketballs  Subset(Basketballs, Balls) –Basketballs is a subcategory of Balls –Class properties apply to specific class objects  x must be spherical, must bounce, etc. –“isa” (member or subclass) relationship  subcategory isa category

20 Semantic networks A semantic network is a directed graph consisting of –Vertices – representing concepts –Edges – representing semantic relations between the concepts “Visual logic”

21 The Frame Problem The frame problem is the problem of expressing a dynamic domain in logic without explicitly specifying which conditions are not affected by an action –If the light is on at time t 1, do we have to explicitly say it’s on at time t 2 ? –This can become very burdensome.... The frame problem can be addressed (partially) with –Including situations (S i ) that describe the state of the environment at particular points in time  S 0  S 1  S 2 ...  Doesn’t have to represent equally spaced units of time –Representing the results of actions from S i to S j –Having an ontology of time

22 Situation Calculus – actions, events “Situation Calculus” is a way of describing change over time in first-order logic –Fluents: Functions or predicates that can vary over time have an extra argument, S i (the situation argument)  Predicate(args, S i )  Location of an agent, aliveness, changing properties,... –The Result function is used to represent change from one situation to another resulting from an action (or action sequence)  Result(GoForward, S i ) = S j  “S j is the situation that results from the action GoForward applied to situation S i  Result() indicates the relationship between situations

23 Situation Calculus Represents the world in different “situations” and the relationship between situations

24 Situation Calculus Represents the world in different “situations” and the relationship between situations

25 Examples How would you interpret the following sentences in First- Order Logic using situation calculus?  x, s Studying(x, s)  Failed(x, Result(TakeTest, s))  x, s TurnedOn(x, s)  LightSwitch(x)  TurnedOff(x, Result(FlipSwitch, s)) If you’re studying and then you take the test, you will fail. (or) Studying a subject implies that you will fail the test for that subject. If you flip the light switch when it is turned on, it will then be turned off.