SlideShare a Scribd company logo
1 of 24
What is Knowledge Representation (KR)
• A knowledge representation is most fundamentally a surrogate, a
substitute for the thing itself, used to enable an entity to determine
consequences by reasoning about the world.
• It is a set of ontological commitments, i.e., an answer to the question: In
what terms should I think about the world?
• It is a fragmentary theory of intelligent reasoning, expressed in terms of
three components:
• the representation's fundamental conception of intelligent
reasoning;
• the set of inferences the representation sanctions;
• the set of inferences it recommends.
Cont…
• It is a medium for pragmatically efficient computation, i.e., the
computational environment in which reasoning is accomplished.
• One contribution to this pragmatic efficiency is supplied by the guidance a
representation provides for organizing information so as to facilitate making
the recommended inferences.
• It is a medium of human expression, i.e., a language in which we say
things about the world.
What is KR
• If A represents B, then A stands for B and is usually more easily
accessible than B.
• We are interested in symbolic representations
• Symbolic representations of propositions or statements that are
believed by some agent.
What is a Logic?
• A language with concrete rules
• No ambiguity in representation (may be other errors!)
• Allows unambiguous communication and processing
• Very unlike natural languages e.g. English
• Many ways to translate between languages
• A statement can be represented in different logics
• And perhaps differently in same logic
• Expressiveness of a logic
• How much can we say in this language?
• Not to be confused with logical reasoning
• Logics are languages, reasoning is a process (may use logic)
Syntax and Semantics
• Syntax
• Rules for constructing legal sentences in the logic
• Which symbols we can use (English: letters, punctuation)
• How we are allowed to combine symbols
• Semantics
• How we interpret (read) sentences in the logic
• Assigns a meaning to each sentence
• Example: “All lecturers are seven foot tall”
• A valid sentence (syntax)
• And we can understand the meaning (semantics)
• This sentence happens to be false (there is a counterexample)
Propositional Logic
• Syntax
• Propositions, e.g. “it is wet”
• Connectives: and, or, not, implies, iff (equivalent)
• Brackets, T (true) and F (false)
• Semantics (Classical AKA Boolean)
• Define how connectives affect truth
• “P and Q” is true if and only if P is true and Q is true
• Use truth tables to work out the truth of statements
Predicate Logic
• Propositional logic combines atoms
• An atom contains no propositional connectives
• Have no structure (today_is_wet, john_likes_apples)
• Predicates allow us to talk about objects
• Properties: is_wet(today)
• Relations: likes(john, apples)
• True or false
• In predicate logic each atom is a predicate
• e.g. first order logic, higher-order logic
First Order Logic
• More expressive logic than propositional
• Used in this course (Lecture 6 on representation in FOL)
• Constants are objects: john, apples
• Predicates are properties and relations:
• likes(john, apples)
• Functions transform objects:
• likes(john, fruit_of(apple_tree))
• Variables represent any object: likes(X, apples)
• Quantifiers qualify values of variables
• True for all objects (Universal): X. likes(X, apples)
• Exists at least one object (Existential): X. likes(X, apples)
Example: FOL Sentence
• “Every rose has a thorn”
• For all X
• if (X is a rose)
• then there exists Y
• (X has Y) and (Y is a thorn)
Example: FOL Sentence
• “On Mondays and Wednesdays I go to John’s house for dinner”
Note the change from “and” to “or”
Translating is problematic
Higher Order Logic
• More expressive than first order
• Functions and predicates are also objects
• Described by predicates: binary(addition)
• Transformed by functions: differentiate(square)
• Can quantify over both
• E.g. define red functions as having zero at 17
Logic is a Good Representation
• Fairly easy to do the translation when possible
• Branches of mathematics devoted to it
• It enables us to do logical reasoning
• Tools and techniques come for free
• Basis for programming languages
• Prolog uses logic programs (a subset of FOL)
• Prolog based on HOL
Non-Logical Representations?
• Production rules
• Semantic networks
• Conceptual graphs
• Frames
• Logic representations have restricitions and can be hard to work with
• Many AI researchers searched for better representations
Production Rules
• Rule set of <condition,action> pairs
• “if condition then action”
• Match-resolve-act cycle
• Match: Agent checks if each rule’s condition holds
• Resolve:
• Multiple production rules may fire at once (conflict set)
• Agent must choose rule from set (conflict resolution)
• Act: If so, rule “fires” and the action is carried out
• Working memory:
• rule can write knowledge to working memory
• knowledge may match and fire other rules
Production Rules Example
• IF (at bus stop AND bus arrives) THEN action(get on the bus)
• IF (on bus AND not paid AND have oyster card) THEN action(pay with
oyster) AND add(paid)
• IF (on bus AND paid AND empty seat) THEN sit down
• conditions and actions must be clearly defined
• can easily be expressed in first order logic!
Semantic Data Models
• High level model of model of conceptual model
• Not tied to implementation concerns
• Focus on
• expressiveness
• Simplicity
• concise
• formality
Conceptual Graphs
• Semantic network where each graph represents a single proposition
• Concept nodes can be
• Concrete (visualisable) such as restaurant, my dog Spot
• Abstract (not easily visualisable) such as anger
• Edges do not have labels
• Instead, conceptual relation nodes
• Easy to represent relations between multiple objects
Semantic Nets
• Nodes represent Objects
• Links or Arcs represent Relationships
• “instance of” - set membership
• “is a” - inheritance
• “ has a” - attribute descriptors
• “part of” - aggregation
Has a
Part-of
Instance of
Is a
Semantic Nets
Advantages Disadvantages
• Flexible
• easy to understand
• support inheritance
• “natural” way to represent
knowledge
• Hard to deal with exceptions
• procedural knowledge difficult
to represent
• no standards for defining nodes
or relationships
Frame Representations
• Semantic networks where nodes have structure
• Frame with a number of slots (age, height, ...)
• Each slot stores specific item of information
• When agent faces a new situation
• Slots can be filled in (value may be another frame)
• Filling in may trigger actions
• May trigger retrieval of other frames
• Inheritance of properties between frames
• Very similar to objects in OOP
Frames
Flexibility in Frames
• Slots in a frame can contain
• Information for choosing a frame in a situation
• Relationships between this and other frames
• Procedures to carry out after various slots filled
• Default information to use where input is missing
• Blank slots: left blank unless required for a task
• Other frames, which gives a hierarchy
• Can also be expressed in first order logic
chapter2 Know.representation.pptx

More Related Content

Similar to chapter2 Know.representation.pptx

Lexical Semantics, Semantic Similarity and Relevance for SEO
Lexical Semantics, Semantic Similarity and Relevance for SEOLexical Semantics, Semantic Similarity and Relevance for SEO
Lexical Semantics, Semantic Similarity and Relevance for SEOKoray Tugberk GUBUR
 
lexical-semantics-221118101910-ccd46ac3.pdf
lexical-semantics-221118101910-ccd46ac3.pdflexical-semantics-221118101910-ccd46ac3.pdf
lexical-semantics-221118101910-ccd46ac3.pdfGagu6
 
Representation of syntax, semantics and Predicate logics
Representation of syntax, semantics and Predicate logicsRepresentation of syntax, semantics and Predicate logics
Representation of syntax, semantics and Predicate logicschauhankapil
 
Dialogue based Meaning Negotiation
Dialogue based Meaning NegotiationDialogue based Meaning Negotiation
Dialogue based Meaning NegotiationTerry Payne
 
Word vectorization(embedding) with nnlm
Word vectorization(embedding) with nnlmWord vectorization(embedding) with nnlm
Word vectorization(embedding) with nnlmhyunsung lee
 
DH Tools Workshop #1: Text Analysis
DH Tools Workshop #1:  Text AnalysisDH Tools Workshop #1:  Text Analysis
DH Tools Workshop #1: Text Analysiscjbuckner
 
Possible Word Representation
Possible Word RepresentationPossible Word Representation
Possible Word Representationchauhankapil
 
Effective Semantics for Engineering NLP Systems
Effective Semantics for Engineering NLP SystemsEffective Semantics for Engineering NLP Systems
Effective Semantics for Engineering NLP SystemsAndre Freitas
 
Foundation_Logic_1.pptx discrete mathematics
Foundation_Logic_1.pptx discrete mathematicsFoundation_Logic_1.pptx discrete mathematics
Foundation_Logic_1.pptx discrete mathematicsSherwinSangalang3
 
Business ontologies
Business ontologiesBusiness ontologies
Business ontologiesMike Bennett
 
Open IE tutorial 2018
Open IE tutorial 2018Open IE tutorial 2018
Open IE tutorial 2018Andre Freitas
 
Engineering Intelligent NLP Applications Using Deep Learning – Part 1
Engineering Intelligent NLP Applications Using Deep Learning – Part 1Engineering Intelligent NLP Applications Using Deep Learning – Part 1
Engineering Intelligent NLP Applications Using Deep Learning – Part 1Saurabh Kaushik
 
AI NOTES ppt 4.pdf
AI NOTES ppt 4.pdfAI NOTES ppt 4.pdf
AI NOTES ppt 4.pdfARMANVERMA7
 
Logic programming (1)
Logic programming (1)Logic programming (1)
Logic programming (1)Nitesh Singh
 

Similar to chapter2 Know.representation.pptx (20)

Lexical Semantics, Semantic Similarity and Relevance for SEO
Lexical Semantics, Semantic Similarity and Relevance for SEOLexical Semantics, Semantic Similarity and Relevance for SEO
Lexical Semantics, Semantic Similarity and Relevance for SEO
 
lexical-semantics-221118101910-ccd46ac3.pdf
lexical-semantics-221118101910-ccd46ac3.pdflexical-semantics-221118101910-ccd46ac3.pdf
lexical-semantics-221118101910-ccd46ac3.pdf
 
BT02.pptx
BT02.pptxBT02.pptx
BT02.pptx
 
Unit 2.pptx
Unit 2.pptxUnit 2.pptx
Unit 2.pptx
 
Representation of syntax, semantics and Predicate logics
Representation of syntax, semantics and Predicate logicsRepresentation of syntax, semantics and Predicate logics
Representation of syntax, semantics and Predicate logics
 
Dialogue based Meaning Negotiation
Dialogue based Meaning NegotiationDialogue based Meaning Negotiation
Dialogue based Meaning Negotiation
 
Ontologies Fmi 042010
Ontologies Fmi 042010Ontologies Fmi 042010
Ontologies Fmi 042010
 
Word vectorization(embedding) with nnlm
Word vectorization(embedding) with nnlmWord vectorization(embedding) with nnlm
Word vectorization(embedding) with nnlm
 
DH Tools Workshop #1: Text Analysis
DH Tools Workshop #1:  Text AnalysisDH Tools Workshop #1:  Text Analysis
DH Tools Workshop #1: Text Analysis
 
Possible Word Representation
Possible Word RepresentationPossible Word Representation
Possible Word Representation
 
Effective Semantics for Engineering NLP Systems
Effective Semantics for Engineering NLP SystemsEffective Semantics for Engineering NLP Systems
Effective Semantics for Engineering NLP Systems
 
Foundation_Logic_1.pptx discrete mathematics
Foundation_Logic_1.pptx discrete mathematicsFoundation_Logic_1.pptx discrete mathematics
Foundation_Logic_1.pptx discrete mathematics
 
frames.pptx
frames.pptxframes.pptx
frames.pptx
 
Ontology
OntologyOntology
Ontology
 
Business ontologies
Business ontologiesBusiness ontologies
Business ontologies
 
Module_4_2.pptx
Module_4_2.pptxModule_4_2.pptx
Module_4_2.pptx
 
Open IE tutorial 2018
Open IE tutorial 2018Open IE tutorial 2018
Open IE tutorial 2018
 
Engineering Intelligent NLP Applications Using Deep Learning – Part 1
Engineering Intelligent NLP Applications Using Deep Learning – Part 1Engineering Intelligent NLP Applications Using Deep Learning – Part 1
Engineering Intelligent NLP Applications Using Deep Learning – Part 1
 
AI NOTES ppt 4.pdf
AI NOTES ppt 4.pdfAI NOTES ppt 4.pdf
AI NOTES ppt 4.pdf
 
Logic programming (1)
Logic programming (1)Logic programming (1)
Logic programming (1)
 

Recently uploaded

How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxAnaBeatriceAblay2
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 

Recently uploaded (20)

How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 

chapter2 Know.representation.pptx

  • 1. What is Knowledge Representation (KR) • A knowledge representation is most fundamentally a surrogate, a substitute for the thing itself, used to enable an entity to determine consequences by reasoning about the world. • It is a set of ontological commitments, i.e., an answer to the question: In what terms should I think about the world? • It is a fragmentary theory of intelligent reasoning, expressed in terms of three components: • the representation's fundamental conception of intelligent reasoning; • the set of inferences the representation sanctions; • the set of inferences it recommends.
  • 2. Cont… • It is a medium for pragmatically efficient computation, i.e., the computational environment in which reasoning is accomplished. • One contribution to this pragmatic efficiency is supplied by the guidance a representation provides for organizing information so as to facilitate making the recommended inferences. • It is a medium of human expression, i.e., a language in which we say things about the world.
  • 3. What is KR • If A represents B, then A stands for B and is usually more easily accessible than B. • We are interested in symbolic representations • Symbolic representations of propositions or statements that are believed by some agent.
  • 4. What is a Logic? • A language with concrete rules • No ambiguity in representation (may be other errors!) • Allows unambiguous communication and processing • Very unlike natural languages e.g. English • Many ways to translate between languages • A statement can be represented in different logics • And perhaps differently in same logic • Expressiveness of a logic • How much can we say in this language? • Not to be confused with logical reasoning • Logics are languages, reasoning is a process (may use logic)
  • 5. Syntax and Semantics • Syntax • Rules for constructing legal sentences in the logic • Which symbols we can use (English: letters, punctuation) • How we are allowed to combine symbols • Semantics • How we interpret (read) sentences in the logic • Assigns a meaning to each sentence • Example: “All lecturers are seven foot tall” • A valid sentence (syntax) • And we can understand the meaning (semantics) • This sentence happens to be false (there is a counterexample)
  • 6. Propositional Logic • Syntax • Propositions, e.g. “it is wet” • Connectives: and, or, not, implies, iff (equivalent) • Brackets, T (true) and F (false) • Semantics (Classical AKA Boolean) • Define how connectives affect truth • “P and Q” is true if and only if P is true and Q is true • Use truth tables to work out the truth of statements
  • 7. Predicate Logic • Propositional logic combines atoms • An atom contains no propositional connectives • Have no structure (today_is_wet, john_likes_apples) • Predicates allow us to talk about objects • Properties: is_wet(today) • Relations: likes(john, apples) • True or false • In predicate logic each atom is a predicate • e.g. first order logic, higher-order logic
  • 8. First Order Logic • More expressive logic than propositional • Used in this course (Lecture 6 on representation in FOL) • Constants are objects: john, apples • Predicates are properties and relations: • likes(john, apples) • Functions transform objects: • likes(john, fruit_of(apple_tree)) • Variables represent any object: likes(X, apples) • Quantifiers qualify values of variables • True for all objects (Universal): X. likes(X, apples) • Exists at least one object (Existential): X. likes(X, apples)
  • 9. Example: FOL Sentence • “Every rose has a thorn” • For all X • if (X is a rose) • then there exists Y • (X has Y) and (Y is a thorn)
  • 10. Example: FOL Sentence • “On Mondays and Wednesdays I go to John’s house for dinner” Note the change from “and” to “or” Translating is problematic
  • 11. Higher Order Logic • More expressive than first order • Functions and predicates are also objects • Described by predicates: binary(addition) • Transformed by functions: differentiate(square) • Can quantify over both • E.g. define red functions as having zero at 17
  • 12. Logic is a Good Representation • Fairly easy to do the translation when possible • Branches of mathematics devoted to it • It enables us to do logical reasoning • Tools and techniques come for free • Basis for programming languages • Prolog uses logic programs (a subset of FOL) • Prolog based on HOL
  • 13. Non-Logical Representations? • Production rules • Semantic networks • Conceptual graphs • Frames • Logic representations have restricitions and can be hard to work with • Many AI researchers searched for better representations
  • 14. Production Rules • Rule set of <condition,action> pairs • “if condition then action” • Match-resolve-act cycle • Match: Agent checks if each rule’s condition holds • Resolve: • Multiple production rules may fire at once (conflict set) • Agent must choose rule from set (conflict resolution) • Act: If so, rule “fires” and the action is carried out • Working memory: • rule can write knowledge to working memory • knowledge may match and fire other rules
  • 15. Production Rules Example • IF (at bus stop AND bus arrives) THEN action(get on the bus) • IF (on bus AND not paid AND have oyster card) THEN action(pay with oyster) AND add(paid) • IF (on bus AND paid AND empty seat) THEN sit down • conditions and actions must be clearly defined • can easily be expressed in first order logic!
  • 16. Semantic Data Models • High level model of model of conceptual model • Not tied to implementation concerns • Focus on • expressiveness • Simplicity • concise • formality
  • 17. Conceptual Graphs • Semantic network where each graph represents a single proposition • Concept nodes can be • Concrete (visualisable) such as restaurant, my dog Spot • Abstract (not easily visualisable) such as anger • Edges do not have labels • Instead, conceptual relation nodes • Easy to represent relations between multiple objects
  • 18. Semantic Nets • Nodes represent Objects • Links or Arcs represent Relationships • “instance of” - set membership • “is a” - inheritance • “ has a” - attribute descriptors • “part of” - aggregation
  • 20. Semantic Nets Advantages Disadvantages • Flexible • easy to understand • support inheritance • “natural” way to represent knowledge • Hard to deal with exceptions • procedural knowledge difficult to represent • no standards for defining nodes or relationships
  • 21. Frame Representations • Semantic networks where nodes have structure • Frame with a number of slots (age, height, ...) • Each slot stores specific item of information • When agent faces a new situation • Slots can be filled in (value may be another frame) • Filling in may trigger actions • May trigger retrieval of other frames • Inheritance of properties between frames • Very similar to objects in OOP
  • 23. Flexibility in Frames • Slots in a frame can contain • Information for choosing a frame in a situation • Relationships between this and other frames • Procedures to carry out after various slots filled • Default information to use where input is missing • Blank slots: left blank unless required for a task • Other frames, which gives a hierarchy • Can also be expressed in first order logic