UNIT 4: Uncertain Knowledge & Intelligent
Agents
This comprehensive document covers the core concepts of handling uncertainty in Artificial Intelligence
and the architecture of Intelligent Agents, aligned with the [Link] syllabus.
PART I: UNCERTAINTY
1. Handling Uncertain Knowledge
In traditional logic-based AI, knowledge is assumed to be absolute (True or False). However, real-
world environments are characterized by partial observability, non-determinism, and ignorance.
An agent must act even when it lacks complete certainty.
• Ignorance: Lack of complete data about the domain.
• Laziness: It is too much work to list the complete set of antecedents or consequents needed to
ensure an exceptionless rule.
• Theoretical Ignorance: Medical science, for example, has no complete theory for all diseases.
We use probability theory to express degrees of belief ranging from 0 (certainly false) to 1 (certainly
true).
2. Rational Decisions
When an agent operates under uncertainty, it must evaluate different actions based on their likely
outcomes. The principle of Maximum Expected Utility (MEU) dictates that a rational agent should
choose the action that maximizes its expected utility.
Expected Utility = Σ [ P(Outcome) × Utility(Outcome) ]
An agent combining probability theory (beliefs) with utility theory (desires) forms the basis of
Decision Theory.
3. Basics & Axioms of Probability
Probability allows agents to quantify uncertainty. Variables can be discrete (e.g., Boolean) or
continuous.
The Axioms of Probability (Kolmogorov's Axioms):
1. All probabilities are between 0 and 1: 0 ≤ P(A) ≤ 1
2. Necessarily true propositions have probability 1, and necessarily false have 0: P(True) = 1,
P(False) = 0
3. The probability of a disjunction is given by:
P(A ∨ B) = P(A) + P(B) − P(A ∧ B)
4. Bayes' Rule and Conditional Independence
Conditional Probability: The probability of event A given that event B has occurred is denoted as
P(A|B).
Bayes' Rule: This is the cornerstone of modern AI for probabilistic reasoning. It allows an agent to
update its belief in a hypothesis (H) given new evidence (E).
P(H|E) = [P(E|H) × P(H)] / P(E)
Conditional Independence: Two variables X and Y are conditionally independent given Z if the
probability distribution of X is independent of Y when Z is known: P(X, Y | Z) = P(X | Z) × P(Y | Z).
This drastically reduces the computational complexity of probabilistic models.
5. Bayesian Networks
A Bayesian Network is a Directed Acyclic Graph (DAG) used to represent a joint probability
distribution over a set of random variables compactly.
• Nodes: Represent random variables (discrete or continuous).
• Directed Links (Edges): Represent direct causal dependencies. If there is a link from X to Y, X
is the parent of Y.
• Conditional Probability Tables (CPTs): Each node has a CPT quantifying the effect of the
parents on the node.
Bayesian networks exploit conditional independence to simplify complex joint distributions into
manageable local probabilities.
6. Exact and Approximate Inference in Bayesian Networks
Inference is the process of computing the posterior probability distribution of query variables given
a set of evidence variables.
• Exact Inference: Methods like Variable Elimination and Junction Tree Algorithm compute the
exact probabilities. However, this is NP-hard in the worst case for densely connected networks.
• Approximate Inference: For large networks, exact computation is intractable. We use
randomized sampling algorithms (Monte Carlo methods) such as Direct Sampling, Rejection
Sampling, Likelihood Weighting, and Markov Chain Monte Carlo (MCMC) / Gibbs Sampling.
7. Fuzzy Logic
Unlike standard boolean logic (where truth values are exactly 0 or 1) and unlike probability (which
measures the likelihood of an event), Fuzzy Logic represents the degree of truth. It handles
vagueness.
For example, instead of defining "Tall" strictly as > 180 cm, a fuzzy membership function assigns a
degree of membership to "Tall" for any height (e.g., 175 cm might be 0.6 Tall). Fuzzy logic systems
use fuzzification, rule evaluation, and defuzzification to make control decisions in ambiguous
environments.
PART II: INTELLIGENT AGENTS
1. Introduction to Intelligent Agents
An Agent is anything that can be viewed as perceiving its environment through sensors and
acting upon that environment through actuators. A human agent has eyes/ears as sensors and
hands/legs as actuators. A software agent has keystrokes/network packets as sensors and screen
displays as actuators.
2. Rational Agents
A Rational Agent is one that does the "right thing." Conceptually, this means maximizing its
expected performance based on its percept sequence and built-in knowledge.
PEAS Description: When designing an agent, we specify the task environment using PEAS:
• Performance Measure: Criteria for success (e.g., safety, speed, legal drive for an autonomous
car).
• Environment: The domain the agent operates in (e.g., roads, pedestrians).
• Actuators: Mechanisms to take action (e.g., steering, brakes).
• Sensors: Mechanisms to gather data (e.g., cameras, LIDAR).
3. Agent Structure & Types of Agents
The structure of an agent is defined as: Agent = Architecture + Program. There are several
principal types of agent architectures:
• Simple Reflex Agents: These agents select actions on the basis of the current percept only,
ignoring the rest of the percept history. They use Condition-Action rules (e.g., IF car-in-front-is-
braking THEN initiate-brake).
• Model-Based Reflex Agents: These agents maintain an internal state (a model of the world) to
handle partial observability. They keep track of the part of the world they cannot see now based
on percept history.
• Goal-Based Agents: Knowing the current state is not always enough; the agent needs a goal.
These agents use search and planning algorithms to consider future states and select actions
that lead to the goal.
• Utility-Based Agents: Goals just provide a binary success/failure. Utility agents measure how
happy they are in a state. They maximize a utility function, making trade-offs when there are
conflicting goals (e.g., speed vs. safety).
• Learning Agents: These have the ability to improve their performance over time. They contain
a learning element, a performance element, a critic, and a problem generator.
4. Behavior and Environment
The complexity of the agent depends significantly on the properties of the environment:
• Fully vs. Partially Observable: Can the agent's sensors detect the complete state of the
environment at all times?
• Deterministic vs. Stochastic: Is the next state uniquely determined by the current state and
the agent's action? If uncertainty exists, it is stochastic.
• Episodic vs. Sequential: In episodic environments, each decision is independent (e.g., image
classification). In sequential environments, current decisions affect all future decisions (e.g.,
chess).
• Static vs. Dynamic: Does the environment change while the agent is deliberating?
• Discrete vs. Continuous: Are there a limited number of distinct percepts and actions (chess),
or are they continuous (driving)?
The hardest task environments are partially observable, stochastic, sequential, dynamic, and
continuous.