Quiz 2

🤖 Intelligent Agents & Problem Solving

1013 words
5 min read
Python Week 1: the first filter for runtime behavior
Visual companion
Python
Type and operator map

Python Week 1: the first filter for runtime behavior

View
Revision summary

What this note is really saying

Short form

# 🤖 Intelligent Agents & Problem Solving ## 1. 🎯 Learning Objectives By the end of this topic, you will be able to: - Define the PEAS framework and apply it to any AI problem - Distinguish between configuration problems and planning problems - Classify problems by observability, determinism, episodicity, dynamics,...

🤖 Intelligent Agents & Problem Solving

1. 🎯 Learning Objectives

By the end of this topic, you will be able to:
  • Define the PEAS framework and apply it to any AI problem
  • Distinguish between configuration problems and planning problems
  • Classify problems by observability, determinism, episodicity, dynamics, and continuity
  • Describe the general problem-solving approach: goal formulation -> problem formulation -> search -> execution
  • Explain the role of knowledge and reasoning in intelligent agents

2. 📋 Prerequisites

PrerequisiteCourseWhy It Matters
Agent conceptsBSCS3003 W1Builds on the definition of intelligent agents
State spacesBSCS2002Graph-based problem representation

3. 📖 Core Content

3.1 The PEAS Framework

Every intelligent agent can be described by its PEAS components:
  • Performance measure: What metrics define success?
  • Environment: What is the world the agent operates in?
  • Actuators: What actions can the agent take?
  • Sensors: What information can the agent perceive? Example: A Self-Driving Taxi
ComponentDescription
PerformanceSafety, speed, legality, comfort, profit
EnvironmentRoads, traffic, weather, pedestrians, other vehicles
ActuatorsSteering wheel, accelerator, brake, signal, horn
SensorsCameras, LIDAR, radar, GPS, speedometer, microphones
Example: An 8-Puzzle Solver
ComponentDescription
PerformanceMinimize moves to reach goal configuration
EnvironmentThe 3x3 grid of numbered tiles
ActuatorsMove blank tile Up/Down/Left/Right
SensorsCurrent tile positions on the board

3.2 Configuration vs. Planning Problems

This is a critical distinction tested heavily in exams:
AspectConfiguration ProblemPlanning Problem
GoalFind a state satisfying conditionsFind a path from start to goal
SolutionThe goal state itselfSequence of actions
Path matters?NoYes
ExamplesN-Queens, Sudoku, SAT8-puzzle, Route-finding, Rubik's Cube
Search focusState space explorationPath space exploration
Configuration Problem Example — N-Queens: Place N queens on an N×N board so that no two queens attack each other. Any valid arrangement is acceptable — we do not care how we got there. Planning Problem Example — 8-Puzzle: Start from a scrambled configuration and reach the goal. The sequence of moves matters because we need to actually perform them.

3.3 Problem Classification

Environments and problems are classified along five dimensions:
  1. Observability: Fully observable (agent sees complete state) vs. partially observable (hidden information)
  2. Determinism: Deterministic (next state completely determined by action) vs. stochastic (probabilistic outcomes)
  3. Episodicity: Episodic (each action independent) vs. sequential (actions have long-term consequences)
  4. Dynamics: Static (world unchanged while agent thinks) vs. dynamic (world changes during deliberation)
  5. Continuity: Discrete (finite number of states/actions) vs. continuous (real-valued parameters) Examples:
ProblemObservableDeterministicEpisodicStaticDiscrete
8-PuzzleFullYesSequentialStaticDiscrete
ChessFullYesSequentialSemi-dynamicDiscrete
Self-drivingPartialStochasticSequentialDynamicContinuous
SudokuFullYesEpisodicStaticDiscrete

3.4 The General Problem-Solving Approach

(Diagram) Step 1: Goal Formulation Define the objective. What state do we want to reach? For an 8-puzzle, the goal is the tiles in order. For a TSP, the goal is a tour that visits all cities with minimum distance. Step 2: Problem Formulation Define the state space, initial state, actions, transition model, and goal test:
  • State space: Set of all reachable configurations
  • Initial state: Starting configuration
  • Actions: Available moves/operators
  • Transition model: Result of applying an action to a state
  • Goal test: Function that checks if a state satisfies the goal Step 3: Search The process of considering possible sequences of actions. This is what the rest of this course covers — different strategies for exploring the state space. Step 4: Execution Carry out the solution found by search.

3.5 Knowledge and Reasoning in Agents

An agent's effectiveness depends on how much it knows about its environment: Model-based agents maintain an internal model of how the world works. They can reason about what would happen if they took various actions, even before trying them. Goal-based agents have explicit goals and select actions that lead toward those goals. This is the foundation of search-based AI. Utility-based agents not only try to achieve goals but try to maximize some measure of performance (utility). This allows them to make trade-offs between competing objectives. (Diagram)

4. 📐 Key Formulas / Concepts

ConceptDefinition
PEASPerformance, Environment, Actuators, Sensors
State spaceSet of all reachable configurations from the initial state
Branching factor (b)Average number of legal moves from any state
Solution depth (d)Number of actions in the shortest solution
Configuration problemFind a state satisfying constraints (N-Queens, Sudoku)
Planning problemFind a path from start to goal (8-puzzle, route-finding)

5. ⚠️ Common Pitfalls

Pitfall 1: Confusing Configuration and Planning

The mistake: Treating a problem as planning when only the goal state matters. How to catch it: Ask "Does the path to the solution matter?" If only the final arrangement matters, it is a configuration problem.

Pitfall 2: Ignoring Problem Characteristics

The mistake: Applying an algorithm designed for fully observable, deterministic problems to a partially observable, stochastic domain. Correct approach: Classify the problem first, then choose an appropriate search method.

Pitfall 3: Forgetting the Goal Formulation Step

The mistake: Jumping directly to search without clearly defining what success looks like. Correct approach: Always start with goal formulation — ambiguous goals lead to wasted search effort.

6. 📝 Practice Questions

Q1: Define the PEAS framework for an 8-puzzle solver.
Answer: P = minimize moves to goal; E = 3x3 grid with numbered tiles; A = move blank Up/Down/Left/Right; S = current tile positions. Q2: Is Sudoku a configuration problem or a planning problem? Explain.
Answer: Sudoku is a configuration problem. We only care about the final filled grid satisfying all constraints — not the sequence of numbers we write. Any valid solution is acceptable regardless of how we reach it. Q3: Classify the game of chess on the five dimensions.
Answer: Fully observable (both players see the board), Deterministic (same move always produces same result), Sequential (each move affects future possibilities), Semi-dynamic (opponent moves while we think), Discrete (finite set of states). Q4: Explain the four steps of the general problem-solving approach.
Answer: (1) Goal formulation — define the objective; (2) Problem formulation — define state space, actions, transitions; (3) Search — explore possibilities; (4) Execution — carry out the solution. Q5: What distinguishes a model-based agent from a simple reflex agent?
Answer: A simple reflex agent responds to current percepts with condition-action rules. A model-based agent maintains an internal model of the world and can reason about action outcomes before acting. Join Discord PreviousHistory & Philosophy of AINextAI Philosophy
Document outline

Keep your place and jump directly to a heading.

Table of Contents
System Normal // Awaiting Context

Intelligence Hub

Navigate the knowledge graph to generate context. The Hub adapts dynamically to surface backlinks, related notes, and metadata insights.