SlideShare a Scribd company logo
1 of 34
CSE 412: Artificial IntelligenceCSE 412: Artificial Intelligence
Fall 2018Fall 2018
Topic – 6:Topic – 6: Logical AgentsLogical Agents
Tajim Md. Niamat Ullah Akhund
Lecturer
Department of Computer Science and Engineering
Daffodil International University
Email: tajim.cse@diu.edu.bd
Knowledge-Based AgentsKnowledge-Based Agents
LogicLogic
Propositional Logic: A Very Simple LogicPropositional Logic: A Very Simple Logic
 SyntaxSyntax
 SemanticsSemantics
 A simple knowledge baseA simple knowledge base
 InferenceInference
 Equivalence, validity, and satisfiabilityEquivalence, validity, and satisfiability
Topic ContentsTopic Contents
Architecture of a
Simple Intelligent Agent
Environment Agent
Sensors
Effectors
Reasoning &
Decisions Making
Model of World
(being updated)
List of
Possible Actions
Prior Knowledge
about the World
Goals/Utility
33
Knowledge Based Agent
 Knowledge base:
– A knowledge base (abbreviated KB or kb) is a special
kind of database for knowledge management.
– A knowledge base is an information repository that
provides a means for information to be collected,
organized, shared, searched and utilized.
– The part of an expert system that contains the facts
and rules needed to solve problems.
– A collection of facts and rules for problem solving.
44
Knowledge Based Agent
 The agent must be able to:
– represent states, actions, etc.
– incorporate new percepts
– update internal representation of world
– deduce hidden properties of world
– deduce appropriate actions
 One of the core problems in developing an
intelligent agent is knowledge representation:
– how to represent knowledge
– how to reason using that knowledge
55
Knowledge Bases (KB)
 A knowledge base:
– contains the domain-specific content for an agent
– is a set of representations of facts about the world
 is a set of sentences in a formal language
 Building the KB:
– learning: agent discovers what it knows
– telling: agent is given what it knows (declarative)
66
Knowledge Bases (KB)
 Main actions of intelligent agent:
– TELL information to KB in the form of percept
– ASK KB what to do in the form of action
 Answers should follow from KB.
Agent should not make things up!
 An inference engine is composed of domain-
independent algorithms that are used to
determine what follows from the knowledge
base.
77
Knowledge Bases (KB)
 View of agent (levels of abstraction):
– knowledge level:
what the agent knows at a high level
– logic level:
level of sentence encoding
– implementation level:
level that runs on the architecture,
detail of data structures and algorithms.
88
Algorithm
99
General Logic
 The agent internally represents its
world/environment in its knowledge base.
The Sky is blue.
The sun is shining
representation in agent
world/environment
 Sentences are representations in some language.
 Facts are claims about the world that are true/false.
Sentences
Facts
1010
General Logic
 Sentences represent facts in the world.
Sentences
Facts
representation in agent
world/environment
 Meaning connects sentences to their facts.
Meaning / Interpretation
 A sentence is true if what it represents is
actually the case in the current state of world.
Time flies.
1111
General Logic
repr.
world
Knowledge Conclusions
infer
follows
Facts New Facts
 Proper reasoning ensures that conclusions
inferred from the KB are consistent with reality.
That means they represent new facts that actually
follow from the original facts (represented by sentences
in the KB).
1212
Conclusions
General Logic
repr.
world
Knowledge
infer
 Computers don't know the meaning.
 A mechanical inference procedure is needed that derives
conclusions without needing to know the meaning of the
sentences.
Sentences New Sentences
entails
follows
Facts New Facts
1313
Entailment
 KB ╞ α
Knowledge base KB entails sentence α
if and only if α is true in all worlds where KB is true
1414
Entailment
 KB ╞ α
Knowledge base KB entails sentence α
if and only if α is true in all worlds where KB is true
 For example:
KB: "sky is blue" = true, "sun is shining" = true
entails α: "sky is blue and sun is shining" = true
– α represents a true fact
as long as facts represented in KB are true
– if the sky was actually cloudy then KB isn't the true world state
then α wouldn't represent a true fact
 Entailment requires sentences in KB to be true.
1515
Logical Inference
 Inference procedure can:
– generate new sentences α entailed by KB
– determine whether or not a given sentence α
is entailed by KB (i.e. prove α)
1616
General Logic
 Logics are formal languages for representing
information from which conclusions can be drawn.
1717
General Logic
 Logics are characterized by
what they commit to as "primitives".
Logic What Exists in World Knowledge States
Propositional facts true/false/unknown
First-Order facts, objects, relations true/false/unknown
Temporal facts, objects,
relations, times
true/false/unknown
Probability Theory facts degree of belief 0..1
Fuzzy degree of truth degree of belief 0..1
1818
Propositional Logic (PL) Basics
 propositions: assertions about an aspect of a world
that can be assigned either a true or false value
– e.g. SkyIsCloudy, JimIsHappy
– True, False are propositions meaning true and false
1919
Logical Connectives of PL
 ¬ S negation (not)
 S1∧S2 conjunction (and)
S1 and S2 are conjuncts
 S1∨S2 disjunction (or)
S1 and S2 are disjuncts
 S1⇒S2 implication/conditional (if-then)
S1 is the antecedent/premise
S2 is the consequent/conclusion
 S1⇔S2 equivalence/biconditional (if and only if)
2020
Syntax of PL
 Models specify truth value for each proposition:
e.g. S1= true, S2= false
 Rules for evaluating truth with respect to model m
¬S is true iff S is false
S1∧S2 is true iff S1 is true and S2 is true
S1∨S2 is true iff S1 is true or S2 is true
S1⇒S2 is true iff S1 is true or S2 is true
is true iff S1 is false or S2 is true
is false iff S1 is false and S2 is false
S1⇔S2 is true iff S1⇒S2 is true and S2⇒S1 is true
2121
Truth Tables
A B C
false false false
false false true
false true false
false true true
true false false
true false true
true true false
true true true
Given n symbols,
2n
possible combinations of
truth value assignments.
here each row is an interpretation
2222
Implication Truth Table
A B
false false
false true
true false
true true
A⇒B
true
true
false
true
A⇒B is equivalent to B∨ ¬A
B∨ ¬A
true
true
false
true
2323
Validity
A B C
false false false
false false true
false true false
false true true
true false false
true false true
true true false
true true true
A sentence is valid
if it's true in all interpretations:
P1∨ ¬P1 P1⇒P1 (tautologies)
(i.e. its entire column is true)
A∨ ¬A
true
true
true
true
true
true
true
true
2424
Satisfiability
A B C
false false false
false false true
false true false
false true true
true false false
true false true
true true false
true true true
A sentence is satisfiable
if it's true in some interpretations:
P1∨ ¬P2 P2⇒P1
(i.e. its column is true and false)
A∨ ¬B
true
true
false
false
true
true
true
true
2525
Unsatisfiability
A B C
false false false
false false true
false true false
false true true
true false false
true false true
true true false
true true true
A sentence is unsatisfiable
if it's true in no interpretations:
P1∧ ¬P1 (inconsistent/contradiction)
(i.e. its entire column is false)
C∧ ¬C
false
false
false
false
false
false
false
false
2626
Inference Proof Methods
 Model Checking:
– truth table enumeration
sound and complete for propositional logic
– heuristic search in model space
sound but incomplete
 Application of Syntactic Operations
(i.e. Inference Rules):
– sound generation of new sentences from old
– could use inference rules as operators for search
2727
Inference by Enumeration
LET: KB = A∨C, B∨ ¬C α = A∨B
DOES: KB ╞ α ?
A B C
false false false
false false true
false true false
false true true
true false false
true false true
true true false
true true true
RECALL: The computer
doesn't know the meaning
of the proposition symbols.
So all logically distinct cases
must be checked to prove that
a sentence can be derived
from a KB.
2828
Inference by Enumeration
LET: KB = A∨C, B∨ ¬C α = A∨B
DOES: KB ╞ α ?
A∨C B∨ ¬C KB
false true false
true false false
false true false
true true true
true true true
true false false
true true true
true true true
Rows where all of
sentences in KB
are true are the
models of KB
A B C
false false false
false false true
false true false
false true true
true false false
true false true
true true false
true true true
2929
Inference by Enumeration
LET: KB = A∨C, B∨ ¬C α = A∨B
DOES: KB ╞ α ?
A∨C B∨ ¬C KB
false true false
true false false
false true false
true true true
true true true
true false false
true true true
true true true
α is entailed by KB,
if all models of KB
are models of α,
i.e. all rows where
KB is true, α is true
A B C
false false false
false false true
false true false
false true true
true false false
true false true
true true false
true true true
A∨B
false
false
true
true
true
true
true
true
YES!
In other words:
KB ⇒α is valid.
KB⇒α
true
true
true
true
true
true
true
true
3030
Inference by Enumeration
 Though complete for PL, the proofs using this
enumeration grow exponentially in length as the
number of symbols increases.
 There must be a better way.
 Natural deduction is an inference procedure
that uses sound inference rules to derive new
sentences from the KB and any previously
derived sentences until the conclusion sentence
is derived.
3131
THANKS…
COURTESY:
Md. Tarek Habib
Assistant Professor
Daffodil International
University
********** ********** If You Need Me ********** **********
Mail: tajim.cse@diu.edu.bd
Website: https://www.tajimiitju.blogspot.com
ORCID: https://orcid.org/0000-0002-2834-1507
LinkedIn: https://www.linkedin.com/in/tajimiitju
ResearchGate: https://www.researchgate.net/profile/Tajim_Md_Niamat_Ullah_Akhund
YouTube: https://www.youtube.com/tajimiitju?sub_confirmation=1
SlideShare: https://www.slideshare.net/TajimMdNiamatUllahAk
Facebook: https://www.facebook.com/tajim.mohammad
GitHub: https://github.com/tajimiitju
Google+: https://plus.google.com/+tajimiitju
Gmail: tajim.mohammad.3@gmail.com
Twitter: https://twitter.com/Tajim53
Thank you
Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund

More Related Content

What's hot

Knowledge based agent
Knowledge based agentKnowledge based agent
Knowledge based agentShiwani Gupta
 
Knowledge representation and reasoning
Knowledge representation and reasoningKnowledge representation and reasoning
Knowledge representation and reasoningMaryam Maleki
 
Artificial Intelligence Notes Unit 3
Artificial Intelligence Notes Unit 3Artificial Intelligence Notes Unit 3
Artificial Intelligence Notes Unit 3DigiGurukul
 
Propositional logic
Propositional logicPropositional logic
Propositional logicRushdi Shams
 
Knowledge Representation & Reasoning
Knowledge Representation & ReasoningKnowledge Representation & Reasoning
Knowledge Representation & ReasoningSajid Marwat
 
Probabilistic Reasoning
Probabilistic ReasoningProbabilistic Reasoning
Probabilistic ReasoningJunya Tanaka
 
Forms of learning in ai
Forms of learning in aiForms of learning in ai
Forms of learning in aiRobert Antony
 
Unification and Lifting
Unification and LiftingUnification and Lifting
Unification and LiftingMegha Sharma
 
Logics for non monotonic reasoning-ai
Logics for non monotonic reasoning-aiLogics for non monotonic reasoning-ai
Logics for non monotonic reasoning-aiShaishavShah8
 
Forward and Backward chaining in AI
Forward and Backward chaining in AIForward and Backward chaining in AI
Forward and Backward chaining in AIMegha Sharma
 
First order predicate logic(fopl)
First order predicate logic(fopl)First order predicate logic(fopl)
First order predicate logic(fopl)surbhi jha
 
ProLog (Artificial Intelligence) Introduction
ProLog (Artificial Intelligence) IntroductionProLog (Artificial Intelligence) Introduction
ProLog (Artificial Intelligence) Introductionwahab khan
 
Genetic algorithms in Data Mining
Genetic algorithms in Data MiningGenetic algorithms in Data Mining
Genetic algorithms in Data MiningAtul Khanna
 

What's hot (20)

Knowledge based agent
Knowledge based agentKnowledge based agent
Knowledge based agent
 
Knowledge representation and reasoning
Knowledge representation and reasoningKnowledge representation and reasoning
Knowledge representation and reasoning
 
Artificial Intelligence Notes Unit 3
Artificial Intelligence Notes Unit 3Artificial Intelligence Notes Unit 3
Artificial Intelligence Notes Unit 3
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
Classical Planning
Classical PlanningClassical Planning
Classical Planning
 
Knowledge Representation & Reasoning
Knowledge Representation & ReasoningKnowledge Representation & Reasoning
Knowledge Representation & Reasoning
 
Reasoning in AI
Reasoning in AIReasoning in AI
Reasoning in AI
 
First order logic
First order logicFirst order logic
First order logic
 
AI Lecture 7 (uncertainty)
AI Lecture 7 (uncertainty)AI Lecture 7 (uncertainty)
AI Lecture 7 (uncertainty)
 
Probabilistic Reasoning
Probabilistic ReasoningProbabilistic Reasoning
Probabilistic Reasoning
 
Forms of learning in ai
Forms of learning in aiForms of learning in ai
Forms of learning in ai
 
AI: Logic in AI
AI: Logic in AIAI: Logic in AI
AI: Logic in AI
 
Unification and Lifting
Unification and LiftingUnification and Lifting
Unification and Lifting
 
Predicate logic
 Predicate logic Predicate logic
Predicate logic
 
Logics for non monotonic reasoning-ai
Logics for non monotonic reasoning-aiLogics for non monotonic reasoning-ai
Logics for non monotonic reasoning-ai
 
AI: Learning in AI
AI: Learning in AI AI: Learning in AI
AI: Learning in AI
 
Forward and Backward chaining in AI
Forward and Backward chaining in AIForward and Backward chaining in AI
Forward and Backward chaining in AI
 
First order predicate logic(fopl)
First order predicate logic(fopl)First order predicate logic(fopl)
First order predicate logic(fopl)
 
ProLog (Artificial Intelligence) Introduction
ProLog (Artificial Intelligence) IntroductionProLog (Artificial Intelligence) Introduction
ProLog (Artificial Intelligence) Introduction
 
Genetic algorithms in Data Mining
Genetic algorithms in Data MiningGenetic algorithms in Data Mining
Genetic algorithms in Data Mining
 

Similar to AI Lecture 6 (logical agents)

Topic 5 Logical Agents Types Details.ppt
Topic 5 Logical Agents Types Details.pptTopic 5 Logical Agents Types Details.ppt
Topic 5 Logical Agents Types Details.pptAbdurRahman492820
 
Jarrar.lecture notes.aai.2011s.ch7.p logic
Jarrar.lecture notes.aai.2011s.ch7.p logicJarrar.lecture notes.aai.2011s.ch7.p logic
Jarrar.lecture notes.aai.2011s.ch7.p logicPalGov
 
Artificial intelligent Lec 5-logic
Artificial intelligent Lec 5-logicArtificial intelligent Lec 5-logic
Artificial intelligent Lec 5-logicTaymoor Nazmy
 
Contradiction
ContradictionContradiction
ContradictionUsman Rj
 
Contradiction
ContradictionContradiction
ContradictionUsman Rj
 
AI assagnmebt.docx
AI assagnmebt.docxAI assagnmebt.docx
AI assagnmebt.docxHelinayen
 
Practical Non-Monotonic Reasoning
Practical Non-Monotonic ReasoningPractical Non-Monotonic Reasoning
Practical Non-Monotonic ReasoningGuido Governatori
 
Geometry Section 2-4
Geometry Section 2-4Geometry Section 2-4
Geometry Section 2-4Jimbo Lamb
 
Artificial intelligence knowledge representation and learning
Artificial intelligence knowledge representation and learningArtificial intelligence knowledge representation and learning
Artificial intelligence knowledge representation and learningannmariyajaimon2023
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptxPradeeshSAI
 
Notes discrete math
Notes discrete mathNotes discrete math
Notes discrete mathliyana31
 
Propositions - Discrete Structures
Propositions - Discrete Structures Propositions - Discrete Structures
Propositions - Discrete Structures Drishti Bhalla
 
Lecture notes in_discrete_mathematics
Lecture notes in_discrete_mathematicsLecture notes in_discrete_mathematics
Lecture notes in_discrete_mathematicssaiful26baiust
 

Similar to AI Lecture 6 (logical agents) (20)

Topic 5 Logical Agents Types Details.ppt
Topic 5 Logical Agents Types Details.pptTopic 5 Logical Agents Types Details.ppt
Topic 5 Logical Agents Types Details.ppt
 
Jarrar.lecture notes.aai.2011s.ch7.p logic
Jarrar.lecture notes.aai.2011s.ch7.p logicJarrar.lecture notes.aai.2011s.ch7.p logic
Jarrar.lecture notes.aai.2011s.ch7.p logic
 
Artificial intelligent Lec 5-logic
Artificial intelligent Lec 5-logicArtificial intelligent Lec 5-logic
Artificial intelligent Lec 5-logic
 
Dm1
Dm1Dm1
Dm1
 
Logic
LogicLogic
Logic
 
AI-Unit4.ppt
AI-Unit4.pptAI-Unit4.ppt
AI-Unit4.ppt
 
DM(1).pptx
DM(1).pptxDM(1).pptx
DM(1).pptx
 
Contradiction
ContradictionContradiction
Contradiction
 
Contradiction
ContradictionContradiction
Contradiction
 
2020CSC4331_Lecture6_1.pdf
2020CSC4331_Lecture6_1.pdf2020CSC4331_Lecture6_1.pdf
2020CSC4331_Lecture6_1.pdf
 
AI assagnmebt.docx
AI assagnmebt.docxAI assagnmebt.docx
AI assagnmebt.docx
 
Practical Non-Monotonic Reasoning
Practical Non-Monotonic ReasoningPractical Non-Monotonic Reasoning
Practical Non-Monotonic Reasoning
 
Geometry Section 2-4
Geometry Section 2-4Geometry Section 2-4
Geometry Section 2-4
 
Logic agent
Logic agentLogic agent
Logic agent
 
Artificial intelligence knowledge representation and learning
Artificial intelligence knowledge representation and learningArtificial intelligence knowledge representation and learning
Artificial intelligence knowledge representation and learning
 
C2.0 propositional logic
C2.0 propositional logicC2.0 propositional logic
C2.0 propositional logic
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptx
 
Notes discrete math
Notes discrete mathNotes discrete math
Notes discrete math
 
Propositions - Discrete Structures
Propositions - Discrete Structures Propositions - Discrete Structures
Propositions - Discrete Structures
 
Lecture notes in_discrete_mathematics
Lecture notes in_discrete_mathematicsLecture notes in_discrete_mathematics
Lecture notes in_discrete_mathematics
 

More from Tajim Md. Niamat Ullah Akhund

Artificial intelligence LAB 1 overview & intelligent systems
Artificial intelligence LAB 1   overview & intelligent systemsArtificial intelligence LAB 1   overview & intelligent systems
Artificial intelligence LAB 1 overview & intelligent systemsTajim Md. Niamat Ullah Akhund
 
Matlab lecture 9 – simpson 1,3 and trapezoidal method@taj
Matlab lecture 9 – simpson 1,3 and trapezoidal method@tajMatlab lecture 9 – simpson 1,3 and trapezoidal method@taj
Matlab lecture 9 – simpson 1,3 and trapezoidal method@tajTajim Md. Niamat Ullah Akhund
 
Matlab lecture 8 – newton's forward and backword interpolation@taj copy
Matlab lecture 8 – newton's forward and backword interpolation@taj   copyMatlab lecture 8 – newton's forward and backword interpolation@taj   copy
Matlab lecture 8 – newton's forward and backword interpolation@taj copyTajim Md. Niamat Ullah Akhund
 
Matlab lecture 7 – regula falsi or false position method@taj
Matlab lecture 7 – regula falsi or false position method@tajMatlab lecture 7 – regula falsi or false position method@taj
Matlab lecture 7 – regula falsi or false position method@tajTajim Md. Niamat Ullah Akhund
 
Matlab lecture 3 – commands, the m files, data types, bitwise op, set@taj
Matlab lecture 3 – commands, the m files, data types, bitwise op, set@tajMatlab lecture 3 – commands, the m files, data types, bitwise op, set@taj
Matlab lecture 3 – commands, the m files, data types, bitwise op, set@tajTajim Md. Niamat Ullah Akhund
 
Matlab lecture 2 matlab basic syntax & variables @taj
Matlab lecture 2   matlab basic syntax & variables @tajMatlab lecture 2   matlab basic syntax & variables @taj
Matlab lecture 2 matlab basic syntax & variables @tajTajim Md. Niamat Ullah Akhund
 
Matlab lecture 1 - installation of matlab, introduction and course outline@taj
Matlab lecture 1 - installation of matlab, introduction and course outline@tajMatlab lecture 1 - installation of matlab, introduction and course outline@taj
Matlab lecture 1 - installation of matlab, introduction and course outline@tajTajim Md. Niamat Ullah Akhund
 
Circuit lab 9 verification of maximum power transfer theorem@taj
Circuit lab 9  verification of maximum power transfer theorem@tajCircuit lab 9  verification of maximum power transfer theorem@taj
Circuit lab 9 verification of maximum power transfer theorem@tajTajim Md. Niamat Ullah Akhund
 
Circuit lab 8 verification of thevenin's theorem@taj
Circuit lab 8  verification of thevenin's theorem@tajCircuit lab 8  verification of thevenin's theorem@taj
Circuit lab 8 verification of thevenin's theorem@tajTajim Md. Niamat Ullah Akhund
 
Circuit lab 7 verification of superposition theorem@taj
Circuit lab 7  verification of superposition theorem@tajCircuit lab 7  verification of superposition theorem@taj
Circuit lab 7 verification of superposition theorem@tajTajim Md. Niamat Ullah Akhund
 

More from Tajim Md. Niamat Ullah Akhund (20)

AI Lecture 5 (game playing)
AI Lecture 5 (game playing)AI Lecture 5 (game playing)
AI Lecture 5 (game playing)
 
AI Lecture 4 (informed search and exploration)
AI Lecture 4 (informed search and exploration)AI Lecture 4 (informed search and exploration)
AI Lecture 4 (informed search and exploration)
 
AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)
 
AI Lecture 2 (intelligent agents)
AI Lecture 2 (intelligent agents)AI Lecture 2 (intelligent agents)
AI Lecture 2 (intelligent agents)
 
AI Lecture 1 (introduction)
AI Lecture 1 (introduction)AI Lecture 1 (introduction)
AI Lecture 1 (introduction)
 
Course outline (cse 412 - artificial intelligence)
Course outline (cse   412 - artificial intelligence)Course outline (cse   412 - artificial intelligence)
Course outline (cse 412 - artificial intelligence)
 
Artificial intelligence LAB 1 overview & intelligent systems
Artificial intelligence LAB 1   overview & intelligent systemsArtificial intelligence LAB 1   overview & intelligent systems
Artificial intelligence LAB 1 overview & intelligent systems
 
Matlab lecture 9 – simpson 1,3 and trapezoidal method@taj
Matlab lecture 9 – simpson 1,3 and trapezoidal method@tajMatlab lecture 9 – simpson 1,3 and trapezoidal method@taj
Matlab lecture 9 – simpson 1,3 and trapezoidal method@taj
 
Matlab lecture 8 – newton's forward and backword interpolation@taj copy
Matlab lecture 8 – newton's forward and backword interpolation@taj   copyMatlab lecture 8 – newton's forward and backword interpolation@taj   copy
Matlab lecture 8 – newton's forward and backword interpolation@taj copy
 
Matlab lecture 7 – regula falsi or false position method@taj
Matlab lecture 7 – regula falsi or false position method@tajMatlab lecture 7 – regula falsi or false position method@taj
Matlab lecture 7 – regula falsi or false position method@taj
 
Matlab lecture 6 – newton raphson method@taj copy
Matlab lecture 6 – newton raphson method@taj   copyMatlab lecture 6 – newton raphson method@taj   copy
Matlab lecture 6 – newton raphson method@taj copy
 
Matlab lecture 5 bisection method@taj
Matlab lecture 5  bisection method@tajMatlab lecture 5  bisection method@taj
Matlab lecture 5 bisection method@taj
 
Matlab lecture 4 loops@taj
Matlab lecture 4  loops@tajMatlab lecture 4  loops@taj
Matlab lecture 4 loops@taj
 
Matlab lecture 3 – commands, the m files, data types, bitwise op, set@taj
Matlab lecture 3 – commands, the m files, data types, bitwise op, set@tajMatlab lecture 3 – commands, the m files, data types, bitwise op, set@taj
Matlab lecture 3 – commands, the m files, data types, bitwise op, set@taj
 
Matlab lecture 2 matlab basic syntax & variables @taj
Matlab lecture 2   matlab basic syntax & variables @tajMatlab lecture 2   matlab basic syntax & variables @taj
Matlab lecture 2 matlab basic syntax & variables @taj
 
Matlab lecture 1 - installation of matlab, introduction and course outline@taj
Matlab lecture 1 - installation of matlab, introduction and course outline@tajMatlab lecture 1 - installation of matlab, introduction and course outline@taj
Matlab lecture 1 - installation of matlab, introduction and course outline@taj
 
Circuit lab 10 verification of norton's theorem@taj
Circuit lab 10  verification of norton's theorem@tajCircuit lab 10  verification of norton's theorem@taj
Circuit lab 10 verification of norton's theorem@taj
 
Circuit lab 9 verification of maximum power transfer theorem@taj
Circuit lab 9  verification of maximum power transfer theorem@tajCircuit lab 9  verification of maximum power transfer theorem@taj
Circuit lab 9 verification of maximum power transfer theorem@taj
 
Circuit lab 8 verification of thevenin's theorem@taj
Circuit lab 8  verification of thevenin's theorem@tajCircuit lab 8  verification of thevenin's theorem@taj
Circuit lab 8 verification of thevenin's theorem@taj
 
Circuit lab 7 verification of superposition theorem@taj
Circuit lab 7  verification of superposition theorem@tajCircuit lab 7  verification of superposition theorem@taj
Circuit lab 7 verification of superposition theorem@taj
 

Recently uploaded

HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacingjaychoudhary37
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxvipinkmenon1
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 

Recently uploaded (20)

HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacing
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 

AI Lecture 6 (logical agents)

  • 1. CSE 412: Artificial IntelligenceCSE 412: Artificial Intelligence Fall 2018Fall 2018 Topic – 6:Topic – 6: Logical AgentsLogical Agents Tajim Md. Niamat Ullah Akhund Lecturer Department of Computer Science and Engineering Daffodil International University Email: tajim.cse@diu.edu.bd
  • 2. Knowledge-Based AgentsKnowledge-Based Agents LogicLogic Propositional Logic: A Very Simple LogicPropositional Logic: A Very Simple Logic  SyntaxSyntax  SemanticsSemantics  A simple knowledge baseA simple knowledge base  InferenceInference  Equivalence, validity, and satisfiabilityEquivalence, validity, and satisfiability Topic ContentsTopic Contents
  • 3. Architecture of a Simple Intelligent Agent Environment Agent Sensors Effectors Reasoning & Decisions Making Model of World (being updated) List of Possible Actions Prior Knowledge about the World Goals/Utility 33
  • 4. Knowledge Based Agent  Knowledge base: – A knowledge base (abbreviated KB or kb) is a special kind of database for knowledge management. – A knowledge base is an information repository that provides a means for information to be collected, organized, shared, searched and utilized. – The part of an expert system that contains the facts and rules needed to solve problems. – A collection of facts and rules for problem solving. 44
  • 5. Knowledge Based Agent  The agent must be able to: – represent states, actions, etc. – incorporate new percepts – update internal representation of world – deduce hidden properties of world – deduce appropriate actions  One of the core problems in developing an intelligent agent is knowledge representation: – how to represent knowledge – how to reason using that knowledge 55
  • 6. Knowledge Bases (KB)  A knowledge base: – contains the domain-specific content for an agent – is a set of representations of facts about the world  is a set of sentences in a formal language  Building the KB: – learning: agent discovers what it knows – telling: agent is given what it knows (declarative) 66
  • 7. Knowledge Bases (KB)  Main actions of intelligent agent: – TELL information to KB in the form of percept – ASK KB what to do in the form of action  Answers should follow from KB. Agent should not make things up!  An inference engine is composed of domain- independent algorithms that are used to determine what follows from the knowledge base. 77
  • 8. Knowledge Bases (KB)  View of agent (levels of abstraction): – knowledge level: what the agent knows at a high level – logic level: level of sentence encoding – implementation level: level that runs on the architecture, detail of data structures and algorithms. 88
  • 10. General Logic  The agent internally represents its world/environment in its knowledge base. The Sky is blue. The sun is shining representation in agent world/environment  Sentences are representations in some language.  Facts are claims about the world that are true/false. Sentences Facts 1010
  • 11. General Logic  Sentences represent facts in the world. Sentences Facts representation in agent world/environment  Meaning connects sentences to their facts. Meaning / Interpretation  A sentence is true if what it represents is actually the case in the current state of world. Time flies. 1111
  • 12. General Logic repr. world Knowledge Conclusions infer follows Facts New Facts  Proper reasoning ensures that conclusions inferred from the KB are consistent with reality. That means they represent new facts that actually follow from the original facts (represented by sentences in the KB). 1212
  • 13. Conclusions General Logic repr. world Knowledge infer  Computers don't know the meaning.  A mechanical inference procedure is needed that derives conclusions without needing to know the meaning of the sentences. Sentences New Sentences entails follows Facts New Facts 1313
  • 14. Entailment  KB ╞ α Knowledge base KB entails sentence α if and only if α is true in all worlds where KB is true 1414
  • 15. Entailment  KB ╞ α Knowledge base KB entails sentence α if and only if α is true in all worlds where KB is true  For example: KB: "sky is blue" = true, "sun is shining" = true entails α: "sky is blue and sun is shining" = true – α represents a true fact as long as facts represented in KB are true – if the sky was actually cloudy then KB isn't the true world state then α wouldn't represent a true fact  Entailment requires sentences in KB to be true. 1515
  • 16. Logical Inference  Inference procedure can: – generate new sentences α entailed by KB – determine whether or not a given sentence α is entailed by KB (i.e. prove α) 1616
  • 17. General Logic  Logics are formal languages for representing information from which conclusions can be drawn. 1717
  • 18. General Logic  Logics are characterized by what they commit to as "primitives". Logic What Exists in World Knowledge States Propositional facts true/false/unknown First-Order facts, objects, relations true/false/unknown Temporal facts, objects, relations, times true/false/unknown Probability Theory facts degree of belief 0..1 Fuzzy degree of truth degree of belief 0..1 1818
  • 19. Propositional Logic (PL) Basics  propositions: assertions about an aspect of a world that can be assigned either a true or false value – e.g. SkyIsCloudy, JimIsHappy – True, False are propositions meaning true and false 1919
  • 20. Logical Connectives of PL  ¬ S negation (not)  S1∧S2 conjunction (and) S1 and S2 are conjuncts  S1∨S2 disjunction (or) S1 and S2 are disjuncts  S1⇒S2 implication/conditional (if-then) S1 is the antecedent/premise S2 is the consequent/conclusion  S1⇔S2 equivalence/biconditional (if and only if) 2020
  • 21. Syntax of PL  Models specify truth value for each proposition: e.g. S1= true, S2= false  Rules for evaluating truth with respect to model m ¬S is true iff S is false S1∧S2 is true iff S1 is true and S2 is true S1∨S2 is true iff S1 is true or S2 is true S1⇒S2 is true iff S1 is true or S2 is true is true iff S1 is false or S2 is true is false iff S1 is false and S2 is false S1⇔S2 is true iff S1⇒S2 is true and S2⇒S1 is true 2121
  • 22. Truth Tables A B C false false false false false true false true false false true true true false false true false true true true false true true true Given n symbols, 2n possible combinations of truth value assignments. here each row is an interpretation 2222
  • 23. Implication Truth Table A B false false false true true false true true A⇒B true true false true A⇒B is equivalent to B∨ ¬A B∨ ¬A true true false true 2323
  • 24. Validity A B C false false false false false true false true false false true true true false false true false true true true false true true true A sentence is valid if it's true in all interpretations: P1∨ ¬P1 P1⇒P1 (tautologies) (i.e. its entire column is true) A∨ ¬A true true true true true true true true 2424
  • 25. Satisfiability A B C false false false false false true false true false false true true true false false true false true true true false true true true A sentence is satisfiable if it's true in some interpretations: P1∨ ¬P2 P2⇒P1 (i.e. its column is true and false) A∨ ¬B true true false false true true true true 2525
  • 26. Unsatisfiability A B C false false false false false true false true false false true true true false false true false true true true false true true true A sentence is unsatisfiable if it's true in no interpretations: P1∧ ¬P1 (inconsistent/contradiction) (i.e. its entire column is false) C∧ ¬C false false false false false false false false 2626
  • 27. Inference Proof Methods  Model Checking: – truth table enumeration sound and complete for propositional logic – heuristic search in model space sound but incomplete  Application of Syntactic Operations (i.e. Inference Rules): – sound generation of new sentences from old – could use inference rules as operators for search 2727
  • 28. Inference by Enumeration LET: KB = A∨C, B∨ ¬C α = A∨B DOES: KB ╞ α ? A B C false false false false false true false true false false true true true false false true false true true true false true true true RECALL: The computer doesn't know the meaning of the proposition symbols. So all logically distinct cases must be checked to prove that a sentence can be derived from a KB. 2828
  • 29. Inference by Enumeration LET: KB = A∨C, B∨ ¬C α = A∨B DOES: KB ╞ α ? A∨C B∨ ¬C KB false true false true false false false true false true true true true true true true false false true true true true true true Rows where all of sentences in KB are true are the models of KB A B C false false false false false true false true false false true true true false false true false true true true false true true true 2929
  • 30. Inference by Enumeration LET: KB = A∨C, B∨ ¬C α = A∨B DOES: KB ╞ α ? A∨C B∨ ¬C KB false true false true false false false true false true true true true true true true false false true true true true true true α is entailed by KB, if all models of KB are models of α, i.e. all rows where KB is true, α is true A B C false false false false false true false true false false true true true false false true false true true true false true true true A∨B false false true true true true true true YES! In other words: KB ⇒α is valid. KB⇒α true true true true true true true true 3030
  • 31. Inference by Enumeration  Though complete for PL, the proofs using this enumeration grow exponentially in length as the number of symbols increases.  There must be a better way.  Natural deduction is an inference procedure that uses sound inference rules to derive new sentences from the KB and any previously derived sentences until the conclusion sentence is derived. 3131
  • 33. COURTESY: Md. Tarek Habib Assistant Professor Daffodil International University
  • 34. ********** ********** If You Need Me ********** ********** Mail: tajim.cse@diu.edu.bd Website: https://www.tajimiitju.blogspot.com ORCID: https://orcid.org/0000-0002-2834-1507 LinkedIn: https://www.linkedin.com/in/tajimiitju ResearchGate: https://www.researchgate.net/profile/Tajim_Md_Niamat_Ullah_Akhund YouTube: https://www.youtube.com/tajimiitju?sub_confirmation=1 SlideShare: https://www.slideshare.net/TajimMdNiamatUllahAk Facebook: https://www.facebook.com/tajim.mohammad GitHub: https://github.com/tajimiitju Google+: https://plus.google.com/+tajimiitju Gmail: tajim.mohammad.3@gmail.com Twitter: https://twitter.com/Tajim53 Thank you Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund

Editor's Notes

  1. CLICK SLIDE
  2. CLICK EACH SUB
  3. CLICK EACH SUB
  4. CLICK EACH SUB formal language is unambiguous and free of semantics
  5. CLICK EACH SUB
  6. CLICK EACH SUB
  7. CLICK ANIM
  8. CLICK ANIM
  9. CLICK ANIM
  10. CLICK ANIM
  11. CLICK EACH SUB Example: if each is separately true then they are jointly true
  12. CLICK EACH SUB Example: if each is separately true then they are jointly true
  13. CLICK EACH SUB
  14. CLICK EACH SUB
  15. CLICK EACH SUB
  16. CLICK EACH
  17. CLICK EACH
  18. CLICK EACH
  19. CLICK EACH
  20. CLICK EACH
  21. CLICK EACH
  22. CLICK EACH
  23. CLICK EACH
  24. CLICK EACH SUB
  25. CLICK EACH
  26. CLICK EACH
  27. CLICK EACH
  28. CLICK EACH