2.7 Problem-Solving and Learning Agents (BT104CO)

1. The Problem-Solving Agent

A Problem-Solving Agent is a type of Goal-Based Agent. It decides what to do by finding sequences of actions that lead to desirable states.

1 Goal Formulation: Decides which state is "desirable" (e.g., reaching Kathmandu).
2 Problem Formulation: Decides which actions and states to consider given the goal.
3 Search: Simulates action sequences in its "head" to find a path to the goal.
4 Execution: Once a solution is found, the agent performs the actions one by one.
Crucial Note: Problem-solving agents usually operate in "Open-loop" systems—they ignore their sensors while executing, assuming the world is deterministic.

2. Problem Formulation (The 5-Tuple)

To turn a vague desire into a computable problem, we must formally define these five components:

1 Initial State: Where the agent starts (e.g., In(Lalitpur)).
2 Actions: The set of possible moves available in a state $s$.
3 Transition Model: The result of an action, expressed as $Result(s, a)$.
4 Goal Test: A function checking if the current state matches the target.
5 Path Cost: A numeric cost (distance, time, fuel) assigned to a path.

3. The Learning Agent

While standard agents rely on pre-programmed knowledge, a Learning Agent adapts in unknown environments.

Learning Element

Responsible for making improvements to the agent's logic based on feedback.

Performance Element

This is the actual "agent" that selects actions based on percepts.

The Critic

Compares results against a fixed performance standard to judge success.

Problem Generator

Suggests "exploratory" actions to help the agent learn more about the world.

4. Agent Comparison Summary

Agent Type Knowledge Source Decision Basis Uncertainty?
Problem-Solving Pre-defined Model Search/Planning No (Deterministic)
Simple Reflex Hard-coded Rules Current Percept Poorly
Learning Agent Experience Feedback/Critic Yes (Adapts)

5. Knowledge Representation Levels

Atomic

State is a single unit/node with no internal parts (e.g., map node).

Factored

State is split into variables (e.g., GPS coordinates + Fuel level).

Structured

State includes relations (e.g., "The key is inside the box").

Exam Tip

Focus on the Problem Generator. It's the most unique part—it encourages "exploration" so the agent doesn't just repeat safe actions forever but finds better solutions over time.

Practice Quiz