AI Unit 3
AI Unit 3
AI Unit 3
(KCS071) Unit 3
Knowledge-based agents are those agents who have the capability of maintaining a state of internal knowledge,
reason over that knowledge, update their knowledge after observations and take actions. These agents can
represent the world with some formal representation and act intelligently.
We have to represent knowledge about the world in a manner that facilitates inferencing(i.e. drawing conclusion)
from knowledge.
In AI based on
- Logic
- Probability
- Logic and Probability
KCS 071 Unit 3 Ankita Singh
Knowledge-based agents are composed of two main parts:
○ Knowledge-base and
○ Inference system.
Knowledge base
Knowledge-base is required for updating knowledge for an agent to learn with experiences and take action as per the knowledge.
Inference system
Inference means deriving new sentences from old. Inference system allows us to add a new sentence to the knowledge base. A sentence is
a proposition about the world. Inference system applies logical rules to the KB to deduce new information.
Inference system generates new facts so that an agent can update the KB. An inference system works mainly in two rules which are given
as:
○ Forward chaining
○ Backward chaining
An axiom, is a sentence which is stated without being derived from other sentences.
TELL operation add new sentences to the knowledge base. ASK operation query from the knowledge
base.
Both operations may involve inference—that is, deriving new sentences from old.
The agent maintains a knowledge base, KB, which may initially contain some background knowledge.
Second, it ASKs the knowledge base what action it should perform. In the process of answering this
query, extensive reasoning may be done about the current state of the world, about the outcomes of
possible action sequences, and so on.
Third, the agent program TELLs the knowledge base which action was chosen, and the agent
executes the action.
Starting with an empty knowledge base, the agent designer can TELL sentences one by one until the
agent knows how to operate in its environment. This is called the declarative approach to system
building
However, in the real world, a successful agent can be built by combining both declarative and
procedural approaches, and declarative knowledge can often be compiled into more efficient
procedural code.
•Inference Procedure
–Algorithm
–Sound?
–Complete?
–Complexity
•Knowledge Base
● The Wumpus can be shot by the agent, but the agent has a
single arrow.
● In the Wumpus world, there are some Pits rooms which are
bottomless, and if agent falls in Pits, then he will be stuck
there forever.
Environment
○ Deterministic: It is deterministic, as the result and outcome of the world are already known.
○ One agent: The environment is a single agent as we have one agent only and Wumpus is not considered as an
agent.
The notion of syntax is clear enough in ordinary arithmetic: “x + y = 4” is a well-formed sentence, whereas “x4y+
=” is not.
A logic must also define the semantics or meaning of sentences. The semantics defines the truth of each
sentence with respect to each possible world. For example, the semantics for arithmetic specifies that the
sentence “x + y =4” is true in a world where x is 2 and y is 2, but false in a world where x is 1 and y is 1. In
standard logics, every sentence must be either true or false in each possible world—there is no “in between.”1
KB ╞ α
Knowledge base KB entails sentence α if and only if α is true in all worlds where KB is true
– E.g., the KB containing “the Giants won” and “the Reds won” entails “Either the Giants won
or the Reds won”
α = Giants won
• Preview: we will define a logic (first-order logic) which is expressive enough to say almost
anything of interest, and for which there exists a sound and complete inference procedure.
• That is, the procedure will answer any question whose answer follows from what is known
by the KB.
3. 5<= 11 (P)
5. It is cold today.(NP)
7. X + y = z (NP)
1. Negation: - if p be a proposition, then negation of p is denoted by ¬p, is the statement “it is not
the case that p”.
Example: P ¬p
p : “It is raining today”,
¬p: It is not raining today”. T F
F T
Example
F T F
F F F
Example
p q p∧q
p : “Today is Friday” and
q : “It is raining today”, T T T
p∨q : Today is Friday and it is raining today. T F F
F T F
F F F
The conditional statement p → q is false when p is true and q is false, and true otherwise.
Example
p : sky is clear, p q p →q
q : we are able to see the stars
T T T
p→q : if sky is clear then we are able to see the stars.
T F F
F T T
• p if and only q
• p is necessary and sufficient for q p q p↔q
• p iff q.
• p q = (p → q ) ∧ ( q → p)
T T T
• The biconditional statement p ↔ q is true when p and q have the
same values, and false otherwise. T F F
Inference rules:
Inference rules are the templates for generating valid arguments. Inference rules are applied to derive proofs in artificial
intelligence, and the proof is a sequence of the conclusion that leads to the desired goal.
2. Modus Tollens
The Modus Tollens rule state that if P→ Q is true and ¬ Q is true, then ¬ P will also true. It can be represented as:
3. Hypothetical Syllogism
The Hypothetical Syllogism rule state that if P→R is true whenever P→Q is true, and Q→R is true. It can be represented as
the following notation
5. Addition
The Addition rule is one the common inference rule, and it states that If P is true, then P∨Q will be true.
6. Simplification
The simplification rule state that if P∧ Q is true, then Q or P will also be true.
7. Resolution
The Resolution rule state that if P∨Q and ¬ P∧R is true, then Q∨R will also be true. I
Predicate logic in artificial intelligence, also known as first-order logic or first order predicate logic in AI, is a
formal system used in logic and mathematics to represent and reason about complex relationships and
structures.
FIRST-ORDER LOGIC is sufficiently expressive to represent a good deal of our commonsense knowledge.
It also either forms the foundation of many other representation languages and has been studied intensively
for many decades
● Variables: Variables are symbols that represent objects or values in the domain of discourse. Commonly represented by
letters (e.g., x, y, z).
● Constants: Constants are specific, unchanging objects in the domain. They are typically represented by words or symbols
(e.g., "Alice," "42").
● Functions: Functions take one or more terms as arguments and return a new term. Functions are represented by
symbols or names (e.g., "f(x)", "Add(2, y)").
2. Atomic Formulas: Atomic formulas, also known as predicates, are statements that express
properties or relations about objects. They are constructed using:
3. Logical Connectives: Logical connectives are used to build complex formulas by connecting atomic formulas or other logical
formulas. The primary logical connectives in predicate logic are:
● Conjunction (∧): Represents "and." For example, "IsHungry(x) ∧ IsEating(x)" means "x is hungry and x is eating."
● Disjunction (∨): Represents "or." For example, "IsHungry(x) ∨ IsThirsty(x)" means "x is either hungry or thirsty."
● Disjunction (∨): Represents "or." For example, "IsHungry(x) ∨ IsThirsty(x)" means "x is either hungry or thirsty."
● Negation (¬): Represents "not." For example, "¬IsHungry(x)" means "x is not hungry."
● Implication (→): Represents "if...then..." For example, "IsHuman(x) → IsMortal(x)" means "if x is human, then x is mortal."
● Biconditional (↔): Represents "if and only if." For example, "IsMarried(x, y) ↔ IsSpouse(x, y)" means "x is married to y if and only if x is a spouse of y."
isInteger(x)
○ We can represent atomic sentences as Predicate (term1, term2, ......, term n).
○ For all x
○ For each x
○ For every x.
It is denoted by the logical operator ∃, which resembles as inverted E. When it is used with a
predicate variable then it is called as an existential quantifier.
If x is a variable, then existential quantifier will be ∃x or ∃(x). And it will be read as:
1. Interpretation: An interpretation defines the domain of discourse (the set of objects), assigns meanings to constants, and specifies
the relationships defined by predicates. For example, in an interpretation, "Alice" might be assigned to a specific individual, "IsHungry"
might be defined to mean a person is hungry, and "IsParent" might represent the parent-child relationship.
2. Evaluation of Atomic Formulas: Atomic formulas are evaluated by substituting the constants or variables with their assigned
values in the interpretation. If the predicate holds for the specific objects and their relationships, the atomic formula is true; otherwise,
it is false.
3. Evaluation of Complex Formulas: Complex formulas are evaluated using truth tables, similar to propositional logic. Logical
connectives determine the truth value of compound statements based on the truth values of their component formulas. For example,
"IsHungry(x) ∧ IsEating(x)" is true if both "IsHungry(x)" and "IsEating(x)"
Answer: ∃x∀y¬Likes(y,x)
Answer: ∀x∃yG(y,x)
Answer: ∃x(Rainy(x)∧¬Cold(x))
Answer: ∃x(Glitters(x)∧¬Gold(x))
Substitution: Substitution is a fundamental operation performed on terms and formulas. It occurs in all inference systems in first-order logic. The substitution is complex in the presence of
quantifiers in FOL. If we write F[a/x], so it refers to substitute a constant "a" in place of variable "x".
Equality:First-Order logic does not only use predicate and terms for making atomic sentences but also uses another way, which is equality in FOL. For this, we can use equality symbols which
specify that the two terms refer to the same object.
As in the above example, the object referred by the Brother (John) is similar to the object referred by Smith. The equality symbol can also be used with negation to represent that two terms are not
the same objects.
As propositional logic we also have inference rules in first-order logic, so following are some basic inference rules in FOL:
○ Universal Generalization
○ Universal Instantiation
○ Existential Instantiation
○ Existential introduction
○ It can be represented as
○ This rule can be used if we want to show that every element has a similar property.
Example: Let's represent, P(c): "A byte contains 8 bits", so for ∀ x P(x) "All bytes contain 8 bits.", it will also be true.
Example:
○ The new KB is not logically equivalent to old KB, but it will be satisfiable if old KB was satisfiable.
○ This rule states that one can infer P(c) from the formula given in the form of ∃x P(x) for a new constant symbol c.
○ The restriction with this rule is that c used in the rule must be a new term for which P(c ) is true.
○ It can be represented as
Example:
So we can infer: Crown(K) ∧ OnHead( K, John), as long as K does not appear in the knowledge base.
● Prolog is a declarative language, which means that a program consists of data based on the facts and rules
(Logical relationship) rather than computing how to find a solution.
● A logical relationship describes the relationships which hold for the given application.
● To obtain the solution, the user asks a question rather than running a program. When a user asks a question,
then to determine the answer, the run time system searches through the database of facts and rules.
● In prolog, logic is expressed as relations (called as Facts and Rules). Core heart of prolog lies at
the logic being applied. Formulation or Computation is carried out by running a query over these relations.
Facts − A fact is a predicate expression that makes a declarative statement about the problem domain. Whenever a variable
occurs in a Prolog expression, it is assumed to be universally quantified.
Eg. likes(john, susie). /* John likes Susie */
Rules − A rule is a predicate expression that uses logical implication (:-) to describe a relationship among facts.
This sentence is interpreted as: left_hand_side if right_hand_side. The left_hand_side is restricted to a single, positive, literal, which means
it must consist of a positive atomic expression. It cannot be negated and it cannot contain logical connectives.
This notation is known as a Horn clause. In Horn clause logic, the left hand side of the clause is the conclusion, and must be a single
positive literal. The right hand side contains the premises. The Horn clause calculus is equivalent to the first-order predicate calculus.
Questions/Query − The Prolog interpreter responds to queries about the facts and rules represented in its database. The database is
assumed to represent what is true about a particular problem domain. In making a query you are asking Prolog whether it can prove that
your query is true. If so, it answers "yes" and displays any variable bindings that it made in coming up with the answer. If it fails to prove
the query true, it answers "No".
Variables begin with an uppercase letter. Predicate names, function names, and the names for objects must begin with
a lowercase letter. Rules for forming names are the same as for the predicate calculus..
Constants
Symbols
Prolog expressions are comprised of the following truth-functional symbols, which have the same interpretation as in
the predicate calculus.
Example:
friends(raju, mahesh).
singer(sonu).
odd_number(5).
Explanation :
These facts can be interpreted as :
raju and mahesh are friends.
sonu is a singer.
5 is an odd number.
Advantages :
1. Easy to build database. Doesn’t need a lot of programming effort.
2. Pattern matching is easy. Search is recursion based.
3. It has built in list handling. Makes it easier to play with any algorithm involving lists.
Disadvantages :
1. LISP (another logic programming language) dominates over prolog with respect to I/O features.
2. Sometimes input and output is not easy.
Applications :
Prolog is highly used in artificial intelligence(AI). Prolog is also used for pattern matching over
KCS 071 language
natural Unit 3 parse trees. Ankita Singh
Unification
● Unification in First-Order Logic (FOL) is a process of making two logical expressions identical by finding a substitution
for their variables.
● Unification tries to determine if there exists a substitution that, when applied to the terms or predicates, makes the two
expressions syntactically identical.
● Let Ψ1 and Ψ2 be two atomic sentences and 𝜎 be a unifier such that, Ψ1𝜎 = Ψ2𝜎, then it can be expressed as UNIFY(Ψ1, Ψ2).
Substitution θ = {John/x} is a unifier for these atoms and applying this substitution, and both expressions will be identical.
Substitution: This is the process of replacing variables in a term with other terms (which could be variables or constants). For
example, the substitution {x → a} replaces the variable x with the constant a.
Unifier: A substitution that, when applied to two expressions, makes them identical. If such a substitution exists, the
expressions are said to be unifiable.
Most General Unifier (MGU): The most general unifier is the substitution that unifies two expressions in the most general way,
meaning that any other unifier can be derived from this one by further substitutions.
2. Matching Constants:
○ If two terms are constants, they must be identical to unify. If they are different constants, unification fails.
○ Example: a and a can be unified, but a and b cannot.
3. Unifying Variables:
○ A variable can be unified with a constant, another variable, or a compound term (like a function or predicate with
arguments). This is done by substituting the variable with the appropriate term.
○ Example: x can be unified with a, or with a more complex term like f(y).
4. Non-Occurs Check:
○ A variable cannot be unified with a term that contains that same variable (this would lead to an infinite loop). This
is known as the occurs-check condition.
○ Example: x cannot be unified with f(x) because x occurs within the term f(x). This would cause a circular reference,
leading to an unsolvable situation.
1. Compare the expressions: Check if the top-level function symbols or constants are the same. If not, the expressions are
not unifiable.
2. Check variables: If one of the terms is a variable, apply a substitution to make the expressions match.
○ Example: To unify P(x) and P(a), you can substitute x with a.
3. Recursive unification: If the expressions contain sub-terms (e.g., functions or predicates with arguments), repeat the
process for each argument.
4. Apply the unifier: If possible, apply the most general unifier to both expressions to make them identical.
1. Start by comparing the outermost functions: both are f, so proceed to unify the arguments.
2. Unify the first arguments: x and a. The substitution {x→a}will make the first arguments the same.
3. Now unify the second arguments: g(y) and g(z). Since both are functions with the same outer function g, unify the inner
arguments y and z, giving the substitution {y→z}.
I. f(Marcus)and f(Caesar)
Step 1: Ψ1 = f(Marcus) Ψ2 =f(Caeser), Check if the function symbols match. In this case, both are f, so we proceed to unify the
arguments.
Step 2: Compare the arguments. Here, we have Marcus and Caesar, which are two distinct constants.
Since constants cannot be unified if they are different, the unification fails.
Step 2: Unify the arguments. Here, we need to unify x (a variable) with g(y) (a function). Variables can be unified with functions, so
we substitute x with g(y).
Substitution Ө = {g(y) / x}
Ψ1 = f(g(y)) Ψ2 =f(g(y)),
Step 2: Unify the first pair of arguments: Marcus and x. Since x is a variable, it can be unified with the constant Marcus.
Substitution Ө={Marcus/x}
Ψ1 = (Marcus,g(Marcus,y)) Ψ2 =f(Marcus,g(Caesar,Marcus))
Step 3: Now, we move to the second pair: g(x,y) and g(Caesar, Marcus). Since both are functions with the same symbol g, we can
unify their arguments. Notice after substituting x with Marcus, we now need to unify g(Marcus, y) with g(Caesar, Marcus).
Substitution Ө={Caeser/Marcus} Unify Marcus (first argument) with Caesar: This fails, as constants Marcus and Caesar
cannot be unified.
a) Forward chaining
b) Backward chaining
Facts:
Rules:
If a person has a cough and a sore throat, they have the flu.
The Forward-chaining algorithm starts from known facts, triggers all rules whose premises are satisfied, and add their
conclusion to the known facts. This process repeats until the problem is solved.
Properties of Forward-Chaining:
● Country A has some missiles. ∃p Owns(A, p) ∧ Missile(p). It can be written in two definite clauses by using Existential Instantiation, introducing
new Constant T1.
Missile(T1) .......(3)
● Robert is American
American(Robert). ..........(8)
Step-1:
In the first step we will start with the known facts and will choose the sentences which do not have implications, such as:
American(Robert), Enemy(A, America), Owns(A, T1), and Missile(T1). All these facts will be represented as below.
Missile(T1) .......(3)
American(Robert). ..........(8)
At the second step, we will see those facts which infer from available facts and with satisfied premises.
Rule-(1) does not satisfy premises, so it will not be added in the first iteration.
Rule-(2) and (3) are already added.
Rule-(4) satisfy with the substitution {p/T1}, so Sells (Robert, T1, A) is added, which infers from the conjunction of Rule (2) and (3).
Rule-(6) is satisfied with the substitution(p/A), so Hostile(A) is added and which infers from Rule-(7).
Missile(T1) .......(3)
American(Robert). ..........(8)
At step-3, as we can check Rule-(1) is satisfied with the substitution {p/Robert, q/T1, r/A}, so we can add Criminal(Robert) which infers all the
available facts. And hence we reached our goal statement.
Missile(T1) .......(3)
American(Robert). ..........(8)
Step-1:
At the first step, we will take the goal fact. And from the goal fact, we will infer other facts, and at last, we will prove those facts true. So our goal fact
is "Robert is Criminal," so following is the predicate of it.
At the second step, we will infer other facts form goal fact which satisfies the rules. So as we can see in Rule-1, the goal predicate Criminal (R
present with substitution {Robert/P}. So we will add all the conjunctive facts below the first level and will replace p with Robert.
Missile(T1) .......(3)
American(Robert). ..........(8)
Missile(T1) .......(3)
American(Robert). ..........(8)
Missile(T1) .......(3)
American(Robert). ..........(8)
At step-5, we can infer the fact Enemy(A, America) from Hostile(A) which satisfies Rule- 6. And hence all the statements are proved true using
backward chaining.
Missile(T1) .......(3)
American(Robert). ..........(8)
● Resolution is used, if there are various statements are given, and we need to prove a conclusion of those
statements.
● Resolution is a single inference rule which can efficiently operate on the conjunctive normal form or clausal
form.
To better understand all the above steps, we will take an example in which we will apply resolution.
In the first step we will convert all the given statements into its first order logic.
In First order logic resolution, it is required to convert the FOL into CNF as CNF form makes easier for resolution proofs.
1. Eliminate all implication (→) and rewrite (by following equivalence rule P→Q is equivalent to ¬P∨Q)
a. ∀x: food(x) → likes(John, x) a. ∀x ¬ food(x) V likes(John, x)
b. food(Apple) ∧ food(vegetables) b. food(Apple) Λ food(vegetables)
c. ∀x ∀y: eats(x, y) ∧ ¬killed(x) → food(y) c. ∀x ∀y ¬ [eats(x, y) Λ ¬ killed(x)] V food(y)
d. eats(Anil, Peanuts) ∧ alive(Anil) d. eats (Anil, Peanuts) Λ alive(Anil)
e. ∀x : eats(Anil, x) → eats(Harry, x) e. ∀x ¬ eats(Anil, x) V eats(Harry, x)
f. ∀x: ¬killed(x) → alive(x) f. ∀x¬ [¬ killed(x) ] V alive(x)
g. ∀x: alive(x) → ¬killed(x)
g. ∀x ¬ alive(x) V ¬ killed(x)
likes(John, Peanuts)
likes(John, Peanuts)
KCS 071 Unit 3 Ankita Singh
2. Move negation (¬)inwards and rewrite
When converting a formula to CNF, we need to eliminate existential quantifiers while preserving the formula’s logical equivalence.
Skolemization accomplishes this by replacing existentially quantified variables with function or constants(making the formula simpler and
easier to work with in proofs.
In this example problem since there is no existential quantifier so all the statements will remain same in this step.
In this statement, we will apply negation to the conclusion statements, which will be written as ¬likes(John, Peanuts)
Now in this step, we will solve the problem by resolution tree using substitution. For the above problem, it will be given as follows:
resolution rule
a) ¬ food(x) V likes(John, x)
b) food(Apple)
c) food(vegetables)
d) ¬ eats(y, z) V killed(y) V food(z)
e) eats (Anil, Peanuts)
f) alive(Anil)
g) ¬ eats(Anil, w) V eats(Harry, w)
h) killed(g) V alive(g)
i) ¬ alive(k) V ¬ killed(k)
likes(John, Peanuts).
Logic-Based Representation:
• Propositional Logic: Uses simple statements that are either true or false.
• Predicate Logic: Extends propositional logic with predicates that can express relations among objects and
quantifiers to handle multiple entities.
• Example: Representing the relationship, "All humans are mortal," can be written in predicate logic as
∀x (Human(x) → Mortal(x)).
• Example: A node for "Socrates" linked by an "is a" edge to a "Human" node, and
1. Nodes: These represent objects, concepts, or entities. For instance, "Dog," "Animal," "Barks," and "Has Fur" might each be a node in a
network.
2. Edges: These represent relationships between nodes. Common relationships include:
○ Is-a (Inheritance): Shows class-subclass relationships. For example, "Dog is-a Animal."
○ Has-a (Possession): Shows possession relationships. For example, "Dog has Fur."
○ Part-of (Composition): Shows part-whole relationships, such as "Engine part-of Car."
3. Properties and Attributes: Nodes can have specific attributes or properties. For example, a "Dog" node may have properties like
"Color," "Size," or "Breed."
4. Inheritance: Properties and relationships can be inherited in a hierarchy. If "Dog is-a Animal" and "Animals breathe," then "Dog"
inherits the "breathe" property.
• Frames are the AI data structure which divides knowledge into substructures by representing stereotypes situations.
It consists of a collection of slots and slot values. These slots may be of any type and sizes. Slots have names and
values which are called facets.
• Frames are derived from semantic networks and later evolved into our modern-day classes and objects.
• Example: A frame for "Bird" might include properties like "has feathers," "can fly," and actions like "lay eggs."
Production Rules:
• Consist of sets of rules in the form of IF-THEN constructs that are used to derive conclusions from given data.
• Example: IF the patient has a fever and rash, THEN consider a diagnosis of measles.
● Complex domains such as shopping on the Internet or driving a car in traffic require more general and
flexible representations.
● Representations of abstract concepts such as Events, Time, Physical Objects, and Beliefs that occur
in many different domains is called ontological engineering.
● Representing everything in the world is overwhelming, so rather than describing everything in detail,
we’ll create a foundational framework with placeholders.
● For instance, we’ll define general concepts like “physical object,” and specific details about types of
objects (such as robots, televisions, or books) can be added as needed. This allows new knowledge to
be integrated into the framework over time without needing an exhaustive initial description.
● While interactions happen with specific objects, much reasoning occurs at the category level. For instance,
someone may aim to buy a basketball in general, not a specific one like BB9.
● Categories also serve to make predictions about objects once they are classified. For example, based on its
appearance and placement in the fruit aisle, one can identify an object as a watermelon, and infer it's suitable
for a fruit salad.
● In first-order logic, categories can be represented either as predicates (e.g., Basketball(b)) or reified as objects
(e.g., Basketballs, with b∈Basketballs indicating membership).
● Categories also organize knowledge through inheritance; properties assigned to a broader category are
passed down to its subcategories. For example, if all Food is edible, and Fruit and Apples are subclasses, then all
apples are edible by inheritance.
● Categories are arranged in taxonomies (hierarchies) to reflect subclass relationships. This has applications in
biology, library science, and government systems, where organized classifications simplify knowledge.
Objects can be grouped into PartOf hierarchies, reminiscent of the Subset hierarchy:
PartOf (x, x) .
● While some properties like length are easy to quantify, others—such as difficulty, beauty, or
deliciousness—are harder to measure numerically,
● Such measures can still be meaningfully ordered (e.g., Exercise A is tougher than Exercise B). These
qualitative comparisons are sufficient for decision-making and form the foundation of qualitative physics, a
subfield of AI focused on reasoning about physical systems without exact numerical values.
● By reasoning at the level of large objects such as apples and cars, we can overcome the complexity involved in dealing with
vast numbers of primitive objects individually.
● Types of Objects:
● Stuff- Refers to materials or substances without clear individual boundaries or distinct units. Eg. Butter
● Things- Refers to discrete, countable objects with clear boundaries and individuality. Eg. dog
Stuff differs from things in that parts of stuff are also still that stuff, unlike discrete objects (e.g., half a dog is not two dogs).
● Objects has intrinsic properties (like density and color) which belong to the very substance of the object, rather than to the
object as a whole whereas extrinsic properties (like weight and shape) are not retained after subdivision.
● Categories defined by intrinsic properties are stuff / substance / mass noun, while those with extrinsic properties are Things /
count noun.
Event calculus is a logical framework used in artificial intelligence to model and reason about events and their effects over
time.
1. Time: Events are tied to specific times or intervals, enabling us to track when changes happen and how long they last.
2. Fluents: Properties or conditions that may vary over time (e.g., At(Shankar, Berkeley)). Fluents do not imply truth by
themselves; we use a predicate to confirm whether a fluent holds at a particular time.
The fluent At(Shankar, Berkeley): is an object that refers to the fact of Shankar being in Berkeley, but does not by itself
say anything about whether it is true.
To assert that a fluent is actually true at some point in time we use the predicate T, as in T(At(Shankar, Berkeley), t).
3. Events: Occurrences or actions that can cause changes in the state of the world. For example, Shankar flying from SF to DC
is an event that may alter Shankar's location. E1 ∈ Flyings(Shankar , SF , DC) .
For example, suppose Alice asks “what is the square root of 1764” and Bob replies “I don’t know.” If Alice insists “think
harder,” Bob should realize that with some more thought, this question can in fact be answered. On the other hand,
if the question was “Is your mother sitting down right now?” then Bob should realize that thinking harder is unlikely to
help.
we need is a model of the mental objects that are in someone’s head (or something’s knowledge base) and of the
mental processes that manipulate those mental objects.
Mental Objects are the static entities within an agent's mind, like ideas, beliefs, or memories.
Mental Events refer to the occurrences that happen within an agent's mind, such as thoughts, decisions, or
intentions.
Propositional attitudes, like Believes, Knows, and Intends, are attitudes an agent has towards mental objects e.g., "Lois knows that
Superman can fly").
Unlike normal predicates, they don’t follow standard logical rules, particularly when dealing with equality.
if "Superman is Clark Kent" is true, standard logic would imply that "Lois knows Clark can fly," even though Lois doesn't know
Superman's true identity.
In cases, if our agent knows that 2 + 2 = 4 and 4 < 5, then we want our agent to know that 2 + 2 < 5. This property is called
referential transparency
Thus in standard logic (with referential transparency), terms can be swapped freely if they refer to the same entity. However,
propositional attitudes require referential opacity—where the terms matter because agents might not know they refer to the
same thing. This means we can’t always substitute "Clark" for "Superman" without changing the meaning for an agent like Lois.
● It takes two arguments, an agent (written as the subscript) and a sentence. The syntax of modal logic is the same as
first-order logic, except that sentences can also be formed with modal operators.
● Agents' knowledge can be represented as "possible worlds"(rather than just one true world) connected by accessibility
relations(one relation for each modal operator), which show what an agent can know or believe. For instance, Lois might
have access to worlds where "Superman is not Clark," reflecting her incomplete knowledge.
● In summary, modal logic and possible worlds help handle the complexity of knowledge and belief but come with
challenges in representing realistic reasoning limits.
1.Semantic networks provide graphical aids for visualizing a knowledge base and efficient algorithms for inferring properties of
an object on the basis of its category membership;
2.Description logics provide a formal language for constructing and combining category definitions and efficient algorithms for
deciding subset and superset relationships between categories
Drawback of semantic network notation: links between bubbles represent only binary relations.
For example, the sentence Fly(Shankar , NewYork, NewDelhi ,Yesterday) cannot be asserted directly in a semantic network.
Nonetheless, we can obtain the effect of n-ary assertions by reifying the proposition itself as an event belonging to an
appropriate event category. Figure shows the semantic network structure for this particular event. Notice that the restriction
to binary relations forces the creation of a rich ontology of reified concepts.
● Description logic systems evolved from semantic networks to formalize what the networks
mean while retaining the emphasis on taxonomic structure as an organizing principle.
● The principal inference tasks for description logics are subsumption (checking if one category is
a subset of another by comparing their definitions) and classification (checking whether an
object belongs to a category).
● Some systems also include consistency of a category definition—whether the membership
criteria are logically satisfiable.
● The CLASSIC language (Borgida et al., 1989) is a typical description logic
● Traditional logic systems are monotonic, meaning that adding new information doesn't retract any previous conclusions.
However, default reasoning is nonmonotonic because new information can invalidate previous assumptions. For instance,
if you later learn that the bird is a penguin, you retract the assumption that it can fly.
For instance: If X is a bird, assume X can fly (unless specified otherwise)\text{If X is a bird, assume X can fly (unless
specified otherwise)}If X is a bird, assume X can fly (unless specified otherwise)
This rule captures the default (flying), but allows for exceptions (non-flying birds like penguins or ostriches).
Open-World Assumption (OWA): Lack of information doesn’t imply falsity. In a large, open
environment, it’s unsafe to assume something is false just because it hasn’t been explicitly stated.
Various methods, such as default logic and circumscription, are used to encode default reasoning in
AI systems.
Default logic allows for defaults with exceptions, while circumscription limits the range of
assumptions the system can make, thereby constraining what it considers to be true by default.
Ambiguity and Vagueness: Human knowledge is often not clear-cut. AI systems must handle this ambiguity, which is
challenging because logic prefers exactness.
Handling Incomplete or Uncertain Information: Real-world data is rarely perfect, so AI systems have to make decisions even
when information is missing or only partially accurate. This is why reasoning with defaults and probabilistic approaches are
useful.