Complete Study Guide

Artificial Intelligence

From foundational theory to real-world applications — a structured visual reference for understanding how intelligent systems are designed and built.

Foundations & History Agents & Environments Rationality Problem Solving State Space Search Production Systems Applications
🧠
Foundations of Artificial Intelligence
What AI is, what it aims to do, and its core disciplines

Definition

Artificial Intelligence is the science and engineering of making machines that can perform tasks that would require intelligence if done by humans — including reasoning, learning, planning, perception, and language understanding.

🎯 Goals of AI

Build systems that think or act either humanly (mimicking human cognition) or rationally (optimally, according to logical principles). These four orientations — think humanly, act humanly, think rationally, act rationally — define the spectrum of AI research.

🔬 Contributing Disciplines

AI draws from Mathematics (logic, probability), Philosophy (reasoning, ethics), Neuroscience (brain models), Psychology (cognition), Linguistics (language), Computer Science (algorithms), and Control Theory (feedback systems).

⚙️ Core Capabilities

Natural language processing, knowledge representation, automated reasoning, machine learning, computer vision, robotics, and planning are the principal capability areas that modern AI systems address.

📐 Turing Test

Proposed by Alan Turing in 1950, the Turing Test asks: can a machine converse so naturally that a human evaluator cannot distinguish it from a person? It remains a philosophical benchmark, though modern AI increasingly transcends it in narrow domains.

📜
History of Artificial Intelligence
Key milestones from formal logic to modern deep learning
1943
McCulloch & Pitts — Neural Net Model
First mathematical model of a neuron, laying the biological and mathematical basis for neural networks and machine learning.
1950
Alan Turing — "Computing Machinery and Intelligence"
Introduced the Turing Test and the central question: "Can machines think?" This paper established AI as a legitimate scientific inquiry.
1956
Dartmouth Conference — Birth of AI as a Field
John McCarthy coined the term "Artificial Intelligence." Researchers including Minsky, Shannon, and Simon gathered to formalise the discipline.
1958–1969
Early Programs & Enthusiasm
Newell & Simon's General Problem Solver (GPS), McCarthy's LISP programming language, and early theorem provers showed early promise.
1974–1980
First AI Winter
Funding cuts followed unrealised promises. Limitations in hardware, combinatorial explosion, and overhyped expectations led to disillusionment.
1980s
Expert Systems Boom
Rule-based expert systems (XCON, MYCIN) proved commercially valuable, reigniting industrial and academic interest in AI.
1987–1993
Second AI Winter
Expert systems proved brittle and expensive to maintain. The AI market collapsed again, forcing research toward more rigorous probabilistic methods.
1997
Deep Blue Defeats Kasparov
IBM's chess engine defeated world champion Garry Kasparov, demonstrating the power of search algorithms combined with domain knowledge.
2006–2012
Deep Learning Renaissance
Hinton, LeCun, and Bengio revived neural networks with deep architectures. AlexNet (2012) won ImageNet by a large margin, catalysing the modern deep learning era.
2016–Present
Modern AI — Foundation Models & LLMs
AlphaGo, GPT series, DALL·E, and large language models transformed AI from narrow tools to broad reasoning systems capable of language, code, vision, and beyond.
🤖
Intelligent Agents & Environments
The agent–environment interaction model at the core of AI

What is an Intelligent Agent?

An agent is anything that perceives its environment through sensors and acts upon it through actuators. Humans perceive via eyes, ears, and skin; act via hands and voice. Software agents perceive via data streams and act via API calls or file writes.

The Agent–Environment Cycle

Perception → Reasoning → Action → New State

Environment
World / Task
Sensors
Percepts
Agent
Decision / Logic
Actuators
Actions
Environment
(Updated)

Percept & Percept Sequence

A percept is the agent's current sensory input at any moment. The complete history of everything the agent has perceived is the percept sequence. An agent's behavior is a function from percept sequence to action.

Agent Function vs Agent Program

The agent function is the abstract mathematical mapping: percept sequence → action. The agent program is the concrete implementation running on hardware — the physical instantiation of the function.

⚖️
The Concept of Rationality
What it means to act optimally given knowledge and resources

Rational Agent

A rational agent selects actions that maximise expected performance given what it has perceived so far and what it knows about the world. Rationality is not the same as omniscience — it means doing the best possible with available information.

Rational Action = argmaxa E[Performance Measure | percept sequence, agent's knowledge, available actions]

🏆 Performance Measure

An external standard that evaluates an agent's success. For a vacuum cleaner, it might be: amount of dirt cleaned per unit energy. It must be defined by the designer, not the agent itself.

📚 Prior Knowledge

What the agent knows about the environment before acting — domain knowledge built in at design time. This guides exploration and helps interpret percepts.

🔍 Rationality vs Omniscience

An omniscient agent knows outcomes in advance. A rational agent only maximises expected outcomes. Rationality is achievable; omniscience is not. Rational agents must also explore and learn.


ConceptDescriptionExample
OmniscienceKnows the actual outcome of every actionKnowing a coin will land heads before flipping
RationalityMaximises expected outcome given knowledgeChoosing the statistically best route, not the guaranteed best
AutonomyLearning from percepts rather than relying solely on prior knowledgeA chess agent improving by playing games
Performance MeasureObjective criterion for evaluating agent successScore, distance, time, cost, accuracy
🌐
Nature of Environments (PEAS Framework)
Classifying environments by their properties

PEAS Framework

Every agent design starts with defining: Performance measure, Environment, Actuators, Sensors — the four dimensions that specify what the agent must do and in what context.

Environment Properties

Fully Observable vs Partially Observable

Fully observable: sensors give complete access to the environment state (e.g., chess board). Partially observable: some state is hidden (e.g., card games, real-world driving with limited sensor range).

Single Agent vs Multi-Agent

Single-agent: only one agent acts (e.g., puzzle solving). Multi-agent: multiple agents interact — can be competitive (chess, auctions) or cooperative (multi-robot coordination).

Deterministic vs Stochastic

Deterministic: the next state is fully determined by the current state and action (e.g., a maze). Stochastic: uncertainty exists in outcomes (e.g., weather forecasting, robotic manipulation).

Episodic vs Sequential

Episodic: each episode is independent; past actions do not affect future ones (e.g., image classification). Sequential: current decisions affect future situations (e.g., chess, driving).

Static vs Dynamic

Static: environment does not change while the agent deliberates (e.g., crossword). Dynamic: the environment can change during the agent's decision making (e.g., real-time trading, driving).

Discrete vs Continuous

Discrete: finite number of distinct states and actions (e.g., chess). Continuous: states and actions are real-valued (e.g., robot arm control, autonomous driving).

🏗️
Structure of Agents
Four canonical agent architectures
Type 1

📋 Simple Reflex Agent

Acts only on the current percept, ignoring history. Uses condition–action rules: "If dirty → suck; if location A → move right." Works only in fully observable environments. Very limited — has no memory.

if percept == condition:
   return action
Type 2

🗺️ Model-Based Reflex Agent

Maintains an internal model of the world, updating its state based on percept history. Can handle partial observability by tracking what it can't currently sense. More robust than simple reflex.

Type 3

🎯 Goal-Based Agent

Considers goal states and uses search and planning to find action sequences that lead to them. More flexible — can handle changing goals. Requires reasoning about the future, not just the present.

Type 4

📊 Utility-Based Agent

Uses a utility function to assign numeric value to states, enabling tradeoffs between goals. Selects actions that maximise expected utility — can balance competing objectives like speed vs safety.


🤖 Learning Agent

A higher-order architecture that includes a performance element (the agent's acting component), a critic (evaluates performance against a standard), a learning element (modifies the performance element based on feedback), and a problem generator (suggests exploratory actions to improve future learning). Learning agents can start with minimal knowledge and improve over time.

🔎
Problem-Solving Agents & Formulation
How agents define and search for solutions

Problem-Solving Agent

A goal-based agent that formulates a problem as a search task, finds a sequence of actions to reach the goal, and executes that plan. It deliberates before acting — suitable for deterministic, observable, discrete environments.

Five Components of a Problem

1. Initial State

The starting state of the agent. For a navigation problem, this is the agent's current city. For 8-puzzle, it's the scrambled tile arrangement.

2. Actions (Operators)

The set of actions available to the agent in any state. Formally a function: Actions(s) returns all actions applicable in state s.

3. Transition Model

Defines the result of applying an action: Result(s, a) = s'. Together with the initial state, this determines the state space.

4. Goal Test

A predicate that checks whether a given state is a goal state. Can be explicit (e.g., state == Bucharest) or implicit (e.g., no tiles out of place).

5. Path Cost

A numeric cost assigned to each path (sequence of actions). Enables the agent to find not just any solution, but an optimal one with minimum cost.

Solution & Optimality

A solution is an action sequence from initial to goal state. An optimal solution has the lowest path cost among all solutions.


Well-Known Toy Problems

ProblemState SpaceOperatorsGoal
8-Puzzle9!/2 = 181,440 statesSlide tile Up/Down/Left/RightTiles in order 1–8
8-Queens648 placementsPlace queen on boardNo two queens attack each other
Travelling Salesman(n-1)!/2 toursVisit next cityMinimum-cost complete tour
Route FindingMap cities & roadsDrive from city to cityReach destination city
CryptarithmeticDigit assignmentsAssign digit to letterArithmetic equation holds
AI Techniques, Problem Types & Characteristics
Search strategies, heuristics, and complexity classifications

Uninformed (Blind) Search Strategies

Breadth-First Search (BFS)

Expands shallowest unexpanded node. Complete and optimal (uniform cost). Time/Space: O(bd) — poor for large depths.

CompleteOptimal

Depth-First Search (DFS)

Expands deepest node first. Not complete (infinite paths) or optimal. Space: O(bm) — memory-efficient but may go down infinite branches.

Not CompleteNot Optimal

Uniform Cost Search

Expands node with lowest path cost g(n). Optimal for non-negative step costs. Equivalent to BFS when all costs are equal.

CompleteOptimal

Iterative Deepening DFS

Combines DFS space efficiency with BFS completeness. Runs DFS with depth limit 0, 1, 2… until goal is found. Space: O(bd).

CompleteOptimal

Bidirectional Search

Runs two simultaneous searches — one forward from start, one backward from goal — meeting in the middle. Reduces time to O(bd/2).

CompleteOptimal

Depth-Limited Search

DFS with a maximum depth limit l. Incomplete if the goal is beyond depth l. Solves the infinite-path problem of DFS when depth bound is known.

Incomplete

Informed (Heuristic) Search

🌟 Greedy Best-First Search

Uses heuristic h(n) — estimated cost to goal — to expand the most promising node. Fast but not optimal or complete. Can get stuck in loops.

f(n) = h(n)

⭐ A* Search

Combines path cost and heuristic: evaluates nodes by f(n) = g(n) + h(n). With an admissible heuristic (never overestimates), A* is complete and optimal. The gold standard of heuristic search.

f(n) = g(n) + h(n)

Problem Types

TypeCharacteristicExample Technique
Single-state problemFully observable, deterministicStandard search algorithms
Multiple-state problemPartially observable, deterministicBelief state search
Contingency problemPartially observable, non-deterministicAND-OR tree search
Exploration problemUnknown state spaceOnline search, reinforcement learning
Constraint SatisfactionVariables with domain constraintsBacktracking, arc consistency
Adversarial problemCompeting agent in environmentMinimax, Alpha-Beta pruning
🗺️
State Space Search
Navigating the graph of all possible world configurations

State Space

A state space is a graph where each node represents a possible world configuration and each directed edge represents applying an operator. Problem solving is path finding in this graph from the initial state to a goal state.

Formal Definition

A state space is a tuple (S, A, T, s₀, G) where: S = set of states, A = set of actions, T = transition function, s₀ = initial state, G = goal states. A solution is a path in this graph.

Search Tree vs Search Graph

A search tree expands nodes without tracking visited states (may revisit). A search graph (explored set) tracks visited nodes to avoid cycles — essential for loopy state spaces.


Search Algorithm Performance Metrics

Completeness
Finds a solution if one exists
Optimality
Finds the least-cost solution
Time Complexity
Nodes generated during search
Space Complexity
Maximum nodes in memory
Branching Factor (b)
Max successors of any node
Depth (d)
Depth of shallowest goal
Max Depth (m)
Maximum depth of search space
Heuristic h(n)
Estimated cost to goal from n

Heuristic Properties

Admissibility

A heuristic is admissible if it never overestimates the true cost to the goal: h(n) ≤ h*(n). An admissible heuristic guarantees A* optimality. Example: straight-line distance in map navigation.

Consistency (Monotonicity)

A heuristic is consistent if for every node n and successor n': h(n) ≤ cost(n, n') + h(n'). Consistency implies admissibility and ensures A* never revisits nodes on the optimal path.


Local Search Methods

Hill Climbing

Moves to the best immediate neighbour; no backtracking. Fast but gets stuck in local maxima, plateaus, and ridges. Random restarts help escape local optima.

Simulated Annealing

Allows occasional "bad" moves with probability e−ΔE/T. Temperature T decreases over time (cooling schedule). Can escape local optima; convergence guaranteed under ideal schedule.

Genetic Algorithms

Population-based search using selection, crossover, and mutation operators inspired by natural evolution. Effective for complex optimisation with large, irregular search spaces.

⚙️
Production Systems & Characteristics
Rule-based architectures for knowledge representation and reasoning

What is a Production System?

A production system is a model of computation built around condition–action rules (productions). It is the foundation of expert systems and models human cognitive processes as described by Newell and Simon's work on problem solving.

📦 Production Memory

The rule base — a set of if–then rules. Each rule has a left-hand side (LHS) specifying conditions and a right-hand side (RHS) specifying actions to perform when conditions match.

IF <condition>
THEN <action>

🗄️ Working Memory

The data store holding current world state, facts, and partial results. Rules fire when their LHS patterns match elements in working memory; actions modify working memory.

🔄 Inference Engine

The control mechanism that: (1) matches rule conditions to working memory (pattern matching), (2) selects which rule to fire (conflict resolution), and (3) executes the rule's action (act).


Recognize–Act Cycle

Working Memory
Current Facts
Match Phase
Find Matching Rules
Conflict Set
Eligible Rules
Select & Fire
Conflict Resolution

Characteristics of Production Systems

Modularity

Each production rule is independent. Adding, removing, or modifying one rule does not require changing others — making knowledge bases easier to maintain and extend.

Uniformity

All knowledge is represented in the same if–then format. This simplicity makes rule bases easy to inspect, debug, and explain — a key advantage for expert systems transparency.

Natural Knowledge Representation

Rules closely mirror how domain experts articulate knowledge: "If the patient has fever and cough, suspect flu." This makes knowledge acquisition from experts more intuitive.

Separability of Knowledge & Control

The rule base (domain knowledge) is cleanly separated from the inference engine (control strategy). The same engine can be used for different rule bases — enabling reuse.


Conflict Resolution Strategies

Recency
Prefer rules matching most recently added facts
Specificity
Prefer rules with more conditions (more specific)
Priority
Assign explicit salience to rules
First Match
Fire the first applicable rule (ordered rules)
Refractoriness
Don't fire same rule on same data twice
Random
Random selection from conflict set

Forward vs Backward Chaining

→ Forward Chaining (Data-Driven)

Starts from known facts in working memory and fires rules whose conditions match, generating new facts until a goal is reached or no rules apply. Used in monitoring and alerting systems.

← Backward Chaining (Goal-Driven)

Starts from the goal and works backwards, identifying which rules could establish it, then verifying their conditions recursively. Used in diagnostic systems and Prolog-style logic programming.

🚀
Applications of Artificial Intelligence
Where AI has transformed industries and everyday life
🏥

Healthcare & Medicine

Medical imaging diagnosis, drug discovery, clinical decision support, patient outcome prediction, and robotic surgery assistance.

🚗

Autonomous Vehicles

Self-driving cars using computer vision, sensor fusion, path planning, and real-time decision making in complex traffic environments.

💬

Natural Language Processing

Machine translation, sentiment analysis, chatbots, question answering, text summarisation, and large language models.

🎮

Game Playing

AlphaGo, AlphaZero, and OpenAI Five demonstrated superhuman performance in Go, Chess, Shogi, and Dota 2 through deep reinforcement learning.

🔒

Cybersecurity

Intrusion detection, malware classification, anomaly detection, network threat analysis, and automated incident response.

💰

Finance & Trading

Algorithmic trading, credit scoring, fraud detection, portfolio optimisation, risk assessment, and robo-advisors.

🔬

Scientific Research

Protein structure prediction (AlphaFold), materials discovery, climate modelling, particle physics analysis, and genomics.

🛒

Recommendation Systems

Netflix, Spotify, Amazon, and YouTube use collaborative filtering and deep learning to personalise content at massive scale.

🤖

Robotics & Automation

Industrial robots, warehouse automation, surgical robots, agricultural drones, and service robots for delivery and care.

🎨

Creative AI

Image generation (DALL·E, Midjourney), music composition, video synthesis, style transfer, and AI-assisted design tools.

📚

Education

Intelligent tutoring systems, adaptive learning platforms, automated grading, personalised curricula, and learning analytics.

🌏

Smart Cities & IoT

Traffic management, energy optimisation, predictive maintenance, air quality monitoring, and urban planning support.


AI Ethical Considerations

As AI systems become more powerful, challenges around bias & fairness, transparency & explainability, privacy, accountability, job displacement, and safety alignment are central concerns for researchers, policymakers, and society. Responsible AI development requires embedding these concerns from the earliest design stages.