Introduction to Artificial Intelligence and Intelligent Agents

Fundamentals and Overview of Artificial Intelligence

  • Definition of Artificial Intelligence (AI):

    • Artificial Intelligence is defined as the science and engineering of making intelligent machines, especially intelligent computer programs (John McCarthy, 2004).
    • AI is a branch of computer science focused on creating software and hardware capable of executing tasks that typically demand human intelligence, such as reasoning, learning, and decision-making.
    • It utilizes a combination of algorithms, logic, and data structures to simulate human cognitive functions without requiring step-by-step explicit programming for every single new scenario.
  • Perspectives on AI:

    • Layman's View: Intelligence demonstrated by machines that enables them to mimic human actions, learn from experience, adjust to new sensory inputs, and perform complex human tasks.
    • Researcher's View: A set of algorithms and processing pipelines capable of making autonomous, rational decisions and taking humane actions without explicit step-by-step instruction.
  • Historical Foundation:

    • Proposed by British mathematician and computer scientist Alan Turing in 1950 through his paper "Computing Machinery and Intelligence."
    • Turing posed the fundamental question, "Can machines think?" which established the benchmark known as the Turing Test to determine whether a machine exhibits human-equivalent intelligence.
  • Everyday Examples of AI:

    • Chess-Playing Computers: Analyze millions of potential move sequences and strategies per second to challenge and defeat top human players.
    • Self-Driving Cars: Employ deep learning and multisensor integration to perceive surroundings, execute real-time driving decisions, and navigate safely without human intervention.
    • Virtual Assistants (Siri, Alexa, Google Assistant): Integrate Deep Learning and Natural Language Processing (NLP) to parse voice commands, interpret semantics, query knowledge bases, and fulfill tasks.

Core Operational Mechanisms of AI Systems

  • Data Processing & Pattern Recognition:

    • AI operates by ingesting massive volumes of data (text, images, audio, or continuous sensor streams), detecting structured patterns, correlations, and trends through statistical algorithms.
    • Example: An email spam filter processes tens of thousands of sample emails tagged as "spam" or "non-spam," building a statistical model to classify incoming messages accurately over time.
  • Three Core Processes of AI Functioning:

    • Learning:
    • The initial phase where an AI system extracts structural patterns and data relationships, encoding them into model weights or rule sets.
    • Includes supervised learning, unsupervised learning, and reinforcement learning.
    • Example: Computer vision models analyzing thousands of labeled images to differentiate between cats and dogs.
    • Reasoning:
    • The capacity to make logical inferences and choose optimal actions based on learned information.
    • Inductive Reasoning: Deriving general rules or broad probabilistic theories from specific observations.
    • Deductive Reasoning: Deriving specific logical conclusions from general statements or proven premises.
    • Example: Navigation applications (such as Google Maps) reasoning over real-time traffic statistics and preferences to determine the fastest route.
    • Self-Correction:
    • Continuous evaluation and modification of internal algorithms following errors or degraded predictions to incrementally raise performance accuracy.
    • Example: Speech recognition tools continuously updating acoustic models based on user voice accent feedback.

Practical Advantages, Limitations, and Historical Evolution

  • Key Advantages of AI:

    • High Performance with Detailed Data: Processes vast, multidimensional datasets rapidly (e.g., medical diagnostics analyzing thousands of patient files to detect diseases faster than clinicians).
    • Reduced Processing Time: Automates tedious, repetitive procedures to operate at computational speeds (e.g., customer service chatbots handling multiple concurrent inquiries).
    • Consistency and Accuracy: Eliminates human performance degradation caused by fatigue, emotional stress, or cognitive bias.
    • 24×7 Availability: Runs continuously without downtime in critical industrial, military, or consumer environments.
    • Resource Optimization: Identifies system operational inefficiencies (e.g., logistics AI rerouting fleets to minimize fuel and travel time).
    • Automation of Complex Processes: Executes multi-variable tasks that exceed standard algorithmic computation.
    • Predictive Maintenance: Predicts mechanical failures prior to occurrence in heavy industry, eliminating sudden downtime.
    • Innovation and Quality Improvement: Accelerates advanced product engineering and dynamic design iterations.
  • Key Limitations and Challenges of AI:

    • High Cost of Development and Maintenance: Demands major capital investments in specialized hardware accelerators, data pipelines, and continuous maintenance.
    • Need for Technical Expertise: Requires advanced skills across software engineering, mathematical optimization, and domain-specific data engineering.
    • Shortage of Skilled Professionals: Global supply deficit of machine learning engineers restricts AI deployment in developing regions.
    • Dependence on Data Quality: Garbage-in, garbage-out paradigm; corrupted, incomplete, or historically biased training data causes flawed or illegal system outputs (e.g., biased automated recruitment systems).
    • Limited Generalization and Creativity: Current systems operate in narrow operational domains; they lack human common-sense reasoning and cannot seamlessly transfer knowledge across unaligned fields.
  • Chronological Milestones in the Evolution of AI:

The history of AI

  • 1943: Warren McCulloch and Walter Pitts publish "A Logical Calculus of the Ideas Immanent in Nervous Activity," proposing the first mathematical model of an artificial neuron and laying the groundwork for Artificial Neural Networks (ANNs).
  • 1950: Alan Turing publishes "Computing Machinery and Intelligence," introducing the Turing Test as an operational criteria for machine intelligence.
  • 1956: John McCarthy organizes the Dartmouth Conference and officially coins the term "Artificial Intelligence", establishing it as a formal academic discipline. Early programs like the Logic Theorist and General Problem Solver (GPS) follow.
  • 1966: Joseph Weizenbaum creates ELIZA, one of the earliest Natural Language Processing chatbots, simulating a Rogerian psychotherapist.
  • 1970s–1980s: The AI Winter, a prolonged period of reduced funding and slowed research due to unfulfilled high expectations and hardware limits.
  • 1997: IBM’s Deep Blue supercomputer defeats world chess champion Garry Kasparov in a six-game match using search algorithms that analyzed millions of positions per second.
  • 2011: Apple launches Siri on mobile devices; IBM Watson defeats human champions Brad Rutter and Ken Jennings on the quiz show Jeopardy!.
  • 2014: Amazon releases Alexa, bringing voice-controlled intelligent assistants into consumer homes.
  • 2016: Microsoft releases the chatbot Tay, which was withdrawn shortly after launch due to inappropriate remarks learned from user interactions; DeepMind’s AlphaGo defeats world Go champion Lee Sedol using deep neural networks and reinforcement learning.
  • 2017: DeepMind expands AlphaGo capabilities, solidifying reinforcement learning as a dominant paradigm.
  • 2018: The European Union establishes Ethics Guidelines for Trustworthy AI; Generative Pre-trained Transformer (GPT) architecture begins transforming language processing.
  • 2023 onwards: Generative AI tools (such as ChatGPT) mainstream conversational interfaces, multimodal generation, and creative automation.

Theoretical Foundations of AI

  • Logic in Artificial Intelligence:
    • Provides a formal mathematical language to encode knowledge, represent facts, and derive valid assertions through systematic inference.
    • Knowledge Representation: Encodes real-world relationships into symbolic forms. Example: "All humans are mortal" is expressed formally as: ∀x(Human(x)→Mortal(x))\forall x (\text{Human}(x) \rightarrow \text{Mortal}(x))
    • Inference and Decision-Making: Derives new facts from existing rules and inputs.
    • Fact: Socrates is human (Human(Socrates)\text{Human}(\text{Socrates})).
    • Rule: ∀x(Human(x)→Mortal(x))\forall x (\text{Human}(x) \rightarrow \text{Mortal}(x)).
    • Conclusion: Socrates is mortal (Mortal(Socrates)\text{Mortal}(\text{Socrates})).
    • Transparency and Explainability: Logic-based systems maintain fully traceable step-by-step reasoning chains, essential for high-stakes environments like medicine and law.
    • Chaining Example:
    • Rule 1: If it rains, the ground becomes wet.
    • Rule 2: If the ground is wet, the road is slippery.
    • Fact: It rains.
    • Logical Conclusion: The road is slippery.
    • Scenario Example: Smart Door System:
    • Unlocks (D=1D = 1) only when both face recognition (F=1F = 1) and correct code entry (C=1C = 1) are true: D=F∧CD = F \land C
    • Truth Table:
Face Recognized (FF)Code Correct (CC)Door Unlocks (D=F∧CD = F \land C)
000000
001100
110000
111111
  • Probability in Artificial Intelligence:

    • Mathematical framework for quantifying and managing uncertainty, operating on a continuous scale from 00 (impossible) to 11 (certain).
    • Essential for real-world environments with incomplete, noisy, or ambiguous data where deterministic logic fails.
    • Flu Diagnosis Scenario: If 10%10\% of a population has the flu and a patient presents with a fever, a probabilistic agent assigns relative likelihoods rather than absolute binary classifications:
    • Flu=60%\text{Flu} = 60\%
    • Cold=30%\text{Cold} = 30\%
    • Other=10%\text{Other} = 10\%
    • AI Weather Assistant Scenario:
    • Historical probability of rain on cloudy days = 70%70\% (0.700.70).
    • Historical probability of rain on clear days = 10%10\% (0.100.10).
    • Decision: If the current percept is cloudy, the agent chooses to carry an umbrella because the outcome probability (0.700.70) exceeds safety thresholds.
  • Cognitive Science in Artificial Intelligence:

    • The interdisciplinary study of the human mind, drawing from Psychology, Neuroscience, Linguistics, Philosophy, Anthropology, and Computer Science.
    • Biological Inspiration: Artificial Neural Networks (ANNs) mimic physical brain structure, adjusting connection weights in response to training errors in the same way biological synapses adjust strength.
    • Human-AI Interaction: Employs cognitive models of communication, perception, and emotion to build natural voice and conversational interfaces.
  • Integration of the Three Foundations:

    • Logic delivers precise, rule-based reasoning for structured facts.
    • Probability manages environmental noise, ambiguity, and risk assessment.
    • Cognitive Science guides human-centric interaction, interface design, and intuitive learning models.
    • Autonomous Vehicle Integration:
    • Logic: Enforces absolute safety rules (e.g., "If light is red →\rightarrow stop").
    • Probability: Assesses sensor noise (e.g., "85%85\% probability that an obstacle is a pedestrian").
    • Cognitive Science: Predicts pedestrian movements and formats user-friendly driver alerts.
    • Medical Diagnosis Assistant Integration:
    • Logic: Enforces verified clinical protocol trees.
    • Probability: Calculates disease probability given patient diagnostic histories.
    • Cognitive Science: Presents diagnostic summaries in formats aligned with clinical decision-making habits.

Classification and Types of Artificial Intelligence

Types of AI agents

  • Classification Based on Capabilities:

    • Weak AI (Narrow AI):
    • Engineered and trained to execute a single, highly specialized task.
    • Operates strictly within predefined boundaries; lacks general intelligence, self-awareness, or dynamic cross-domain application.
    • Key Characteristics: Single-function focus, requires human design parameters, simulates reasoning via pattern matching.
    • Examples: Apple Siri, Google Translate, Netflix recommendations, image classifiers.
    • Strong AI (Artificial General Intelligence - AGI):
    • Theoretical system possessing cognitive abilities comparable to a human across all intellectual domains.
    • Possesses autonomous reasoning, abstract planning, moral judgment, contextual empathy, and dynamic transfer learning (applying knowledge from one field to an unrelated task).
    • Examples (Conceptual): HAL 9000 (2001: A Space Odyssey), JARVIS (Iron Man).
    • Artificial Superintelligence (ASI):
    • Theoretical evolutionary step beyond AGI where machine intelligence vastly surpasses human performance across all cognitive, scientific, creative, and social dimensions.
  • Classification Based on Functionalities:

    • Reactive Machines:
    • Basic AI systems that act purely on immediate perceptual inputs without storing past experiences or maintaining state memory.
    • Example: IBM Deep Blue evaluates immediate chess board states without memory of prior games.
    • Limited Memory:
    • Systems capable of storing historical observation data over short temporal windows to inform immediate decisions.
    • Example: Self-driving cars monitoring velocity, distance, and vector trajectories of surrounding vehicles over recent seconds.
    • Theory of Mind:
    • Theoretical machines designed to understand human mental states, emotions, motives, and expectations, adjusting behavior based on psychological context.
    • Self-Awareness:
    • Theoretical ultimate stage of machine intelligence featuring complete self-consciousness, internal emotional states, and independent self-identity.

Agents and Environments

  • Core Definitions:
    • Agent: Anything that perceives its environment through sensors and acts upon that environment using actuators. Formally defined as an agent function mapping percept histories to actions: f:P∗→Af: P^* \rightarrow A
    • P∗P^*: The set of all possible percept sequences (inputs).
    • AA: The set of all executable actions (outputs).
    • Environment: The external world in which the agent operates, supplying percepts to the agent's sensors and reacting to the agent's executed actions.

Agent interaction with sensors

  • Types of Agents:

    • Human Agent: Sensors = biological organs (eyes, ears, nose, tongue, skin); Actuators = physical effectors (hands, legs, vocal cords).
    • Robotic Agent: Sensors = digital hardware (cameras, sonar, infrared range finders, LIDAR); Actuators = electro-mechanical systems (electric motors, hydraulic joints, wheels).
    • Software Agent: Sensors = digital data feeds (bit strings, network signals, system logs); Actuators = software commands (writing files, transmitting data packets, dynamic UI updates).
  • Vacuum-Cleaner World Case Study:

A vacuum-cleaner world with just two locations

  • Environment consists of two discrete locations: Square AA and Square BB.
  • Agent perceives its current location and whether that square contains dirt.
  • Actions available: Move Left\text{Move Left}, Move Right\text{Move Right}, Suck Dirt\text{Suck Dirt}, NoOp\text{NoOp}.
  • Simple rule logic: If current square is dirty, then suck dirt; otherwise, move to the adjacent square.

Partial tabulation of a simple agent function for the vacuum-cleaner world

  • Partial Agent Function Mapping:
Percept SequenceAction
[A,Clean][A, \text{Clean}]Right\text{Right}
[A,Dirty][A, \text{Dirty}]Suck\text{Suck}
[B,Clean][B, \text{Clean}]Left\text{Left}
[B,Dirty][B, \text{Dirty}]Suck\text{Suck}
[A,Clean],[A,Clean][A, \text{Clean}], [A, \text{Clean}]Right\text{Right}
[A,Clean],[A,Dirty][A, \text{Clean}], [A, \text{Dirty}]Suck\text{Suck}
[A,Clean],[A,Clean],[A,Clean][A, \text{Clean}], [A, \text{Clean}], [A, \text{Clean}]Right\text{Right}
[A,Clean],[A,Clean],[A,Dirty][A, \text{Clean}], [A, \text{Clean}], [A, \text{Dirty}]Suck\text{Suck}
  • Agent Function vs. Agent Program:
    • Agent Function: The abstract, theoretical mathematical mapping (f:P∗→Af: P^* \rightarrow A) specifying the target action for every theoretical percept sequence.
    • Agent Program: The concrete computational code executing on physical hardware (architecture) that accepts the current percept and computes the appropriate action.

Taxonomy of Task Environments

  • Discrete vs. Continuous:

    • Discrete: Features a finite, countable number of distinct environmental states, percepts, and actions. Example: Chess.
    • Continuous: State variables, percepts, and motor actions vary continuously across continuous real numerical scales. Example: Autonomous vehicle navigation (steering angles, velocity curves).
  • Known vs. Unknown:

    • Known: The environmental rules and precise action outcomes are fully understood by the agent.
    • Unknown: Environmental physics or state transition laws are unknown; the agent must explore to discover operational dynamics.
  • Observable vs. Partially Observable:

    • Fully Observable: The agent's sensors detect the complete state of the environment at all times. Example: Standard Chess.
    • Partially Observable: Noise, visual obstructions, or sensor limits obscure parts of the world state. Example: Kriegspiel Chess, real-world driving blind spots.
  • Static vs. Dynamic vs. Semi-Dynamic:

    • Static: The environment does not change while the agent deliberates. Example: Crossword puzzles.
    • Dynamic: The environment continuously changes while the agent calculates decisions. Example: Highway driving.
    • Semi-Dynamic: The physical state does not change over deliberation time, but the agent's performance score or remaining time decreases as time passes. Example: Chess played with a clock.
  • Single-Agent vs. Multi-Agent:

    • Single-Agent: An individual agent acts independently without competing or collaborating with other agents. Example: Solitaire, standalone vacuum cleaning.
    • Multi-Agent: Multiple interacting entities operate within the same world, either competitively (e.g., Chess) or cooperatively (e.g., multi-robot warehouse swarm management).
  • Accessible vs. Inaccessible:

    • Accessible: The agent enjoys full, precise sensory state access.
    • Inaccessible: Information gathered is incomplete, corrupted, or noisy. Example: Macro-meteorological forecasting.

The Concept of Rationality

  • Definition of Rationality:

    • A rational agent selects the action expected to maximize its performance measure, given its percept history sequence and built-in domain knowledge.
    • Rationality is distinct from omniscience; omniscience implies absolute knowledge of actual outcomes, whereas rationality maximizes expected performance based on available information.
  • Performance Measure Design Rules:

    • Performance measures must evaluate the desired state of the environment, not the physical actions of the agent.
    • Example: Rewarding a vacuum cleaner for the total amount of dirt sucked up can prompt a defective strategy where the agent repeatedly dumps collected dirt and sucks it up again. A correct performance measure awards points for maintaining a clean floor state across an eight-hour shift while penalizing energy use and noise.
  • Four Factors Determining Rationality:

    1. The explicit Performance Measure defining success criteria.
    2. The agent's Prior Knowledge of its environment.
    3. The Actions executable by the agent.
    4. The complete Percept Sequence received by the agent up to the current time.

Task Environment Specification (PEAS Framework)

  • The PEAS Components:
    • Performance Measure: The objective metric evaluating environmental success.
    • Environment: The external world, including physical spaces and external objects.
    • Actuators: The hardware or software output mechanisms executing physical actions.
    • Sensors: The hardware or software input channels gathering environmental percepts.

PEAS description of the task environment for an automated taxi

  • PEAS Specification for an Automated Taxi Driver:
    • Performance Measure: Reaching correct destination, minimizing fuel consumption, minimizing vehicle wear and tear, minimizing trip duration/cost, minimizing traffic law violations, maximizing passenger safety, maximizing comfort, maximizing operational profits.
    • Environment: Urban streets, rural lanes, 12-lane freeways, variable weather (e.g., sunny California vs. snowy Alaska), traffic, pedestrians, animals, road construction, emergency vehicles, passengers, right-side vs. left-side driving laws.
    • Actuators: Throttle/accelerator control, steering column motor, braking systems, turn signals, horn, display screens, voice synthesizer.
    • Sensors: Multi-angle video cameras, sonar sensors, infrared range finders, speedometer, accelerometers, engine diagnosis sensors, fuel indicators, GPS receiver, passenger command keyboard/microphone.

Agent Architecture and Internal Mechanisms

  • The Agent Equation: Agent=Architecture+Program\text{Agent} = \text{Architecture} + \text{Program}

    • Architecture: The physical hardware execution platform (computing unit, physical sensors, mechanical actuators).
    • Program: The computational algorithm implementing the agent function, accepting current percepts to output actions.
  • Primary Characteristics of Intelligent Agents:

    • Autonomy: Operating without direct human intervention.
    • Reactivity: Perceiving environment changes and responding promptly.
    • Pro-activeness: Taking goal-directed initiative rather than purely reacting.
    • Social Ability: Communicating and coordinating with other agents.
    • Adaptability: Learning and adjusting behavior based on operational experience.
    • Flexibility: Executing appropriate strategies across distinct situations.
  • Table-Driven Agent Architecture:

    • Implements the agent program via a precomputed, explicit lookup table mapping all possible percept sequences to corresponding actions.
    • Severe Limitations:
    • Exponential Memory Growth: The total number of percept sequences grows exponentially over time, requiring unfeasible memory capacity.
    • Design Overhead: Construction of universal tables for real-world scenarios is impossible.
    • Zero Generalization: Incapable of adapting to novel percept combinations not explicitly pre-programmed into the lookup table.
    • Historical Analogy: Ancient engineering relied on printed mathematical tables to look up square roots; modern engineering relies on compact computational algorithms (like Newton's Method) to compute square roots dynamically.

Five Core Intelligent Agent Architectures

  • Simple Reflex Agents:

Schematic diagram of a simple reflex agent

  • Selects actions based exclusively on the current percept, ignoring percept history entirely.

  • Uses condition-action rules (If-Then statements).

  • Example Logic: If car-in-front-is-braking, then initiate-braking.

  • Critical Weakness: Fails in partially observable environments. Lacking state memory, it easily falls into unrecoverable infinite loops. Randomization of actions can break infinite loops, but randomization is an unguided workaround rather than a fully rational solution.

    • Model-Based Reflex Agents:

A model-based reflex agent

  • Maintains an internal State (memory) representing unobserved aspects of the current world.

  • Integrates two essential forms of knowledge:

    • World Dynamics: How the environment evolves independently over time.
    • Action Effects: How the agent's own actions transform the environment.
  • Can operate successfully in partially observable environments by updating its internal world model dynamically.

    • Goal-Based Agents:

A model-based, goal-based agent

  • Combines state estimation with explicit Goal state descriptions.

  • Uses Search and Planning algorithms to evaluate multi-step action sequences to reach target outcomes.

  • Offers high operational flexibility: changing the agent's behavior requires updating its destination goal rather than rewriting its entire rule set.

    • Utility-Based Agents:

Utility based agent

  • Replaces binary goal matching with a continuous Utility Function mapping states to real numbers, measuring degree of desirability ("happiness" or operational efficiency).
  • Calculates Expected Utility (EU) across probabilistic outcomes to choose actions that maximize overall performance.
  • Trade-Off Evaluation Scenario (Autonomous Taxi):
    • Route A (Fast but high collision risk): Expected Utility = 6060
    • Route B (Moderate speed, safe): Expected Utility = 8585
    • Route C (Very safe, very slow): Expected Utility = 7070
    • Decision: Selects Route B to optimize safety against travel speed.
  • Goal-Based vs. Utility-Based Comparison:
FeatureGoal-Based AgentUtility-Based Agent
Evaluation MethodBinary (Goal met / Not met)Continuous (Graded numerical score)
Uncertainty HandlingLimitedAdvanced (Probabilistic Expected Utility)
Decision QualitySatisficingOptimal trade-off optimization
Primary GoalReaching destinationChoosing fastest, safest, cheapest path
  • Learning Agents:

A learning agent

  • Designed to operate in initially unknown environments and continuously improve performance through experience.

  • Divided into four distinct functional components:

    1. Performance Element: The execution module responsible for selecting external actions based on current percepts.
    2. Critic: Evaluates agent behavior against an external performance standard, generating feedback metrics.
    3. Learning Element: Ingests critic feedback to update internal models and modify the performance element's strategy.
    4. Problem Generator: Recommends novel exploratory actions to gather new experiences rather than repeatedly executing known paths.
    • Comparative Summary of Intelligent Agent Types:
Agent TypeDefinitionSelf-Driving Car ExampleKey Operational Point
Reflex AgentImmediate action based solely on current input.Stops immediately when obstacle detected.Condition-action rules; no memory.
Model-Based AgentMaintains internal state model.Predicts road curvature ahead.Tracks unobserved environmental changes.
Goal-Based AgentActs to reach explicit target states.Plans fastest route from Point A to Point B.Multi-step planning; goal-driven.
Utility-Based AgentOptimizes continuous utility metrics.Balances speed against safety trade-offs.Decision-making under uncertainty.
Learning AgentImproves operational policy via feedback.Refines lane detection via real-world driving data.Autonomous strategy updating.

Problem-Solving Agents and Formal Problem Formulation

  • Overview of Problem-Solving Agents:

    • Advanced deliberative agents designed for deterministic, fully observable, static, and discrete environments.
    • Formulate multi-step action sequences using systematic state-space search algorithms prior to executing actions in the environment.
  • Five Components of a Formal Problem Definition:

    1. Initial State: The starting state of the agent at task initialization. Example: In(Arad)\text{In}(\text{Arad}).
    2. Actions: Set of executable moves available from a given state, denoted as ACTIONS(s)\text{ACTIONS}(s). Example: From In(Arad)\text{In}(\text{Arad}), ACTIONS(In(Arad))={Go(Sibiu),Go(Timisoara),Go(Zerind)}\text{ACTIONS}(\text{In}(\text{Arad})) = \{\text{Go}(\text{Sibiu}), \text{Go}(\text{Timisoara}), \text{Go}(\text{Zerind})\}.
    3. Transition Model: Mathematical description of action outcomes, denoted as RESULT(s,a)\text{RESULT}(s, a). Example: RESULT(In(Arad),Go(Zerind))=In(Zerind)\text{RESULT}(\text{In}(\text{Arad}), \text{Go}(\text{Zerind})) = \text{In}(\text{Zerind}).
    4. Goal Test: Function determining whether a given state matches the target condition. Example: Checking if current state equals In(Bucharest)\text{In}(\text{Bucharest}).
    5. Path Cost Function: Assigns a numeric cost to a path, computed as the sum of individual step costs c(s,a,s′)c(s, a, s'). An optimal solution is an action sequence yielding the lowest total path cost among all goal paths.
  • Search Strategies:

    • Uninformed (Blind) Search: Explores state spaces using problem parameters without heuristic guidance. Examples: Breadth-First Search (BFS), Depth-First Search (DFS), Uniform-Cost Search (UCS).
    • Informed (Heuristic) Search: Uses domain-specific estimates (heuristics) to prioritize exploration toward the goal. Examples: Greedy Best-First Search, A∗A^* Search Algorithm.
  • Steps in the Problem-Solving Agent Workflow:

    1. Formulate Goal: Define target objectives.
    2. Formulate Problem: Establish initial states, available actions, transition model, goal tests, and path cost functions.
    3. Search for Solution: Run search algorithms over the state space to discover an action path to the goal.
    4. Execute Plan: Execute the computed action sequence step-by-step in the real environment.
  • Toy Problems vs. Real-World Problems:

Problem TypePurposeExampleKey Operational Point
Toy ProblemConcise, precise problem formulation for teaching or algorithm testing.Vacuum Cleaner WorldFully defined, low complexity.
Real-World ProblemSolving complex, practical, scalable real-world tasks.GPS Navigation, LogisticsHigh state-space dimension, dynamic factors.
  • Vacuum Cleaner World State-Space Analysis (Toy Problem):

State space for the vacuum world

  • States: Defined by agent location (22 possibilities: Square AA or BB) and cleanliness status of each square (22=42^2 = 4 dirt configurations). Total possible states: 2×22=8 states2 \times 2^2 = 8 \text{ states}
  • Actions: {Left,Right,Suck}\{\text{Left}, \text{Right}, \text{Suck}\}.
  • Transition Model: Moving Left\text{Left} or Right\text{Right} alters position; Suck\text{Suck} clears dirt in the occupied square.
  • Goal Test: Check if all squares are clean.
  • Path Cost: Each executed step incurs a cost of 11; total path cost equals total number of executed steps.