Unit 1: Foundations & Applications of AI; AI Problem Modeling & Search Concepts
1. Introduction: The Nature of Intelligence and Artificial Intelligence
Artificial Intelligence (AI) is the branch of computer science dedicated to engineering computational systems capable of performing tasks that traditionally require biological human intelligence. These tasks encompass visual perception, natural language comprehension, speech recognition, symbolic reasoning, autonomous planning, and adaptive decision-making under uncertainty.
At its epistemological core, AI grapples with foundational philosophical questions: What constitutes a mind? Can a machine possess genuine intentionality and understanding, or does it merely execute syntactic manipulations of formal symbols?
CODETHE EVOLUTION OF AI PARADIGMS ============================= [ Symbolic AI / GOFAI ] -------------------------------------> [ Connectionist / Machine Learning ] - 1950s to 1980s - 1990s to Present Day - Top-Down, Deductive Logic - Bottom-Up, Inductive Learning - Handcrafted Expert Knowledge Bases - Statistical Parameter Optimization - Brittle, Fails on Sensory Ambiguity - Resilient, Excels at Perception - "Thinking as Logical Inference" - "Thinking as Distributed Function Approximation"
2. Defining Artificial Intelligence: The Four Perspectives
In their seminal text, Stuart Russell and Peter Norvig categorize historical definitions of artificial intelligence along two orthogonal dimensions:
- Thought Processes vs. Observable Behavior: Does the system simulate internal cognitive mechanisms, or does it simply act effectively?
- Human Fidelity vs. Mathematical Rationality: Is the benchmark biological human performance (with all its cognitive biases and perceptual limitations), or ideal mathematical rationality (maximizing an objective function)?
CODETHE RUSSELL-NORVIG 2x2 AI MATRIX ================================ HUMAN CRITERION RATIONAL CRITERION +-------------------------------+-------------------------------+ | 1. THINKING HUMANLY | 2. THINKING RATIONALLY | | Cognitive Science & Modeling | "Laws of Thought" / Logic | THOUGHT PROCESSES | - Simulating human neurology | - Formal Syllogisms & First- | | and mental reaction times. | Order Predicate Calculus. | +-------------------------------+-------------------------------+ | 3. ACTING HUMANLY | 4. ACTING RATIONALLY | | The Operational Approach | The Rational Agent Approach | BEHAVIOR | - Passing the Turing Test; | - Maximizing Expected Utility | | fooling a human evaluator. | given available percepts. | +-------------------------------+-------------------------------+
2.1 The Rational Agent Approach (Modern Standard)
Modern AI engineering focuses overwhelmingly on Acting Rationally (the Rational Agent paradigm). A rational agent is an autonomous entity that perceives its environment through sensors, processes information, and selects actions via actuators to maximize its expected performance measure, given its current knowledge state. Rationality is not omniscience: an agent cannot anticipate impossible futures, but it must act optimally based on available evidence.
3. Foundational Tests and Philosophical Debates
3.1 The Turing Test (Alan Turing, 1950)
In his paper "Computing Machinery and Intelligence", Alan Turing proposed the Imitation Game as an operational benchmark for machine intelligence:
- The Protocol: A human interrogator communicates textually via a terminal with two isolated entities: a human and a computer.
- The Benchmark: If the interrogator cannot reliably tell which is the machine after five minutes of interrogation, the machine is said to exhibit intelligent behavior.
- The Total Turing Test: Extends the evaluation to physical reality, requiring computer vision and robotic manipulation to interact with physical objects.
3.2 John Searle's Chinese Room Argument (1980)
Philosopher John Searle formulated the Chinese Room Thought Experiment to refute the claim of "Strong AI" (the assertion that executing an appropriate computer program is sufficient to produce human consciousness and understanding):
- A monolingual English speaker sits inside an isolated room with a comprehensive rulebook written in English.
- Slips of paper containing Chinese characters are slipped under the door.
- Following purely syntactic rules ("If squiggly character X appears, write squiggly character Y"), the human outputs fluent Chinese responses.
- To observers outside, the room appears to understand Chinese fluently.
- Searle's Core Insight: Syntactic rule manipulation () does not equate to semantic comprehension (). The computer does not understand the meaning of the tokens it processes; it merely executes programmed symbol manipulation.
4. Taxonomy of Artificial Intelligence
AI systems are categorized based on technological capability and evolutionary sophistication:
CODECAPABILITY SPECTRUM OF AI ========================= [ Artificial Narrow AI (ANI) ] --------> [ Artificial General AI (AGI) ] --------> [ Artificial Super AI (ASI) ] Specialized, single-domain. Human-level general cognition. Vastly exceeds all human (Chess, Chatbots, AlphaFold, Can transfer knowledge across intellectual capability Autonomous driving, Facial Rec) unrelated domains autonomously. across every cognitive field. - STATUS: Ubiquitously Deployed - STATUS: Active Frontier Research - STATUS: Theoretical / Sci-Fi
4.1 Functional Classification of AI Architectures
- Reactive Machines: Possess no concept of the past and zero memory. They react to current sensory inputs based strictly on fixed rules or functions (e.g., IBM Deep Blue evaluating chess board states).
- Limited Memory: Modern state of the art. Uses historical data to inform future decisions over short horizons (e.g., autonomous self-driving cars tracking the speed and trajectory of nearby vehicles over the preceding 5 seconds).
- Theory of Mind: Advanced cognitive systems capable of understanding that human agents possess private beliefs, emotions, intentions, and psychological desires that influence behavior.
- Self-Aware AI: Conscious machines possessing internal self-reflection, metacognition, and self-identity (currently entirely theoretical).
5. History of AI: From Dartmouth to Modern Deep Learning
AI has evolved through dramatic pendulum swings between euphoric investment booms and freezing research winters:
CODETHE CHRONOLOGY OF AI ==================== 1950 : Alan Turing publishes "Computing Machinery and Intelligence" (Turing Test). 1956 : The Dartmouth Summer Research Project on AI; John McCarthy coins the term "Artificial Intelligence". 1960s : Golden Era of Symbolic Logic: Early game players, ELIZA chatbot, micro-world problem solvers. 1973 : The First AI Winter: The Lighthill Report (UK) and DARPA funding cuts freeze symbolic research. 1980s : The Expert System Boom: Commercial adoption of rule-based systems (e.g., XCON); LISP machine hardware. 1987 : The Second AI Winter: Collapse of specialized LISP hardware market; expert systems prove too brittle. 1997 : IBM Deep Blue defeats World Chess Champion Garry Kasparov using massive parallel alpha-beta search. 2012 : The Deep Learning Revolution: AlexNet wins ImageNet by a massive margin using GPUs and deep CNNs. 2017 : Google introduces the Transformer architecture ("Attention is All You Need"), sparking modern LLMs. 2020s : Era of Large Foundation Models (GPT, Gemini, Claude, Diffusion models) and Generative AI.
6. Structure of Intelligent Agents: The PEAS Framework
An Agent is anything that perceives its environment through sensors and acts upon that environment through actuators:
The agent function maps any given sequence of percepts () to an action ().
CODEANATOMY OF AN INTELLIGENT AGENT =============================== +---------------------------------------+ | AGENT | | +---------------------------------+ | +-----------------+ | | Sensors: Cameras, Microphones, | | +-----------------+ | ENVIRONMENT | ===>| Lidar, Telemetry | | | ENVIRONMENT | | | | +---------------------------------+ | | | | Physical world, | | | (Percepts) | | Physical world, | | road network, | | v | | road network, | | cloud database | | [ Agent Program / Control Logic ] | | | cloud database | | | | | (Actions) | | | | | | +---------------------------------+ | | | | |<=== | Actuators: Motors, Wheels, | |==| | +-----------------+ | | Screens, API Sockets | | +-----------------+ | +---------------------------------+ | +---------------------------------------+
6.1 The PEAS Architectural Specification
To design an intelligent agent, systems engineers define its PEAS attributes:
- P - Performance Measure: The objective mathematical criterion used to evaluate the agent's success.
- E - Environment: The external world or task space the agent inhabits and interacts with.
- A - Actuators: The mechanical, visual, or digital components through which the agent acts.
- S - Sensors: The perceptual instruments through which the agent receives environmental data.
PEAS Case Study 1: Autonomous Self-Driving Vehicle
- Performance Measure: Safety (zero collisions), trip speed/duration, passenger comfort, adherence to traffic laws, fuel/battery efficiency.
- Environment: Public roadways, unpredictable pedestrian traffic, weather conditions, road debris, road signs.
- Actuators: Steering wheel servo, accelerator throttle, hydraulic brakes, turn signals, in-cabin display.
- Sensors: LiDAR arrays, stereoscopic optical cameras, ultrasonic proximity sensors, radar, GPS, IMU accelerometer.
PEAS Case Study 2: Automated Medical Diagnostic Agent
- Performance Measure: Diagnostic accuracy (high sensitivity and specificity), treatment recovery rates, minimization of false negatives, cost-effectiveness.
- Environment: Hospital electronic health record (EHR) database, lab test streams, outpatient clinic.
- Actuators: Diagnostic report generator, medication prescription dispatch API, referral alerts.
- Sensors: Patient symptom questionnaire text, digital blood work analyzers, radiology DICOM image feeds.
7. Classification of Task Environments
The computational complexity of an AI problem is determined primarily by the structural properties of its environment:
CODETHE 6 CRITICAL ENVIRONMENT DIMENSIONS ===================================== 1. Fully Observable vs. Partially Observable : Can sensors capture the complete environment state? 2. Deterministic vs. Stochastic : Does an action lead to a completely predictable outcome? 3. Episodic vs. Sequential : Does the current action influence future choices? 4. Static vs. Dynamic : Does the environment change while the agent is thinking? 5. Discrete vs. Continuous : Are time, states, and actions finite or continuous? 6. Single-Agent vs. Multi-Agent : Is the agent acting alone, or with competitive/cooperative peers?
7.1 Detailed Environmental Taxonomy
| Environment Dimension | Benign / Easy Condition | Hostile / Hard Condition | Concrete Real-World Example |
|---|---|---|---|
| Observability | Fully Observable: Chess board (all pieces visible at all times). | Partially Observable: Poker (hidden cards), Medical triage (unseen internal pathology). | Driving a car through dense fog. |
| Determinism | Deterministic: Tic-Tac-Toe (next state is completely defined by action). | Stochastic: Backgammon (dice rolls), Stock trading (market volatility). | Autonomous driving (erratic pedestrians). |
| Episodicity | Episodic: Factory conveyor defect classification (each part is independent). | Sequential: Chess, Go, Self-Driving (early moves shape end-game survival). | Playing an entire game of poker. |
| Dynamism | Static: Crossword puzzles (world does not change while agent calculates). | Dynamic: Autonomous driving, Air traffic control (planes move while agent deliberates). | Real-time robot soccer (RoboCup). |
| Discreteness | Discrete: Chess (finite squares, finite turns, distinct pieces). | Continuous: Robotic arm manipulation (infinite joint angles, fluid velocities). | Autonomous drone navigation. |
| Agent Multiplicity | Single-Agent: Crossword puzzle solver, Sudoku solver. | Multi-Agent: Competitive (Chess, Poker) or Cooperative (Fleet vehicle coordination). | Stock exchange market making. |
8. Agent Architectures: From Simple Reflex to Learning Agents
Russell and Norvig classify agent programs into five distinct evolutionary architectural tiers:
CODETHE FIVE AGENT ARCHITECTURAL TIERS ================================== [ 1. Simple Reflex ] --------> [ 2. Model-Based Reflex ] --------> [ 3. Goal-Based ] Condition-Action rules Maintains internal world model Evaluates whether actions (If smoke, sound alarm). to handle partial observability. achieve a target goal state. | v [ 5. Learning Agent ] <----------------- [ 4. Utility-Based ] Adapts, discovers heuristics, Maps states to continuous real-valued and optimizes via critic feedback. preference scores (Utility Function).
8.1 Detailed Architectural Breakdowns
- Simple Reflex Agent:
- Operates strictly on condition-action rules ().
- Limitation: Can only succeed in fully observable environments; suffers from infinite loops in partially observable domains.
- Model-Based Reflex Agent:
- Maintains an internal state (mental model of how the world evolves independently and how its own actions affect the world).
- Can navigate partially observable environments by tracking unperceived state history over time.
- Goal-Based Agent:
- Combines internal world modeling with explicit goal descriptions.
- Evaluates search and planning algorithms to construct action sequences that transition the world from the current state to a target goal state.
- Utility-Based Agent:
- Goals provide a binary destination (achieved vs. unachieved). When multiple paths exist, a utility function assigns real numbers to states, quantifying trade-offs between speed, safety, and fuel efficiency.
- Learning Agent:
- Deconstructs agency into four distinct modules:
- Learning Element: Discovers improvements and updates policy parameters.
- Performance Element: Responsible for selecting external actions based on percepts.
- Critic Element: Evaluates agent behavior against an external performance standard.
- Problem Generator Element: Suggests exploratory, non-optimal actions that reveal new information (exploration vs. exploitation).
- Deconstructs agency into four distinct modules:
9. AI Problem Modeling and State Space Representation Basics
To solve an ill-defined problem computationally, an AI system must translate real-world ambiguity into a mathematically well-defined Search Problem.
9.1 The Five Components of a Formal Problem Formulation
- Initial State (): The starting state the agent occupies (e.g., ).
- Actions Available (): The set of legal moves available in state (e.g., ).
- Transition Model (): A formal mapping defining the state reached by executing action in state .
- Goal Test (): A Boolean predicate that determines whether state satisfies the destination criteria (e.g., ).
- Path Cost Function (): A numeric value assigned to executing action from state to . The total path cost is the cumulative sum of step costs.
CODEA FORMAL STATE SPACE FORMULATION ================================ [ Initial State: Arad ] / \ Action: Go(Sibiu) Action: Go(Zerind) / \ [ State: Sibiu ] [ State: Zerind ] | Action: Go(Fagaras) | [ State: Fagaras ] | Action: Go(Bucharest) | [ GOAL STATE: Bucharest ] ===> Goal Test: True! | Total Path Cost: 418 km
10. Quick Revision Summary Checklist
- AI Definitions: Russell-Norvig 2x2 (Thinking/Acting Humanly vs. Rationally). Modern AI focuses on Rational Action.
- Turing Test vs. Chinese Room: Turing tests behavioral indistinguishability; Searle argues syntax does not produce semantics or intentionality.
- ANI vs. AGI vs. ASI: Narrow (domain-specific), General (human-level cross-domain), Super (exceeds all human cognition).
- PEAS Framework: Performance measure, Environment, Actuators, Sensors.
- Environment Dimensions: Observability, Determinism, Episodicity, Dynamism, Discreteness, Multiplicity.
- Five Agent Architectures: Simple reflex, Model-based, Goal-based, Utility-based, Learning agent.
- Problem Formulation: Initial state, Actions, Transition model, Goal test, Path cost function.