Artificial Intelligence
Introduces the core methods of AI: search (A*, minimax, alpha-beta), knowledge representation, reasoning under uncertainty (Bayesian networks, HMMs), machine learning, and natural language processing.
Introduction to AI and Search
Overview Symbolic reasoning and search. Key ideas Uninformed: BFS, DFS. Informed: greedy, A*. Admissibility guarantees A* optimality. Worked example Map with straight-line heuristic: A* expands fewer...
Overview
Symbolic reasoning and search.
Key ideas
- Uninformed: BFS, DFS.
- Informed: greedy, A*.
- Admissibility guarantees A* optimality.
Worked example
Map with straight-line heuristic: A* expands fewer nodes than BFS.
Common pitfalls
- Using inadmissible heuristic with A*.
Why it matters
Search is the foundation of planning and optimisation.
Games: Minimax and Alpha-Beta
Overview Two-player deterministic games. Key ideas Model as game tree. Minimax assumes optimal play. Alpha-beta prunes branches. Worked example Tic-tac-toe minimax: 255,168 nodes; alpha-beta halves....
Overview
Two-player deterministic games.
Key ideas
- Model as game tree.
- Minimax assumes optimal play.
- Alpha-beta prunes branches.
Worked example
Tic-tac-toe minimax: 255,168 nodes; alpha-beta halves.
Common pitfalls
- Forgetting terminal states.
Why it matters
Real engines add evaluation and deepening.
Constraint Satisfaction
Overview Assign values to variables subject to constraints. Key ideas Backtracking with propagation. Forward checking. Arc consistency. Worked example Sudoku: 27 constraints. Propagation solves many...
Overview
Assign values to variables subject to constraints.
Key ideas
- Backtracking with propagation.
- Forward checking.
- Arc consistency.
Worked example
Sudoku: 27 constraints. Propagation solves many puzzles.
Common pitfalls
- Ignoring propagation power.
Why it matters
Propagation removes whole subtrees.
Knowledge Representation and Inference
Overview Telling a machine what we know. Key ideas Propositional and first-order logic. Forward and backward chaining. Resolution. Worked example "All humans are mortal" + "Socrates is...
Overview
Telling a machine what we know.
Key ideas
- Propositional and first-order logic.
- Forward and backward chaining.
- Resolution.
Worked example
"All humans are mortal" + "Socrates is human" -> mortal.
Common pitfalls
- Ignoring computational cost.
Why it matters
Real systems combine rules with search.
Bayesian Networks and HMMs
Overview Graphical models for probability. Key ideas DAG encodes conditional independence. Inference is NP-hard generally. HMM: latent state chain. Worked example Medical diagnosis: symptoms ->...
Overview
Graphical models for probability.
Key ideas
- DAG encodes conditional independence.
- Inference is NP-hard generally.
- HMM: latent state chain.
Worked example
Medical diagnosis: symptoms -> diseases.
Common pitfalls
- Ignoring arc direction.
Why it matters
HMMs powered speech recognition for decades.
Machine Learning: Decision Trees and Nearest Neighbours
Overview Two foundational supervised learners. Key ideas Trees: split on best feature. k-NN: majority vote of neighbours. Trees: low bias high variance. Worked example Classify iris from petal...
Overview
Two foundational supervised learners.
Key ideas
- Trees: split on best feature.
- k-NN: majority vote of neighbours.
- Trees: low bias high variance.
Worked example
Classify iris from petal length.
Common pitfalls
- Growing trees until pure.
Why it matters
Understanding bias/variance is key.
Neural Networks and Deep Learning
Overview From perceptron to multi-layer networks. Key ideas Perceptron: weighted sum + activation. Stacking gives universal approximator. Backprop via chain rule. Worked example 2-layer network...
Overview
From perceptron to multi-layer networks.
Key ideas
- Perceptron: weighted sum + activation.
- Stacking gives universal approximator.
- Backprop via chain rule.
Worked example
2-layer network approximates XOR.
Common pitfalls
- Linear activation in hidden layers.
Why it matters
ReLU, dropout, batch norm, Adam made it practical.
Natural Language Processing
Overview Language is sequential and ambiguous. Key ideas Tokenisation, stemming, POS. Constituency and dependency parsing. Embeddings and transformers. Worked example Sentiment: "not bad"...
Overview
Language is sequential and ambiguous.
Key ideas
- Tokenisation, stemming, POS.
- Constituency and dependency parsing.
- Embeddings and transformers.
Worked example
Sentiment: "not bad" positive, "not good" negative.
Common pitfalls
- Ignoring context window.
Why it matters
Pre-trained LMs dominate NLP benchmarks.
๐ Search
Q1. A* on grid vs BFS.
Show Solution
Heuristic reduces expansions.
๐ Bayesian Inference
Q1. P(disease | positive test).
Show Solution
Bayes rule.
๐ฏ Midterm Exam
Q1. Alpha-beta on given tree.
Show Solution
Prune when alpha >= beta.
๐ฏ Final Exam
Q1. First two splits of decision tree.
Show Solution
Highest information gain.