SlideShare a Scribd company logo
1 of 53
Logical Agents
Group Members
 Nuruzzaman Milon (IT 09006)
 Ali Saheb (IT 09001)
 Sabbir Hossain (IT 09024)
Contents
 Knowledge Based Agents
 Wumpus World
 Logic in General
 Propositional (Boolean) Logic
 Reasoning with Horn Clauses
 Forward Chain
 Backward Chain
Logical Agents
 Humans can know “things” and “reason”
 Representation: How are the things stored?
 Reasoning: How is the knowledge used?
 To solve a problem…
 To generate more knowledge…
 Knowledge and reasoning are important to artificial agents
because they enable successful behaviors difficult to
achieve otherwise
 Useful in partially observable environments
 Can benefit from knowledge in very general
forms, combining and recombining information
Knowledge-Based Agents
 Central component of a Knowledge-Based Agent is
a Knowledge-Base
 A set of sentences in a formal language
 Sentences are expressed using a knowledge representation
language
 Two generic functions:
 TELL - add new sentences (facts) to the Knowledge Base
 “Tell it what it needs to know”
 ASK - query what is known from the Knowledge Base
 “Ask what to do next”
Knowledge-Based Agents
 The agent must be able to:
 Represent states and actions
 Incorporate new percepts
 Update internal
representations of the world
 Deduce hidden properties of
the world
 Deduce appropriate actions
Inference Engine
Knowledge-Base
Domain-
Independent
Algorithms
Domain-
Specific
Content
Knowledge-Based Agents
Knowledge-Based Agents
 Declarative
 You can build a knowledge-based agent simply by “TELLing”
it what it needs to know
 Procedural
 Encode desired behaviors directly as program code
 Minimizing the role of explicit representation and reasoning can
result in a much more efficient system
Wumpus World
 Performance Measure
 Gold +1000, Death – 1000
 Step -1, Use arrow -10
 Environment
 Square adjacent to the Wumpus are
smelly
 Squares adjacent to the pit are breezy
 Glitter iff gold is in the same square
 Shooting kills Wumpus if you are facing it
 Shooting uses up the only arrow
 Grabbing picks up the gold if in the same
square
 Releasing drops the gold in the same
square
 Actuators
 Left turn, right
turn, forward, grab, release, shoot
 Sensors
 Breeze, glitter, and smell
Wumpus World
 Characterization of Wumpus World
 Observable
 partial, only local perception
 Deterministic
 Yes, outcomes are specified
 Episodic
 No, sequential at the level of actions
 Static
 Yes, Wumpus and pits do not move
 Discrete
 Yes
 Single Agent
 Yes
Wumpus World
Wumpus World
Wumpus World
Wumpus World
Wumpus World
Wumpus World
Wumpus World
Wumpus World
Other Sticky Situations
 Breeze in (1,2) and (2,1)
 No safe actions
 Smell in (1,1)
 Cannot move
Logic
 Knowledge bases consist of
sentences in a formal
language
 Syntax
 Sentences are well formed
 Semantics
 The “meaning” of the sentence
 The truth of each sentence
with respect to each possible
world (model)
 Example:
x + 2 >= y is a sentence
x2 + y > is not a sentence
x + 2 >= y is true iff x + 2 is no
less than y
x + 2 >= y is true in a world where
x = 7, y=1
x + 2 >= y is false in world where
x = 0, y =6
Logic
 Entailment means that one thing follows logically
from another
|=
 |= iff in every model in which is true, is
also true
 if is true, then must be true
 the truth of is “contained” in the truth of
Logic
 Example:
 A Knowledge Base containing
 “Cleveland won”
 “Dallas won”
 Entails…
 “Either Cleveland won or Dallas won”
 Example:
x + y = 4 entails 4 = x + y
Logic
 A model is a formally
structured world with
respect to which truth
can be evaluated
 M is a model of
sentence if is true in
m
 Then KB |= if M(KB)
M( )
M( )
x x x x x xx xx xxx xx
x x x x x x x xxx xxx
x x x x x x x x xxxxxx x x xx
xxx x x xx x x x x x xx
xxx x x x x x x x xxx x x
x xxx xxx x xx xxxx x
M(KB)
xx x x x
x x x x
x x x
Logic
 Entailment in Wumpus
World
 Situation after detecting
nothing in [1,1], moving
right, breeze in [2,1]
 Consider possible
models for ? assuming
only pits
 3 Boolean choices => 8
possible models
Logic
Logic
 Inference is the process of deriving a specific sentence
from a KB (where the sentence must be entailed by the
KB)
 KB |-i = sentence can be derived from KB by
procedure I
 “KB’s are a haystack”
 Entailment = needle in haystack
 Inference = finding it
Logic
 Soundness
 i is sound if…
 whenever KB |-i is true, KB |= is true
 Completeness
 i is complete if
 whenever KB |= is true, KB |-i is true
 If KB is true in the real world, then any sentence
derived from KB by a sound inference procedure is
also true in the real world
Propositional Logic
 AKA Boolean Logic
 False and True
 Proposition symbols P1, P2, etc are sentences
 NOT: If S1 is a sentence, then ¬S1 is a sentence (negation)
 AND: If S1, S2 are sentences, then S1 S2 is a sentence
(conjunction)
 OR: If S1, S2 are sentences, then S1 S2 is a sentence
(disjunction)
 IMPLIES: If S1, S2 are sentences, then S1 S2 is a sentence
(implication)
 IFF: If S1, S2 are sentences, then S1 S2 is a sentence
(biconditional)
Propositional Logic
P Q ¬P P Q P Q P Q P Q
False False True False False True True
False True True False True True False
True False False False True False False
True True False True True True True
Reasoning with Horn Clauses
 Forward Chaining
 For each new piece of data, generate all new facts, until
the desired fact is generated
 Data-directed reasoning
 Backward Chaining
 To prove the goal, find a clause that contains the goal as
its head, and prove the body recursively
 (Backtrack when you chose the wrong clause)
 Goal-directed reasoning
Forward Chaining
 AND-OR Graph
 multiple links joined by an arc indicate conjunction – every link
must be proved
 multiple links without an arc indicate disjunction – any link can be
proved
Forward Chaining
Forward Chaining
Forward Chaining
Forward Chaining
Forward Chaining
Forward Chaining
Forward Chaining
Forward Chaining
Backward Chaining
 Idea: work backwards from the query q:
 To prove q by BC,
 Check if q is known already, or
 Prove by BC all premises of some rule concluding q
 Avoid loops
 Check if new subgoal is already on the goal stack
 Avoid repeated work: check if new subgoal
 Has already been proved true, or
 Has already failed
Backward Chaining
Backward Chaining
Backward Chaining
Backward Chaining
Backward Chaining
Backward Chaining
Backward Chaining
Backward Chaining
Backward Chaining
Backward Chaining
Backward Chaining
Forward Chaining vs.
Backward Chaining
 Forward Chaining is data driven
 Automatic, unconscious processing
 E.g. object recognition, routine decisions
 May do lots of work that is irrelevant to the goal
 Backward Chaining is goal driven
 Appropriate for problem solving
 E.g. “Where are my keys?”, “How do I start the car?”
 The complexity of BC can be much less than linear in
size of the KB
Thanks…

More Related Content

What's hot

AI_Session 11: searching with Non-Deterministic Actions and partial observati...
AI_Session 11: searching with Non-Deterministic Actions and partial observati...AI_Session 11: searching with Non-Deterministic Actions and partial observati...
AI_Session 11: searching with Non-Deterministic Actions and partial observati...Asst.prof M.Gokilavani
 
Knowledge Representation & Reasoning
Knowledge Representation & ReasoningKnowledge Representation & Reasoning
Knowledge Representation & ReasoningSajid Marwat
 
State Space Representation and Search
State Space Representation and SearchState Space Representation and Search
State Space Representation and SearchHitesh Mohapatra
 
Heuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligenceHeuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligencegrinu
 
Forward and Backward chaining in AI
Forward and Backward chaining in AIForward and Backward chaining in AI
Forward and Backward chaining in AIMegha Sharma
 
AI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction ProblemAI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction ProblemMohammad Imam Hossain
 
Artificial Intelligence -- Search Algorithms
Artificial Intelligence-- Search Algorithms Artificial Intelligence-- Search Algorithms
Artificial Intelligence -- Search Algorithms Syed Ahmed
 
Knowledge representation in AI
Knowledge representation in AIKnowledge representation in AI
Knowledge representation in AIVishal Singh
 
Water jug problem ai part 6
Water jug problem ai part 6Water jug problem ai part 6
Water jug problem ai part 6Kirti Verma
 
Game Playing in Artificial Intelligence
Game Playing in Artificial IntelligenceGame Playing in Artificial Intelligence
Game Playing in Artificial Intelligencelordmwesh
 
Knowledge representation In Artificial Intelligence
Knowledge representation In Artificial IntelligenceKnowledge representation In Artificial Intelligence
Knowledge representation In Artificial IntelligenceRamla Sheikh
 
Unification and Lifting
Unification and LiftingUnification and Lifting
Unification and LiftingMegha Sharma
 
I. Hill climbing algorithm II. Steepest hill climbing algorithm
I. Hill climbing algorithm II. Steepest hill climbing algorithmI. Hill climbing algorithm II. Steepest hill climbing algorithm
I. Hill climbing algorithm II. Steepest hill climbing algorithmvikas dhakane
 
Knowledge Representation in Artificial intelligence
Knowledge Representation in Artificial intelligence Knowledge Representation in Artificial intelligence
Knowledge Representation in Artificial intelligence Yasir Khan
 
Problem solving agents
Problem solving agentsProblem solving agents
Problem solving agentsMegha Sharma
 

What's hot (20)

AI_Session 11: searching with Non-Deterministic Actions and partial observati...
AI_Session 11: searching with Non-Deterministic Actions and partial observati...AI_Session 11: searching with Non-Deterministic Actions and partial observati...
AI_Session 11: searching with Non-Deterministic Actions and partial observati...
 
Knowledge Representation & Reasoning
Knowledge Representation & ReasoningKnowledge Representation & Reasoning
Knowledge Representation & Reasoning
 
Planning
Planning Planning
Planning
 
State Space Representation and Search
State Space Representation and SearchState Space Representation and Search
State Space Representation and Search
 
Heuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligenceHeuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligence
 
AI_Session 28 planning graph.pptx
AI_Session 28 planning graph.pptxAI_Session 28 planning graph.pptx
AI_Session 28 planning graph.pptx
 
Forward and Backward chaining in AI
Forward and Backward chaining in AIForward and Backward chaining in AI
Forward and Backward chaining in AI
 
Knowledge based agents
Knowledge based agentsKnowledge based agents
Knowledge based agents
 
AI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction ProblemAI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction Problem
 
Artificial Intelligence -- Search Algorithms
Artificial Intelligence-- Search Algorithms Artificial Intelligence-- Search Algorithms
Artificial Intelligence -- Search Algorithms
 
Knowledge representation in AI
Knowledge representation in AIKnowledge representation in AI
Knowledge representation in AI
 
Water jug problem ai part 6
Water jug problem ai part 6Water jug problem ai part 6
Water jug problem ai part 6
 
Game Playing in Artificial Intelligence
Game Playing in Artificial IntelligenceGame Playing in Artificial Intelligence
Game Playing in Artificial Intelligence
 
Knowledge representation In Artificial Intelligence
Knowledge representation In Artificial IntelligenceKnowledge representation In Artificial Intelligence
Knowledge representation In Artificial Intelligence
 
Unification and Lifting
Unification and LiftingUnification and Lifting
Unification and Lifting
 
I. Hill climbing algorithm II. Steepest hill climbing algorithm
I. Hill climbing algorithm II. Steepest hill climbing algorithmI. Hill climbing algorithm II. Steepest hill climbing algorithm
I. Hill climbing algorithm II. Steepest hill climbing algorithm
 
Knowledge Representation in Artificial intelligence
Knowledge Representation in Artificial intelligence Knowledge Representation in Artificial intelligence
Knowledge Representation in Artificial intelligence
 
Problem solving agents
Problem solving agentsProblem solving agents
Problem solving agents
 
Problem Solving
Problem Solving Problem Solving
Problem Solving
 
AI: Logic in AI
AI: Logic in AIAI: Logic in AI
AI: Logic in AI
 

Viewers also liked

Logical Agents
Logical AgentsLogical Agents
Logical AgentsYasir Khan
 
FORWARD CHAINING AND BACKWARD CHAINING SYSTEMS IN ARTIFICIAL INTELIGENCE
FORWARD CHAINING AND BACKWARD CHAINING SYSTEMS IN ARTIFICIAL INTELIGENCEFORWARD CHAINING AND BACKWARD CHAINING SYSTEMS IN ARTIFICIAL INTELIGENCE
FORWARD CHAINING AND BACKWARD CHAINING SYSTEMS IN ARTIFICIAL INTELIGENCEJohnLeonard Onwuzuruigbo
 
Propositional And First-Order Logic
Propositional And First-Order LogicPropositional And First-Order Logic
Propositional And First-Order Logicankush_kumar
 
forward and backward chaining
forward and backward chainingforward and backward chaining
forward and backward chainingRado Sianipar
 
Backward chaining(bala,karthi,rajesh)
Backward chaining(bala,karthi,rajesh)Backward chaining(bala,karthi,rajesh)
Backward chaining(bala,karthi,rajesh)Nagarajan
 
Logical reasoning
Logical reasoning Logical reasoning
Logical reasoning Slideshare
 
How expensive a logical agent is
How expensive a logical agent isHow expensive a logical agent is
How expensive a logical agent isRashmika Nawaratne
 
An Abductive Diagnosis and Modeling Concept for Wind Power Plants (DX 2014)
An Abductive Diagnosis and Modeling Concept for Wind Power Plants (DX 2014)An Abductive Diagnosis and Modeling Concept for Wind Power Plants (DX 2014)
An Abductive Diagnosis and Modeling Concept for Wind Power Plants (DX 2014)Roxane Koitz
 
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
 
Introduction iii
Introduction iiiIntroduction iii
Introduction iiichandsek666
 
টেলিমেডিসিন কি
টেলিমেডিসিন কিটেলিমেডিসিন কি
টেলিমেডিসিন কিNuruzzaman Milon
 
Energy Efficient OS fo Android Powered Smart Devices
Energy Efficient OS fo Android Powered Smart DevicesEnergy Efficient OS fo Android Powered Smart Devices
Energy Efficient OS fo Android Powered Smart DevicesNuruzzaman Milon
 
Road -map of Teledermatology for doctor-patient-citizen relationship
Road -map  of Teledermatology for doctor-patient-citizen relationshipRoad -map  of Teledermatology for doctor-patient-citizen relationship
Road -map of Teledermatology for doctor-patient-citizen relationshipNuruzzaman Milon
 

Viewers also liked (20)

Logical Agents
Logical AgentsLogical Agents
Logical Agents
 
FORWARD CHAINING AND BACKWARD CHAINING SYSTEMS IN ARTIFICIAL INTELIGENCE
FORWARD CHAINING AND BACKWARD CHAINING SYSTEMS IN ARTIFICIAL INTELIGENCEFORWARD CHAINING AND BACKWARD CHAINING SYSTEMS IN ARTIFICIAL INTELIGENCE
FORWARD CHAINING AND BACKWARD CHAINING SYSTEMS IN ARTIFICIAL INTELIGENCE
 
Forward Backward Chaining
Forward Backward ChainingForward Backward Chaining
Forward Backward Chaining
 
Propositional And First-Order Logic
Propositional And First-Order LogicPropositional And First-Order Logic
Propositional And First-Order Logic
 
forward and backward chaining
forward and backward chainingforward and backward chaining
forward and backward chaining
 
Backward chaining(bala,karthi,rajesh)
Backward chaining(bala,karthi,rajesh)Backward chaining(bala,karthi,rajesh)
Backward chaining(bala,karthi,rajesh)
 
Logic agent
Logic agentLogic agent
Logic agent
 
Logical reasoning
Logical reasoning Logical reasoning
Logical reasoning
 
AI: Logic in AI 2
AI: Logic in AI 2AI: Logic in AI 2
AI: Logic in AI 2
 
Logical agent8910
Logical agent8910Logical agent8910
Logical agent8910
 
How expensive a logical agent is
How expensive a logical agent isHow expensive a logical agent is
How expensive a logical agent is
 
An Abductive Diagnosis and Modeling Concept for Wind Power Plants (DX 2014)
An Abductive Diagnosis and Modeling Concept for Wind Power Plants (DX 2014)An Abductive Diagnosis and Modeling Concept for Wind Power Plants (DX 2014)
An Abductive Diagnosis and Modeling Concept for Wind Power Plants (DX 2014)
 
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
 
Introduction iii
Introduction iiiIntroduction iii
Introduction iii
 
টেলিমেডিসিন কি
টেলিমেডিসিন কিটেলিমেডিসিন কি
টেলিমেডিসিন কি
 
Paypal
PaypalPaypal
Paypal
 
টাইমস(Times)
টাইমস(Times)টাইমস(Times)
টাইমস(Times)
 
Energy Efficient OS fo Android Powered Smart Devices
Energy Efficient OS fo Android Powered Smart DevicesEnergy Efficient OS fo Android Powered Smart Devices
Energy Efficient OS fo Android Powered Smart Devices
 
Road -map of Teledermatology for doctor-patient-citizen relationship
Road -map  of Teledermatology for doctor-patient-citizen relationshipRoad -map  of Teledermatology for doctor-patient-citizen relationship
Road -map of Teledermatology for doctor-patient-citizen relationship
 
Sql injection
Sql injectionSql injection
Sql injection
 

Similar to Artificial intelligence- Logic Agents

Similar to Artificial intelligence- Logic Agents (20)

AI-Unit4.ppt
AI-Unit4.pptAI-Unit4.ppt
AI-Unit4.ppt
 
l4.pptx
l4.pptxl4.pptx
l4.pptx
 
lect14-semantics.ppt
lect14-semantics.pptlect14-semantics.ppt
lect14-semantics.ppt
 
Logic.ppt
Logic.pptLogic.ppt
Logic.ppt
 
Knowledge based agent
Knowledge based agentKnowledge based agent
Knowledge based agent
 
Top school in delhi ncr
Top school in delhi ncrTop school in delhi ncr
Top school in delhi ncr
 
u-3 ppt.pptx
u-3 ppt.pptxu-3 ppt.pptx
u-3 ppt.pptx
 
PropositionalLogic.ppt
PropositionalLogic.pptPropositionalLogic.ppt
PropositionalLogic.ppt
 
artficial intelligence
artficial intelligenceartficial intelligence
artficial intelligence
 
Knowledge based agents
Knowledge based agentsKnowledge based agents
Knowledge based agents
 
m7-logic.ppt
m7-logic.pptm7-logic.ppt
m7-logic.ppt
 
AI Lecture 6 (logical agents)
AI Lecture 6 (logical agents)AI Lecture 6 (logical agents)
AI Lecture 6 (logical agents)
 
Logic
LogicLogic
Logic
 
Business EthicsSummer 2022 (1)Week 1, Lecture 2Chaeyoung
Business EthicsSummer 2022 (1)Week 1, Lecture 2ChaeyoungBusiness EthicsSummer 2022 (1)Week 1, Lecture 2Chaeyoung
Business EthicsSummer 2022 (1)Week 1, Lecture 2Chaeyoung
 
Knowledge Representation, Inference and Reasoning
Knowledge Representation, Inference and ReasoningKnowledge Representation, Inference and Reasoning
Knowledge Representation, Inference and Reasoning
 
4535092.ppt
4535092.ppt4535092.ppt
4535092.ppt
 
Logical reasoning 21.1.13
Logical reasoning 21.1.13Logical reasoning 21.1.13
Logical reasoning 21.1.13
 
Chapter1p3.pptx
Chapter1p3.pptxChapter1p3.pptx
Chapter1p3.pptx
 
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
 
Chapter 01 - p3.pdf
Chapter 01 - p3.pdfChapter 01 - p3.pdf
Chapter 01 - p3.pdf
 

Recently uploaded

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 

Recently uploaded (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 

Artificial intelligence- Logic Agents

  • 2. Group Members  Nuruzzaman Milon (IT 09006)  Ali Saheb (IT 09001)  Sabbir Hossain (IT 09024)
  • 3. Contents  Knowledge Based Agents  Wumpus World  Logic in General  Propositional (Boolean) Logic  Reasoning with Horn Clauses  Forward Chain  Backward Chain
  • 4. Logical Agents  Humans can know “things” and “reason”  Representation: How are the things stored?  Reasoning: How is the knowledge used?  To solve a problem…  To generate more knowledge…  Knowledge and reasoning are important to artificial agents because they enable successful behaviors difficult to achieve otherwise  Useful in partially observable environments  Can benefit from knowledge in very general forms, combining and recombining information
  • 5. Knowledge-Based Agents  Central component of a Knowledge-Based Agent is a Knowledge-Base  A set of sentences in a formal language  Sentences are expressed using a knowledge representation language  Two generic functions:  TELL - add new sentences (facts) to the Knowledge Base  “Tell it what it needs to know”  ASK - query what is known from the Knowledge Base  “Ask what to do next”
  • 6. Knowledge-Based Agents  The agent must be able to:  Represent states and actions  Incorporate new percepts  Update internal representations of the world  Deduce hidden properties of the world  Deduce appropriate actions Inference Engine Knowledge-Base Domain- Independent Algorithms Domain- Specific Content
  • 8. Knowledge-Based Agents  Declarative  You can build a knowledge-based agent simply by “TELLing” it what it needs to know  Procedural  Encode desired behaviors directly as program code  Minimizing the role of explicit representation and reasoning can result in a much more efficient system
  • 9. Wumpus World  Performance Measure  Gold +1000, Death – 1000  Step -1, Use arrow -10  Environment  Square adjacent to the Wumpus are smelly  Squares adjacent to the pit are breezy  Glitter iff gold is in the same square  Shooting kills Wumpus if you are facing it  Shooting uses up the only arrow  Grabbing picks up the gold if in the same square  Releasing drops the gold in the same square  Actuators  Left turn, right turn, forward, grab, release, shoot  Sensors  Breeze, glitter, and smell
  • 10. Wumpus World  Characterization of Wumpus World  Observable  partial, only local perception  Deterministic  Yes, outcomes are specified  Episodic  No, sequential at the level of actions  Static  Yes, Wumpus and pits do not move  Discrete  Yes  Single Agent  Yes
  • 19. Other Sticky Situations  Breeze in (1,2) and (2,1)  No safe actions  Smell in (1,1)  Cannot move
  • 20. Logic  Knowledge bases consist of sentences in a formal language  Syntax  Sentences are well formed  Semantics  The “meaning” of the sentence  The truth of each sentence with respect to each possible world (model)  Example: x + 2 >= y is a sentence x2 + y > is not a sentence x + 2 >= y is true iff x + 2 is no less than y x + 2 >= y is true in a world where x = 7, y=1 x + 2 >= y is false in world where x = 0, y =6
  • 21. Logic  Entailment means that one thing follows logically from another |=  |= iff in every model in which is true, is also true  if is true, then must be true  the truth of is “contained” in the truth of
  • 22. Logic  Example:  A Knowledge Base containing  “Cleveland won”  “Dallas won”  Entails…  “Either Cleveland won or Dallas won”  Example: x + y = 4 entails 4 = x + y
  • 23. Logic  A model is a formally structured world with respect to which truth can be evaluated  M is a model of sentence if is true in m  Then KB |= if M(KB) M( ) M( ) x x x x x xx xx xxx xx x x x x x x x xxx xxx x x x x x x x x xxxxxx x x xx xxx x x xx x x x x x xx xxx x x x x x x x xxx x x x xxx xxx x xx xxxx x M(KB) xx x x x x x x x x x x
  • 24. Logic  Entailment in Wumpus World  Situation after detecting nothing in [1,1], moving right, breeze in [2,1]  Consider possible models for ? assuming only pits  3 Boolean choices => 8 possible models
  • 25. Logic
  • 26. Logic  Inference is the process of deriving a specific sentence from a KB (where the sentence must be entailed by the KB)  KB |-i = sentence can be derived from KB by procedure I  “KB’s are a haystack”  Entailment = needle in haystack  Inference = finding it
  • 27. Logic  Soundness  i is sound if…  whenever KB |-i is true, KB |= is true  Completeness  i is complete if  whenever KB |= is true, KB |-i is true  If KB is true in the real world, then any sentence derived from KB by a sound inference procedure is also true in the real world
  • 28. Propositional Logic  AKA Boolean Logic  False and True  Proposition symbols P1, P2, etc are sentences  NOT: If S1 is a sentence, then ¬S1 is a sentence (negation)  AND: If S1, S2 are sentences, then S1 S2 is a sentence (conjunction)  OR: If S1, S2 are sentences, then S1 S2 is a sentence (disjunction)  IMPLIES: If S1, S2 are sentences, then S1 S2 is a sentence (implication)  IFF: If S1, S2 are sentences, then S1 S2 is a sentence (biconditional)
  • 29. Propositional Logic P Q ¬P P Q P Q P Q P Q False False True False False True True False True True False True True False True False False False True False False True True False True True True True
  • 30. Reasoning with Horn Clauses  Forward Chaining  For each new piece of data, generate all new facts, until the desired fact is generated  Data-directed reasoning  Backward Chaining  To prove the goal, find a clause that contains the goal as its head, and prove the body recursively  (Backtrack when you chose the wrong clause)  Goal-directed reasoning
  • 31. Forward Chaining  AND-OR Graph  multiple links joined by an arc indicate conjunction – every link must be proved  multiple links without an arc indicate disjunction – any link can be proved
  • 40. Backward Chaining  Idea: work backwards from the query q:  To prove q by BC,  Check if q is known already, or  Prove by BC all premises of some rule concluding q  Avoid loops  Check if new subgoal is already on the goal stack  Avoid repeated work: check if new subgoal  Has already been proved true, or  Has already failed
  • 52. Forward Chaining vs. Backward Chaining  Forward Chaining is data driven  Automatic, unconscious processing  E.g. object recognition, routine decisions  May do lots of work that is irrelevant to the goal  Backward Chaining is goal driven  Appropriate for problem solving  E.g. “Where are my keys?”, “How do I start the car?”  The complexity of BC can be much less than linear in size of the KB