Lecture 4 Rohan Sinclair

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

1 Knowledge Representation Introduction KR and Logic.
Semantics Static semantics Dynamic semantics attribute grammars
Logic Use mathematical deduction to derive new knowledge.
Agents That Reason Logically Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2004.
Knowledge Representation
Knowledge Representation. Essential to artificial intelligence are methods of representing knowledge. A number of methods have been developed, including:
Knowledge Representation and Reasoning Chapters , 10.6, 10.9 Some material adopted from notes by Andreas Geyer-Schulz and Chuck Dyer.
Semantic Nets, Frames, World Representation. Knowledge Representation as a medium for human expression An intelligent system must have KRs that can be.
Intelligent systems Lecture 6 Rules, Semantic nets.
14th September 2006 Dr Bogdan L. Vrusias
Lecture 10: Semantic Network
Logic in general Logics are formal languages for representing information such that conclusions can be drawn Syntax defines the sentences in the language.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Lecture 9 Jim Martin.
Knowledge Representation using First-Order Logic (Part II) Reading: Chapter 8, First lecture slides read: Second lecture slides read:
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.
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
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.
Objects Objects are at the heart of the Object Oriented Paradigm What is an object?
Knowledge representation methods جلسه سوم. KR is AI bottleneck The most important ingredient in any expert system is knowledge. The power of expert systems.
1 CMSC 671 Fall 2010 Class #11 – Monday, October 11.
1 Semantic Web Semantic Web DL Relationships with other Formalisms Habib Rostami.
Frames and semantic networks, page 1 CSI 4106, Winter 2005 A brief look at semantic networks A semantic network is an irregular graph that has concepts.
Propositional Logic: Logical Agents (Part I) This lecture topic: Propositional Logic (two lectures) Chapter (this lecture, Part I) Chapter 7.5.
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
1 Knowledge Representation. 2 Definitions Knowledge Base Knowledge Base A set of representations of facts about the world. A set of representations of.
CMSC 471 Spring 2014 Class #22 Thursday, April 17 Knowledge Representation Professor Marie desJardins,
Semantic web course – Computer Engineering Department – Sharif Univ. of Technology – Fall Knowledge Representation Semantic Web - Fall 2005 Computer.
Machine Learning Chapter 5. Artificial IntelligenceChapter 52 Learning 1. Rote learning rote( โรท ) n. วิถีทาง, ทางเดิน, วิธีการตามปกติ, (by rote จากความทรงจำ.
Semantic Nets, Frames, World Representation CS – W February, 2004.
1 Knowledge Representation (continue). 2 Knowledge Representation Logic isn’t the only method of representing knowledge. There are other methods which.
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 Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
Knowledge Representation
Computer Science CPSC 322 Lecture 22 Logical Consequences, Proof Procedures (Ch 5.2.2)
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.
Artificial Intelligence Knowledge Representation.
Knowledge Engineering. Sources of Knowledge - Books - Journals - Manuals - Reports - Films - Databases - Pictures - Audio and Video Tapes - Flow Diagram.
Knowledge Representation and Reasoning Chapter 12 Some material adopted from notes by Andreas Geyer-Schulz and Chuck Dyer.
Artificial Intelligence Logical Agents Chapter 7.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Propositional Logic: Logical Agents (Part I)
Knowledge Representation Techniques
Artificial Intelligence
Basics of Logic gates - Part 1
Chapter 7. Propositional and Predicate Logic
Knowledge Representation and Reasoning
ARTIFICIAL INTELLIGENCE
Knowledge Representation
Knowledge Representation
Knowledge Representation
Logical Agents Chapter 7.
Logic Use mathematical deduction to derive new knowledge.
Artificial Intelligence
KNOWLEDGE REPRESENTATION
Back to “Serious” Topics…
Weak Slot-and-Filler Structures
Logical Agents Chapter 7.
CSNB234 ARTIFICIAL INTELLIGENCE
Semantic Nets and Frames
Deniz Beser A Fundamental Tradeoff in Knowledge Representation and Reasoning Hector J. Levesque and Ronald J. Brachman.
Professor Marie desJardins,
Presentation transcript:

Lecture 4 Rohan Sinclair Intelligent Systems Lecture 4 Rohan Sinclair

Knowledge Representation

Terms knowledge representation : the study of how knowledge about the world can be represented and what kinds of reasoning can be done with that knowledge knowledge representation language : Formalism used to represent knowledge. Also known as knowledge representation formalism. knowledge base: The collection of knowledge used by the system

Where is it used? medical informatics, decision support systems, medical vocabularies, data coding and transfer, guidelines and protocols development, database design and electronic patient records.

Knowledge Representation Language A knowledge representation language has two aspects, namely syntactic and inferential aspect. The syntactic or notational aspect concerns the way in which one stores information in an explicit format. The inferential aspect concerns the way in which the explicitly stored information can be used to derive information that is implicit in it.

Knowledge Representation Language A knowledge representation language has four levels, namely: implementational, logical, epistemological and conceptual level. The most popular include production rules, scripts, semantic networks and frames.

Semantic Nets The major idea is that the meaning of a concept comes from its relationship to other concepts, and that the information is stored by interconnecting nodes with labelled arcs.

Semantic Networks A semantic network is a simple representation scheme that uses a graph of labeled nodes and labeled, directed arcs to encode knowledge. Usually used to represent static, taxonomic, concept dictionaries Semantic networks are typically used with a special set of accessing procedures that perform “reasoning” e.g., inheritance of values and relationships

Semantic Networks Semantic networks were very popular in the ‘60s and ‘70s but are less frequently used today. Often much less expressive than other KR formalisms The graphical depiction associated with a semantic network is a significant reason for their popularity.

Nodes and Arcs Arcs define binary relationships that hold between objects denoted by the nodes. mother age Sue john 5 wife age father husband mother(john,sue) age(john,5) wife(sue,max) age(max,34) ... 34 Max age

Semantic Networks The ISA (is-a) or AKO (a-kind-of) relation is often used to link instances to classes, classes to superclasses Some links (e.g. hasPart) are inherited along ISA paths. The semantics of a semantic net can be relatively informal or very formal often defined at the implementation level isa Robin Bird Animal Red Rusty hasPart Wing

Reification Non-binary relationships can be represented by “turning the relationship into an object” This is an example of what logicians call “reification” reify v : consider an abstract concept to be real We might want to represent the generic give event as a relation involving three things: a giver, a recipient and an object, give(john,mary,book32) giver john give recipient object mary book32

Representation in a Semantic Net

Representation in a Semantic Net These values can also be represented in logic as: isa(person, mammal), instance(Mike-Hall, person) team(Mike-Hall, Cardiff)

Representation in a Semantic Net We have already seen how conventional predicates such as lecturer(dave) can be written as instance (dave, lecturer) Recall that isa and instance represent inheritance and are popular in many knowledge representation schemes. But we have a problem: How we can have more than 2 place predicates in semantic nets? E.g. score(Cardiff, Llanelli, 23-6)

Representation in a Semantic Net Solution: Create new nodes to represent new objects either contained or alluded to in the knowledge, game and fixture in the current example. Relate information to nodes and fill up slots (see figure below).

Representation in a Semantic Net

Representation in a Semantic Net As a more complex example consider the sentence: John gave Mary the book. Here we have several aspects of an event. instance Person instance

EXAMPLE Bilbo, the hobbit, found the magic ring in Gollum’s cave. Hobbits are little people with large, hairy feet.

Example Five cars are currently placed at the yard of Mack D Auto Sales. Three of the dealer’s cars are Japanese makes and the other two European. The Japanese models are Toyota Corolla (2.5L Automatic PJ6127 Brown), Honda Civic (1.3L Manual MN2323 Red) and Nissan Bluebird Sylphy (2.0L Automatic YK1234 Green) respectively whereas the European models are BMW S-1 (3.0L Automatic MN3456 Blue) and Jaguar (1.3L Manual TR2317 Red). The four pieces of data within the brackets are engine size, mode of transmission, registration number and color respectively.

Solution

Frames Frames are structures that represent knowledge about a limited aspect of the world. Like the concepts in many of the semantic network representations, frames are descriptions of objects. The descriptions in a frame are called slots.

Frames Frames implement semantic networks. They add procedural attachment A frame has slots and slots have values A frame may be generic i.e. it describes a class of objects A frame may be an instance Frames can inherit properties from generic frames

Example

Propositional Logics Terms to be discussed Consistency Validity Problem Solving using Semantic Tableaux (Truth Trees, truth tables)

Logics A logic statement is one that can only be expressed as True or False. Expressed as an Inference that can only be one of two values. Critical to the ability of a computer to reason. Eg. The Wumpus is dead The Wumpus is not dead Statements can be a conjunction of many statements. Logics consists of Syntax Describes how to make statements Semantics Specify the constraints on how statements relates to each other Proof Theory Set of rules for evaluating the outcome of a set of statements.

Propositional Logics The term proposition is synonymous with statement. also known as sentential logic and Statement Logic. studies ways of combining proposition to form more complicated proposition Eg. Paris is the capital of France Paris has a population of over two million. Paris is the capital of France and Paris has a population of over two million. Use uppercase symbols to represent proposition, facts etc, which may be either true or false.

Language Syntax The logical signs ‘^’ - And, 'v‘ - Or, '→‘ – Implies, (If…. Then…) '↔‘ – equivalent (Biconditional, If and only if), '¬' - Not Paris is the capital of France and Paris has a population of over two million. Can be written as C ^ P The order of precedence in propositional logic is (from highest to lowest): ¬ , And, V, →, and ↔. Hence ¬P V Q ^ R → S is equivalent to ((¬ P) V (Q ^ R)) → S.

Eg represent in Propositional Logic statements. If the violinist plays the concerto then crowds will come if prices are not too high. If the violinist plays the concerto the prices will not be too high. Therefore if the violinist plays the concerto crowds will come. P = “The violinist plays the piano” C = “Crowds will come” H = “Prices are too high”

Language Semantics Truth Table Describe the meanings of the symbols used in the language. P Q ¬P P and Q P V Q P → Q P ↔ Q F F T F F T T F T T F T T F T F F F T F F T T F T T T T Truth tables define the semantics of the PL sentences. propositional logic does not require any relation of causation or relevance between sentences P andQ.

Consistency A collection of statements is considered consistent if the statements can all be true simultaneously. Anding all statements results in a true outcome. Eg. Prove if consistent If the violinist plays the concerto then crowds will come if prices are not too high. If the violinist plays the concerto the prices will not be too high. Therefore if the violinist plays the concerto crowds will come.

Consistency Eg. Prove if consistent Sales of houses fall off if interest rates rise. Auctioneers are not happy if sales of houses fall off. Interest rates are rising. Auctioneers are happy.

Soln. S = “Sales of houses fall off R = “Interest Rates rise H = “Auctioneer are happy” R -> S, S -> -H, R, H To see if the statements are consistent, we check if the conjunction results in true.

Validity Statements are valid if the conjunction (AND) of the statements implies the conclusion. Can the conclusion follows logically from the statements. Different methods of proving Validity. Truth Tree Refutation Strategy CounterModel Approach

Validity How to check Eg prove validity of the following statements: Use Truth table Eg prove validity of the following statements: P V H, -H, =>P

Refutation Strategy To check whether an argument is valid we need to find if the negation (opposite) of the conclusion is incompatible with the premises using a truth table. Ie, does the conjunction of the negated conclusion and the premise results in a false

Example 1 If the violinist plays the concerto then crowds will come if prices are not too high. If the violinist plays the concerto the prices will not be too high. Therefore if the violinist plays the concerto crowds will come. Statements are : P -> (-H -> C) P -> -H P -> C (Conclusion) Negate conclusion and test if conjunction of all three results in a false

Example 2 IF the Reggae Boyz win the match then their supporters will be happy. The supporters will drink too much if they are not happy. Therefore if the supporters do not drink too much the Reggae Boyz will win the match. Prove Consistency and Validity

R = “Reggae Boyz will win the match” H = “The supporters will be happy” D = “The supporters will drink too much” Statements would be: W -> H -H -> D Therefore –D -> W

Exercise 5 If Jamaica reached the World Cup Finals then either Brazil slipped up o France played very well. Brazil did not slip up unless Jamaica reached the World Cup Finals. France did not play very well. Therefore Jamaica reached the World Cup Finals if and only if Brazil slipped up.

Exercise 4 Convert the following sentences in propositional logic and determine whether or not the conclusions are valid by the use of a truth tree “If Alice wins the nomination, she will be happy. If she is happy, she is not a good campaigner. But if she loses the nomination, she will lose the confidence of the party. She is not a good campaigner if she loses the confidence of the party. If she is not a good campaigner, then she should resign from the party. Therefore, she should resign from the party.” Using the following propositional symbols N;H;C; P;R). N - Alice wins the nomination; H - Alice is happy; C - Alice is a good campaigner; P - Alice loses the confidence of the party; R - Alice should resign.

Example 5 If the teller had pushed the alarm button, the vault would have locked automatically and the police would have arrived within three minutes. Had the police arrived within three minutes, the robbers' car would have been overtaken. But the robbers' car was not overtaken. Therefore the teller did not push the alarm button.