SlideShare una empresa de Scribd logo
1 de 35
Chapter Eight
Knowledge and
reasoning
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Learning objectives.
After this chapter , students will be able to :
• Learn and understand the basic concept of knowledge-
based agent
• Solve and understand the concept of Wumpus world
problem
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
A knowledge-based agent
• A knowledge-based agent includes a knowledge base and
an inference system.
• A knowledge base is a set of representations of facts of the
world.
• Each individual representation is called a sentence.
• The sentences are expressed in a knowledge
representation language.
• The agent operates as follows:
1. It TELLs the knowledge base what it perceives.
2. It ASKs the knowledge base what action it should
perform.
3. It performs the chosen action.
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
Architecture of a knowledge-based agent
• Knowledge Level.
• The most abstract level: describe agent by saying what
it knows.
• Example: A taxi agent might know that the Golden
Gate Bridge connects San Francisco with the Marin
County.
• Logical Level.
• The level at which the knowledge is encoded into
sentences.
• Example: Links(GoldenGateBridge, SanFrancisco,
MarinCounty).
• Implementation Level.
• The physical representation of the sentences in the
logical level.
• Example: ‘(links goldengatebridge sanfrancisco
marincounty)
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
The Wumpus World environment
• The Wumpus computer game
• The agent explores a cave consisting of rooms connected by
passageways.
• Lurking somewhere in the cave is the Wumpus, a beast that
eats any agent that enters its room.
• Some rooms contain bottomless pits that trap any agent that
wanders into the room.
• Occasionally, there is a heap of gold in a room.
• The goal is to collect the gold and exit the world without
being eaten
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
A typical Wumpus world
• The agent always
starts in the field
[1,1].
• The task of the
agent is to find the
gold, return to the
field [1,1] and
climb out of the
cave.
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
Agent in a Wumpus world: Percepts
• The agent perceives
• a stench in the square containing the wumpus and in the
adjacent squares (not diagonally)
• a breeze in the squares adjacent to a pit
• a glitter in the square where the gold is
• a bump, if it walks into a wall
• a woeful scream everywhere in the cave, if the wumpus is
killed
• The percepts are given as a five-symbol list. If there is a
stench and a breeze, but no glitter, no bump, and no scream,
the percept is
[Stench, Breeze, None, None, None]
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
Wumpus world actions
• go forward
• turn right 90 degrees
• turn left 90 degrees
• grab: Pick up an object that is in the same square as
the agent
• shoot: Fire an arrow in a straight line in the direction
the agent is facing. The arrow continues until it either
hits and kills the wumpus or hits the outer wall. The
agent has only one arrow, so only the first Shoot action
has any effect
• climb is used to leave the cave. This action is only
effective in the start square
• die: This action automatically and irretrievably
happens if the agent enters a square with a pit or a live
wumpus
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
Wumpus goal
The agent’s goal is to find the gold and bring it
back to the start square as quickly as possible,
without getting killed
• 1000 points reward for climbing out of the
cave with the gold
• 1 point deducted for every action taken
• 10000 points penalty for getting killed
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
The Wumpus agent’s first step
¬W
¬W
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
Later
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Let’s Play!
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
Specifying the environment
Like the vacuum world, the Wumpus world is a grid of squares
surrounded by walls, where each square can contain agents and
objects. The agent always starts in the lower left corner, a square that
we will label [1, 1]. The agent’s task is to find the gold, return to [1,
1], and climb out of the cave.
To specify the agent’s task, we specify its performance, environment,
actions, sensors [PEAS]. In the Wumpus world, these are as follows:
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Specifying the environment
Performance measure:
• 1,000 for picking up the gold.
• 1000 for falling into a pit or being eaten by Wumpus.
• One for each action taken.
• 10 for using up the arrow.
Environment:
• A 4 × 4 grid of rooms.
• The agent always starts in the square labeled [1, 1], facing to the
right.
• The locations of the gold and Wumpus are chosen randomly, with a
uniform distribution, from the squares other than the start square.
• Each square other than the start can be a pit, with probability 0.2.
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Specifying the environment
Actuators:
• The agent can move forward.
• Turn left by 90°.
• The agent dies a miserable death if it enters a square containing a
pit or a live Wumpus (it is safe, albeit smelly, to enter a square with
a dead Wumpus). Moving forward has no effect if there is a wall in
front of the agent.
• The action grab can be used to pick up an object that is in the same
square as the agent.
• The action shoot can be used to fire an arrow in straight line in the
direction the agent is facing. The arrow continues until it either hits
(and hence kills) the Wumpus or hits a wall. The agent only has
one arrow, so only first shoot action has any effect.
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Specifying the environment
Sensors:
• The agent has five sensors, each of which gives a single bit of
information.
• In the square containing the Wumpus and in the directly (not
diagonally) adjacent squares, the agent will perceive a stench.
• In the squares directly adjacent to pit, the agent will perceive a
breeze.
• In the square where the gold is, the agent will perceive a glitter.
• When an agent walks into a wall, it will perceive a bump.
• When the Wumpus is killed, it emits a woeful scream that can be
perceived anywhere in the cave.
• The percepts will be given to the agent in the form of list of five
symbols; for example, if there is a stench and a breeze, but no
glitter, bump, or scream, the agent will receive the percept
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Specifying the environment
The following are the properties of task environment:
• Partially observable
• Deterministic
• Sequential (need to remember state)
• Static
• Discrete
• Single agent (Wumpus is not treated as separate agent)
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Representation
• AI agents deal with knowledge (data)
• Facts (believe & observe knowledge)
• Procedures (how to knowledge)
• Meaning (relate & define knowledge)
• Right representation is crucial
• Early realisation in AI
• Wrong choice can lead to project failure
• Active research area
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
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
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
Some General Representations
1. Logical Representations
2. Production Rules
3. Semantic Networks
• Conceptual graphs, frames
4. Description Logics (see textbook)
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
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)
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
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.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
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
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
Predicate Logic
• Propositional logic combines atoms
• An atom contains no propositional connectives
• Have no structure (today_is_wet,
john_likes_apples)
• Predicates allow us to talk about objects
• Properties: is_wet(today)
• Relations: likes(john, apples)
• True or false
• In predicate logic each atom is a predicate
• e.g. first order logic, higher-order logic
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
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)
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
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)
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
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
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
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.
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
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), …
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
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
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
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
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
Knowledge representation issue
The issues that arise during victimization of KR techniques are
several. Some of these are explained in the following:
1. Important attributes: There are attributes that are of general
significance. There are two unit attributes, “instance” and “isa”,
that are of general importance. These attributes are important as
they support property inheritance.
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Knowledge representation issue
2. Relationship among attributes:
he relationship between the attributes of associate object, freelance of
specific data they cipher, could hold properties like inverses,
existence in associate “isa” hierarchy, techniques for reasoning
regarding values and single valued attributes.
a) Inverses
b) Existence in an “isa” hierarchy:
c) Techniques for reasoning about values:
d) Single valued attributes:
3. Choosing granularity: High-level facts might not be adequate for
illustration, whereas low-level primitives might need heaps of
storage.
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Knowledge representation issue
4. Set of object: The reason to represent sets of objects is described
as follows. If a property is true for all or most components of a
group, then it is more efficient to associate it once with the set rather
than to associate it with each component of the set. This is done in
different ways: in logical illustration through the utilization of
quantifier, and in hierarchal structure wherever node represents sets,
the inheritance propagates set level assertion down to individual.
5. Finding right structure: we have access to right structure for
describing a specific state of affairs. It needs to choose associated
initial structure so to reduce the selection.
Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari
Road, Daryaganj, New Delhi-110002
8.1 Knowledge-based
agent
8.2 Wumpus world
8.3 Specifying the
environment
8.4 What is knowledge
representation?
8.5 Knowledge
representation issues
Dr. Nilakshi Jain
Email ID :
nilakshijain1986@gmail.com
Thank you

Más contenido relacionado

Último

Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 

Último (20)

Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 

Destacado

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Destacado (20)

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 

Artficial intelligence chapter wise notes for the student of btech computer

  • 2. 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues Learning objectives. After this chapter , students will be able to : • Learn and understand the basic concept of knowledge- based agent • Solve and understand the concept of Wumpus world problem Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002
  • 3. A knowledge-based agent • A knowledge-based agent includes a knowledge base and an inference system. • A knowledge base is a set of representations of facts of the world. • Each individual representation is called a sentence. • The sentences are expressed in a knowledge representation language. • The agent operates as follows: 1. It TELLs the knowledge base what it perceives. 2. It ASKs the knowledge base what action it should perform. 3. It performs the chosen action. 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002
  • 4. Architecture of a knowledge-based agent • Knowledge Level. • The most abstract level: describe agent by saying what it knows. • Example: A taxi agent might know that the Golden Gate Bridge connects San Francisco with the Marin County. • Logical Level. • The level at which the knowledge is encoded into sentences. • Example: Links(GoldenGateBridge, SanFrancisco, MarinCounty). • Implementation Level. • The physical representation of the sentences in the logical level. • Example: ‘(links goldengatebridge sanfrancisco marincounty) 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002
  • 5. The Wumpus World environment • The Wumpus computer game • The agent explores a cave consisting of rooms connected by passageways. • Lurking somewhere in the cave is the Wumpus, a beast that eats any agent that enters its room. • Some rooms contain bottomless pits that trap any agent that wanders into the room. • Occasionally, there is a heap of gold in a room. • The goal is to collect the gold and exit the world without being eaten 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002
  • 6. A typical Wumpus world • The agent always starts in the field [1,1]. • The task of the agent is to find the gold, return to the field [1,1] and climb out of the cave. 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002
  • 7. Agent in a Wumpus world: Percepts • The agent perceives • a stench in the square containing the wumpus and in the adjacent squares (not diagonally) • a breeze in the squares adjacent to a pit • a glitter in the square where the gold is • a bump, if it walks into a wall • a woeful scream everywhere in the cave, if the wumpus is killed • The percepts are given as a five-symbol list. If there is a stench and a breeze, but no glitter, no bump, and no scream, the percept is [Stench, Breeze, None, None, None] 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002
  • 8. Wumpus world actions • go forward • turn right 90 degrees • turn left 90 degrees • grab: Pick up an object that is in the same square as the agent • shoot: Fire an arrow in a straight line in the direction the agent is facing. The arrow continues until it either hits and kills the wumpus or hits the outer wall. The agent has only one arrow, so only the first Shoot action has any effect • climb is used to leave the cave. This action is only effective in the start square • die: This action automatically and irretrievably happens if the agent enters a square with a pit or a live wumpus 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002
  • 9. Wumpus goal The agent’s goal is to find the gold and bring it back to the start square as quickly as possible, without getting killed • 1000 points reward for climbing out of the cave with the gold • 1 point deducted for every action taken • 10000 points penalty for getting killed 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002
  • 10. The Wumpus agent’s first step ¬W ¬W 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002
  • 11. Later Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues
  • 12. Let’s Play! 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002
  • 13. Specifying the environment Like the vacuum world, the Wumpus world is a grid of squares surrounded by walls, where each square can contain agents and objects. The agent always starts in the lower left corner, a square that we will label [1, 1]. The agent’s task is to find the gold, return to [1, 1], and climb out of the cave. To specify the agent’s task, we specify its performance, environment, actions, sensors [PEAS]. In the Wumpus world, these are as follows: Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues
  • 14. Specifying the environment Performance measure: • 1,000 for picking up the gold. • 1000 for falling into a pit or being eaten by Wumpus. • One for each action taken. • 10 for using up the arrow. Environment: • A 4 × 4 grid of rooms. • The agent always starts in the square labeled [1, 1], facing to the right. • The locations of the gold and Wumpus are chosen randomly, with a uniform distribution, from the squares other than the start square. • Each square other than the start can be a pit, with probability 0.2. Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues
  • 15. Specifying the environment Actuators: • The agent can move forward. • Turn left by 90°. • The agent dies a miserable death if it enters a square containing a pit or a live Wumpus (it is safe, albeit smelly, to enter a square with a dead Wumpus). Moving forward has no effect if there is a wall in front of the agent. • The action grab can be used to pick up an object that is in the same square as the agent. • The action shoot can be used to fire an arrow in straight line in the direction the agent is facing. The arrow continues until it either hits (and hence kills) the Wumpus or hits a wall. The agent only has one arrow, so only first shoot action has any effect. Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues
  • 16. Specifying the environment Sensors: • The agent has five sensors, each of which gives a single bit of information. • In the square containing the Wumpus and in the directly (not diagonally) adjacent squares, the agent will perceive a stench. • In the squares directly adjacent to pit, the agent will perceive a breeze. • In the square where the gold is, the agent will perceive a glitter. • When an agent walks into a wall, it will perceive a bump. • When the Wumpus is killed, it emits a woeful scream that can be perceived anywhere in the cave. • The percepts will be given to the agent in the form of list of five symbols; for example, if there is a stench and a breeze, but no glitter, bump, or scream, the agent will receive the percept Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues
  • 17. Specifying the environment The following are the properties of task environment: • Partially observable • Deterministic • Sequential (need to remember state) • Static • Discrete • Single agent (Wumpus is not treated as separate agent) Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues
  • 18. Representation • AI agents deal with knowledge (data) • Facts (believe & observe knowledge) • Procedures (how to knowledge) • Meaning (relate & define knowledge) • Right representation is crucial • Early realisation in AI • Wrong choice can lead to project failure • Active research area 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002
  • 19. 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 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002
  • 20. Some General Representations 1. Logical Representations 2. Production Rules 3. Semantic Networks • Conceptual graphs, frames 4. Description Logics (see textbook) 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002
  • 21. 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) 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002
  • 22. 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.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002
  • 23. 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 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002
  • 24. Predicate Logic • Propositional logic combines atoms • An atom contains no propositional connectives • Have no structure (today_is_wet, john_likes_apples) • Predicates allow us to talk about objects • Properties: is_wet(today) • Relations: likes(john, apples) • True or false • In predicate logic each atom is a predicate • e.g. first order logic, higher-order logic 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002
  • 25. 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) 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002
  • 26. 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) 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002
  • 27. 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 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002
  • 28. 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. 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002
  • 29. 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), … 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002
  • 30. 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 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002
  • 31. 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 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002
  • 32. Knowledge representation issue The issues that arise during victimization of KR techniques are several. Some of these are explained in the following: 1. Important attributes: There are attributes that are of general significance. There are two unit attributes, “instance” and “isa”, that are of general importance. These attributes are important as they support property inheritance. Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues
  • 33. Knowledge representation issue 2. Relationship among attributes: he relationship between the attributes of associate object, freelance of specific data they cipher, could hold properties like inverses, existence in associate “isa” hierarchy, techniques for reasoning regarding values and single valued attributes. a) Inverses b) Existence in an “isa” hierarchy: c) Techniques for reasoning about values: d) Single valued attributes: 3. Choosing granularity: High-level facts might not be adequate for illustration, whereas low-level primitives might need heaps of storage. Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues
  • 34. Knowledge representation issue 4. Set of object: The reason to represent sets of objects is described as follows. If a property is true for all or most components of a group, then it is more efficient to associate it once with the set rather than to associate it with each component of the set. This is done in different ways: in logical illustration through the utilization of quantifier, and in hierarchal structure wherever node represents sets, the inheritance propagates set level assertion down to individual. 5. Finding right structure: we have access to right structure for describing a specific state of affairs. It needs to choose associated initial structure so to reduce the selection. Copyright © 2019 by Wiley India Pvt. Ltd., 4436/7, Ansari Road, Daryaganj, New Delhi-110002 8.1 Knowledge-based agent 8.2 Wumpus world 8.3 Specifying the environment 8.4 What is knowledge representation? 8.5 Knowledge representation issues
  • 35. Dr. Nilakshi Jain Email ID : nilakshijain1986@gmail.com Thank you