SlideShare a Scribd company logo
1 of 27
Knowledge representation
 AI is the area of computer science focusing on
creating machine that can engage on
behaviours that humans consider intelligent.
 Knowledge can be managed by knowledge
engineering which includes knowledge
acquisition, knowledge representation and
knowledge manipulation.
Continue
 Knowledge required by four conditions -
– Wisdom
– Knowledge
– Information
– Data
Types of knowledge
 Domain Dependent Knowledge
 Domain Independent knowledge
Choosing a Representation
 For certain problem solving techniques
– ‘Best’ representation already known
– Often a requirement of the technique
– Or a requirement of the programming language (e.g. Prolog)
 Examples
– First order theorem proving… first order logic
– Inductive logic programming… logic programs
– Neural networks learning… neural networks
 Some general representation schemes
– Suitable for many different (and new) AI applications
Some General Representations
1. Logical Representations
2. Production Rules
3. Semantic Networks
• Conceptual graphs, frames
1. Description Logics (see textbook)
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
 Much harder to reason with
Beyond True and False
 Multi-valued logics
– More than two truth values
– e.g., true, false & unknown
– Fuzzy logic uses probabilities, truth value in [0,1]
 Modal logics
– Modal operators define mode for propositions
– Epistemic logics (belief)
 e.g. p (necessarily p), p (possibly p), …
– Temporal logics (time)
 e.g. p (always p), p (eventually p), …
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!
Graphical Representation
 Humans draw diagrams all the time, e.g.
– Causal relationships
– And relationships between ideas
Graphical Representation
 Graphs easy to store in a computer
 To be of any use must impose a formalism
– Jason is 15, Bryan is 40, Arthur is 70, Jim is 74
– How old is Julia?
Semantic Networks
 Because the syntax is the same
– We can guess that Julia’s age is similar to Bryan’s
 Formalism imposes restricted syntax
Semantic Networks
 Graphical representation (a graph)
– Links indicate subset, member, relation, ...
 Equivalent to logical statements (usually FOL)
– Easier to understand than FOL?
– Specialised SN reasoning algorithms can be faster
 Example: natural language understanding
– Sentences with same meaning have same graphs
– e.g. Conceptual Dependency Theory (Schank)
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
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
Example: Frame Representation
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
Representation & Logic
 AI wanted “non-logical representations”
– Production rules
– Semantic networks
 Conceptual graphs, frames
 But all can be expressed in first order logic!
 Best of both worlds
– Logical reading ensures representation well-defined
– Representations specialised for applications
– Can make reasoning easier, more intuitive

More Related Content

More from FellowBuddy.com

Business Studies Class xii
Business Studies Class xiiBusiness Studies Class xii
Business Studies Class xiiFellowBuddy.com
 
Risk and Risk Aversion FM
Risk and Risk Aversion FMRisk and Risk Aversion FM
Risk and Risk Aversion FMFellowBuddy.com
 
Refrigeration Engineering Lecture Notes
Refrigeration Engineering Lecture NotesRefrigeration Engineering Lecture Notes
Refrigeration Engineering Lecture NotesFellowBuddy.com
 
Production and Operation Management Lecture Notes
Production and Operation Management Lecture NotesProduction and Operation Management Lecture Notes
Production and Operation Management Lecture NotesFellowBuddy.com
 
Leadership Theories {HR}
Leadership Theories {HR}Leadership Theories {HR}
Leadership Theories {HR}FellowBuddy.com
 
Interpersonal Communication Skills {HR}
Interpersonal Communication Skills {HR}Interpersonal Communication Skills {HR}
Interpersonal Communication Skills {HR}FellowBuddy.com
 
Industrial Dispute Act, 1947 {HR}
Industrial Dispute Act, 1947 {HR}Industrial Dispute Act, 1947 {HR}
Industrial Dispute Act, 1947 {HR}FellowBuddy.com
 
Factories act, 1948 {HR}
Factories act, 1948 {HR}Factories act, 1948 {HR}
Factories act, 1948 {HR}FellowBuddy.com
 
Ratio and Proportion, Indices and Logarithm Part 4
Ratio and Proportion, Indices and Logarithm Part 4Ratio and Proportion, Indices and Logarithm Part 4
Ratio and Proportion, Indices and Logarithm Part 4FellowBuddy.com
 
Ratio and Proportion, Indices and Logarithm Part 2
Ratio and Proportion, Indices and Logarithm Part 2Ratio and Proportion, Indices and Logarithm Part 2
Ratio and Proportion, Indices and Logarithm Part 2FellowBuddy.com
 
Ratio and Proportion, Indices and Logarithm Part 1
Ratio and Proportion, Indices and Logarithm Part 1Ratio and Proportion, Indices and Logarithm Part 1
Ratio and Proportion, Indices and Logarithm Part 1FellowBuddy.com
 
Limits and Continuity - Intuitive Approach part 3
Limits and Continuity - Intuitive Approach part 3Limits and Continuity - Intuitive Approach part 3
Limits and Continuity - Intuitive Approach part 3FellowBuddy.com
 
Limits and Continuity - Intuitive Approach part 2
Limits and Continuity - Intuitive Approach part 2Limits and Continuity - Intuitive Approach part 2
Limits and Continuity - Intuitive Approach part 2FellowBuddy.com
 
Limits and Continuity - Intuitive Approach part 1
Limits and Continuity - Intuitive Approach part 1Limits and Continuity - Intuitive Approach part 1
Limits and Continuity - Intuitive Approach part 1FellowBuddy.com
 
Introduction to Logarithm
Introduction to LogarithmIntroduction to Logarithm
Introduction to LogarithmFellowBuddy.com
 

More from FellowBuddy.com (20)

Business Studies Class xii
Business Studies Class xiiBusiness Studies Class xii
Business Studies Class xii
 
Risk and Risk Aversion FM
Risk and Risk Aversion FMRisk and Risk Aversion FM
Risk and Risk Aversion FM
 
Refrigeration Engineering Lecture Notes
Refrigeration Engineering Lecture NotesRefrigeration Engineering Lecture Notes
Refrigeration Engineering Lecture Notes
 
Production and Operation Management Lecture Notes
Production and Operation Management Lecture NotesProduction and Operation Management Lecture Notes
Production and Operation Management Lecture Notes
 
Strategic HRM {HR}
Strategic HRM {HR}Strategic HRM {HR}
Strategic HRM {HR}
 
Leadership Theories {HR}
Leadership Theories {HR}Leadership Theories {HR}
Leadership Theories {HR}
 
Interpersonal Communication Skills {HR}
Interpersonal Communication Skills {HR}Interpersonal Communication Skills {HR}
Interpersonal Communication Skills {HR}
 
Industrial Dispute Act, 1947 {HR}
Industrial Dispute Act, 1947 {HR}Industrial Dispute Act, 1947 {HR}
Industrial Dispute Act, 1947 {HR}
 
Factories act, 1948 {HR}
Factories act, 1948 {HR}Factories act, 1948 {HR}
Factories act, 1948 {HR}
 
Ratio and Proportion, Indices and Logarithm Part 4
Ratio and Proportion, Indices and Logarithm Part 4Ratio and Proportion, Indices and Logarithm Part 4
Ratio and Proportion, Indices and Logarithm Part 4
 
Ratio and Proportion, Indices and Logarithm Part 2
Ratio and Proportion, Indices and Logarithm Part 2Ratio and Proportion, Indices and Logarithm Part 2
Ratio and Proportion, Indices and Logarithm Part 2
 
Ratio and Proportion, Indices and Logarithm Part 1
Ratio and Proportion, Indices and Logarithm Part 1Ratio and Proportion, Indices and Logarithm Part 1
Ratio and Proportion, Indices and Logarithm Part 1
 
Limits and Continuity - Intuitive Approach part 3
Limits and Continuity - Intuitive Approach part 3Limits and Continuity - Intuitive Approach part 3
Limits and Continuity - Intuitive Approach part 3
 
Limits and Continuity - Intuitive Approach part 2
Limits and Continuity - Intuitive Approach part 2Limits and Continuity - Intuitive Approach part 2
Limits and Continuity - Intuitive Approach part 2
 
Limits and Continuity - Intuitive Approach part 1
Limits and Continuity - Intuitive Approach part 1Limits and Continuity - Intuitive Approach part 1
Limits and Continuity - Intuitive Approach part 1
 
Sampling Theory Part 3
Sampling Theory Part 3Sampling Theory Part 3
Sampling Theory Part 3
 
Sampling Theory Part 2
Sampling Theory Part 2Sampling Theory Part 2
Sampling Theory Part 2
 
Sampling Theory Part 1
Sampling Theory Part 1Sampling Theory Part 1
Sampling Theory Part 1
 
Introduction to Logarithm
Introduction to LogarithmIntroduction to Logarithm
Introduction to Logarithm
 
Introduction to Indices
Introduction to IndicesIntroduction to Indices
Introduction to Indices
 

Recently uploaded

4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinojohnmickonozaleda
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxPoojaSen20
 

Recently uploaded (20)

4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
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🔝
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipino
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
 

Knowledge Representation {Artificial Intelligence}

  • 1. Knowledge representation  AI is the area of computer science focusing on creating machine that can engage on behaviours that humans consider intelligent.  Knowledge can be managed by knowledge engineering which includes knowledge acquisition, knowledge representation and knowledge manipulation.
  • 2. Continue  Knowledge required by four conditions - – Wisdom – Knowledge – Information – Data
  • 3. Types of knowledge  Domain Dependent Knowledge  Domain Independent knowledge
  • 4. Choosing a Representation  For certain problem solving techniques – ‘Best’ representation already known – Often a requirement of the technique – Or a requirement of the programming language (e.g. Prolog)  Examples – First order theorem proving… first order logic – Inductive logic programming… logic programs – Neural networks learning… neural networks  Some general representation schemes – Suitable for many different (and new) AI applications
  • 5. Some General Representations 1. Logical Representations 2. Production Rules 3. Semantic Networks • Conceptual graphs, frames 1. Description Logics (see textbook)
  • 6. 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)
  • 7. 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)
  • 8. 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
  • 9. 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
  • 10. 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)
  • 11. 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)
  • 12. 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
  • 13. 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  Much harder to reason with
  • 14. Beyond True and False  Multi-valued logics – More than two truth values – e.g., true, false & unknown – Fuzzy logic uses probabilities, truth value in [0,1]  Modal logics – Modal operators define mode for propositions – Epistemic logics (belief)  e.g. p (necessarily p), p (possibly p), … – Temporal logics (time)  e.g. p (always p), p (eventually p), …
  • 15. 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
  • 16. 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
  • 17. 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
  • 18. 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!
  • 19. Graphical Representation  Humans draw diagrams all the time, e.g. – Causal relationships – And relationships between ideas
  • 20. Graphical Representation  Graphs easy to store in a computer  To be of any use must impose a formalism – Jason is 15, Bryan is 40, Arthur is 70, Jim is 74 – How old is Julia?
  • 21. Semantic Networks  Because the syntax is the same – We can guess that Julia’s age is similar to Bryan’s  Formalism imposes restricted syntax
  • 22. Semantic Networks  Graphical representation (a graph) – Links indicate subset, member, relation, ...  Equivalent to logical statements (usually FOL) – Easier to understand than FOL? – Specialised SN reasoning algorithms can be faster  Example: natural language understanding – Sentences with same meaning have same graphs – e.g. Conceptual Dependency Theory (Schank)
  • 23. 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
  • 24. 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
  • 26. 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
  • 27. Representation & Logic  AI wanted “non-logical representations” – Production rules – Semantic networks  Conceptual graphs, frames  But all can be expressed in first order logic!  Best of both worlds – Logical reading ensures representation well-defined – Representations specialised for applications – Can make reasoning easier, more intuitive