Natural language processing pipelines, machine learning paradigms, decision trees, neural networks, genetic algorithms, and expert system design — with worked examples throughout
Every time you type a query into a search engine, ask a voice assistant a question, or receive an auto-translated email, you are using Natural Language Processing (NLP). NLP is the sub-field of AI that enables computers to understand, interpret, and generate human language — the most natural and complex form of human communication.
Human language is extraordinarily difficult to process automatically. The sentence "I saw the man with the telescope" is genuinely ambiguous — did I use the telescope, or did the man have it? Resolving such ambiguities requires not just grammar but world knowledge, context, and pragmatic reasoning. NLP tackles this challenge through a pipeline of processing stages, each building on the last.
NLP systems process language through a layered pipeline of analysis. Each layer handles a different aspect of meaning:
Morphological analysis decomposes words into their component morphemes (stems, prefixes, suffixes). The word "unpredictably" → un + predict + able + ly. This helps map surface word forms to their base meanings. Lexical analysis (tokenisation + part-of-speech tagging) assigns each token a grammatical category.
| Word | Morphological Analysis | POS Tag | Lemma |
|---|---|---|---|
| The | definite article (no morphemes) | DT (determiner) | the |
| doctor | doctor (root) | NN (noun, singular) | doctor |
| treated | treat + ed (past tense) | VBD (verb, past) | treat |
| patients | patient + s (plural) | NNS (noun, plural) | patient |
| carefully | care + ful + ly | RB (adverb) | carefully |
Syntactic processing (parsing) determines the grammatical structure of a sentence — how words group into phrases and how phrases relate to each other. The result is a parse tree (or phrase structure tree) that makes the hierarchical structure explicit.
A CFG defines the syntax of a language through production rules of the form X → Y₁ Y₂ … Yₙ, where X is a non-terminal symbol and Y₁…Yₙ are terminals or non-terminals. Standard sentence-level rules:
-- Phrase structure rules --
S → NP VP -- Sentence = Noun Phrase + Verb Phrase
NP → Det N | Det N PP -- NP = Det + Noun (optional PP)
VP → V NP | V NP PP -- VP = Verb + NP (optional PP)
PP → P NP -- PP = Preposition + NP
Det → the | a | an
N → doctor | patient | hospital
V → saw | treated | found
P → with | in | on
| Parse | Structure | Meaning |
|---|---|---|
| Parse 1 | VP = [V [NP the man [PP with the telescope]]] | The man had the telescope (PP modifies NP) |
| Parse 2 | VP = [V [NP the man] [PP with the telescope]] | I used the telescope to see him (PP modifies VP) |
Both parses are grammatically valid — a parser returns both. Choosing the correct one requires semantic and world knowledge. This is a core challenge in NLP.
Two main parsing strategies: Top-Down (Recursive Descent) — start from S, expand rules until terminals match the input. Fast but may explore many dead ends. Bottom-Up (Shift-Reduce / CYK) — start from terminals, combine into larger phrases. The CYK algorithm runs in O(n³|G|) and handles all CFGs. Modern NLP uses neural parsers (transformers) that run in linear time with much higher accuracy than grammar-based parsers.
A parse tree tells us structure — but not meaning. "Colourless green ideas sleep furiously" is perfectly grammatical but semantically nonsensical. Semantic analysis maps parsed structures onto representations of meaning, resolving word-sense ambiguity and establishing relationships between entities. Discourse processing then links sentences together, while pragmatics addresses the speaker's intent beyond literal meaning.
Compositional semantics (the Principle of Compositionality, Frege) holds that the meaning of a complex expression is determined by the meanings of its parts and the rules combining them. Semantic analysis maps syntactic parse trees to logical forms using this principle.
Sentence: "The doctor treated every patient"
| Phrase | Semantic Rule | Logical Form |
|---|---|---|
| "the doctor" | Definite NP → specific individual | ιx Doctor(x) (the unique doctor) |
| "every patient" | Universal NP → quantified variable | ∀y Patient(y) |
| "treated" | Transitive verb → binary predicate | Treated(subj, obj) |
| Full sentence | S → compose all parts | ∀y Patient(y) → Treated(doctor₁, y) |
Many words have multiple senses. "bank" can mean a financial institution or a river bank. WSD assigns the correct sense based on context words:
| Sentence | Ambiguous Word | Context Clues | Correct Sense |
|---|---|---|---|
| "The patient's condition improved" | patient (adj/noun) | Possessive 's + condition | Noun: sick person |
| "Be patient while waiting" | patient (adj/noun) | Imperative + "while waiting" | Adjective: tolerant |
| "He deposited money at the bank" | bank | deposited, money | Financial institution |
| "The fish swam near the bank" | bank | fish, swam | River bank |
Real language is not isolated sentences — it is connected text. Discourse processing deals with how sentences in a text relate to each other to create coherent meaning.
Pragmatics studies how context and social conventions influence the interpretation of utterances beyond their literal linguistic meaning. The same sentence can mean very different things in different situations.
Key concepts: Speech Acts (Austin, Searle) — utterances as actions (assertions, requests, promises, warnings). Implicature (Grice) — what is suggested but not literally said. Presupposition — background assumptions an utterance takes for granted.
| Utterance | Literal Meaning | Pragmatic (Intended) Meaning | Mechanism |
|---|---|---|---|
| "Can you pass the salt?" | Query about physical ability | Request: please pass the salt | Indirect Speech Act |
| "It's cold in here." | Statement about temperature | Request: please close the window | Implicature |
| "John stopped smoking." | Statement about behaviour change | Presupposes John used to smoke | Presupposition |
| "Some students passed." | At least one student passed | Implicature: NOT all students passed | Gricean Maxim of Quantity |
| Maxim | Principle | Violation Example |
|---|---|---|
| Quantity | Be as informative as required, not more or less | "Some patients have the disease" when all do — implies not all |
| Quality | Say only what you believe to be true | Sarcasm violates this deliberately |
| Relation | Be relevant to the conversation | Changing subject abruptly signals avoidance |
| Manner | Be clear, brief, and orderly | Deliberately obscure phrasing signals special meaning |
A system that can only do what it was explicitly programmed to do will always be limited by the programmer's knowledge. Machine learning breaks this barrier: systems that learn from experience improve their performance on tasks without being explicitly reprogrammed. This section surveys the major paradigms of learning and examines inductive learning — the process of generalising from specific examples to general rules.
A computer program is said to learn from experience E with respect to task T and performance measure P if its performance on T, as measured by P, improves with experience E.
Example: A spam filter (T = classify email) learns (E = labelled examples) and improves accuracy (P = % correct) over time.
| Paradigm | Input | Feedback | Goal | Example Task |
|---|---|---|---|---|
| Supervised | Labelled (x, y) pairs | True labels given | Learn f: x → y | Spam detection, diagnosis |
| Unsupervised | Unlabelled x only | None | Find structure in x | Customer segmentation, topic modelling |
| Reinforcement | State observations | Reward / penalty | Maximise cumulative reward | Game playing, robot navigation |
| Semi-supervised | Few labelled + many unlabelled | Sparse labels | Propagate labels | Image classification with few labels |
| Self-supervised | Unlabelled x | Pseudo-labels from data | Learn rich representations | GPT, BERT pre-training |
Inductive learning is the process of generalising from specific training examples to a general hypothesis (concept or rule) that correctly classifies unseen examples. It is the most fundamental form of supervised learning.
Given: a set of training examples (positive and negative instances of a concept).
Goal: find a hypothesis H consistent with all examples and general enough to classify new ones correctly.
Key challenge: inductive bias — with infinitely many consistent hypotheses, we need additional assumptions to prefer simpler or more general ones (Occam's Razor).
EBL (Mitchell et al., 1986) generalises from a single training example by constructing a logical explanation of why the example belongs to the target concept, then generalising that explanation. Unlike statistical inductive learning (which needs many examples), EBL uses existing domain knowledge to explain one example and extract a reusable rule.
Goal: Observe one example of a concept. e.g., "a cup is safe-to-drink-from."
Explain: Using background domain knowledge, construct a proof of why this example satisfies the concept. e.g., the cup is light, has a handle, is stable → therefore safe to drink from.
Generalise: Replace specific constants in the proof with variables. Extract the most general conditions that make the proof valid.
Output: A general rule: ∀x Light(x) ∧ HasHandle(x) ∧ Stable(x) → SafeToDrinkFrom(x).
Not all features are equally useful for learning. Relevance-based learning uses prior knowledge about which attributes are relevant to the target concept, focusing the learner and improving generalisation from fewer examples.
Decision trees are one of the most interpretable and widely used machine learning algorithms. A decision tree classifies examples by asking a series of attribute-value questions, following branches based on answers until a leaf (classification) is reached. They are the basis of modern ensemble methods (Random Forests, Gradient Boosting) and are frequently featured in AI exams.
A decision tree is a tree where each internal node tests an attribute, each branch corresponds to an attribute value, and each leaf node gives a classification. To classify a new example, start at the root, follow branches based on the example's attribute values, and return the label at the leaf reached.
Should we play tennis today? Four weather attributes and 14 training examples (9 positive, 5 negative). This exact dataset appears in almost every AI exam on decision trees — know it by heart.
| Day | Outlook | Temperature | Humidity | Wind | Play? |
|---|---|---|---|---|---|
| D1 | Sunny | Hot | High | Weak | No |
| D2 | Sunny | Hot | High | Strong | No |
| D3 | Overcast | Hot | High | Weak | Yes |
| D4 | Rain | Mild | High | Weak | Yes |
| D5 | Rain | Cool | Normal | Weak | Yes |
| D6 | Rain | Cool | Normal | Strong | No |
| D7 | Overcast | Cool | Normal | Strong | Yes |
| D8 | Sunny | Mild | High | Weak | No |
| D9 | Sunny | Cool | Normal | Weak | Yes |
| D10 | Rain | Mild | Normal | Weak | Yes |
| D11 | Sunny | Mild | Normal | Strong | Yes |
| D12 | Overcast | Mild | High | Strong | Yes |
| D13 | Overcast | Hot | Normal | Weak | Yes |
| D14 | Rain | Mild | High | Strong | No |
ID3 (Quinlan, 1986) selects the attribute at each node that maximises Information Gain — the reduction in entropy (uncertainty) achieved by splitting on that attribute.
| Outlook Value | Examples | Yes/No | Entropy |
|---|---|---|---|
| Sunny | D1,D2,D8,D9,D11 | 2 Yes, 3 No | −(2/5)log(2/5)−(3/5)log(3/5) = 0.971 |
| Overcast | D3,D7,D12,D13 | 4 Yes, 0 No | −1·log(1)−0 = 0.0 (pure!) |
| Rain | D4,D5,D6,D10,D14 | 3 Yes, 2 No | −(3/5)log(3/5)−(2/5)log(2/5) = 0.971 |
| Attribute | Information Gain | Selected? |
|---|---|---|
| Outlook | 0.246 bits | ✅ YES — highest gain → root node |
| Temperature | 0.029 bits | ❌ Low gain |
| Humidity | 0.151 bits | ❌ Second highest |
| Wind | 0.048 bits | ❌ Low gain |
Outlook is chosen as the root (highest information gain = 0.246). The Overcast branch immediately gives a pure leaf (always Play=Yes). Recursion continues on Sunny and Rain branches with remaining examples.
Overfitting occurs when the tree grows too deep, fitting noise in the training data rather than the true pattern. An overfit tree has 100% training accuracy but poor generalisation. Prevention: Pre-pruning (stop growing when gain falls below a threshold) or Post-pruning (grow full tree, then prune branches that don't improve validation accuracy). Random Forests tackle overfitting by averaging many trees trained on random subsets.
Decision trees work beautifully on tabular data with clear attribute splits — but they struggle with images, audio, and continuous-valued inputs. Neural networks learn hierarchical representations directly from raw data, making them the backbone of modern deep learning. Genetic algorithms borrow from biological evolution to search vast hypothesis spaces that gradient-based methods cannot navigate.
A perceptron computes a weighted sum of its inputs, adds a bias, and passes the result through an activation function. For input vector x, weights w, bias b, and activation σ:
Backpropagation (Rumelhart, Hinton & Williams, 1986) computes the gradient of the loss function with respect to every weight in the network using the chain rule, then updates weights using gradient descent.
Forward Pass: Compute network output ŷ = f(x; W) layer by layer. Store all intermediate activations.
Compute Loss: L = Loss(ŷ, y). For classification: Cross-entropy L = −Σ yᵢ log ŷᵢ. For regression: MSE L = (1/n)Σ(ŷ−y)².
Backward Pass: Compute δL/δW for every weight using chain rule from output to input: δL/δwᵢⱼ = δL/δaⱼ × δaⱼ/δzⱼ × δzⱼ/δwᵢⱼ.
Weight Update: wᵢⱼ ← wᵢⱼ − η × δL/δwᵢⱼ where η = learning rate (e.g. 0.001). Repeat for all weights.
Iterate: Repeat Steps 1–4 for all mini-batches over multiple epochs until convergence (loss stops decreasing).
A Genetic Algorithm (Holland, 1975) searches a hypothesis space by maintaining a population of candidate solutions (chromosomes) and evolving them through selection, crossover, and mutation — mimicking biological natural selection. GAs excel when the search space is large, non-differentiable, or has many local optima that trap gradient-based methods.
Initialise: Create a population of k random individuals (bit strings or rule sets). Each individual = one candidate hypothesis.
Evaluate Fitness: For each individual, compute f(individual) = measure of how well it solves the problem (accuracy, reward, etc.).
Selection: Select parents with probability proportional to fitness (roulette wheel). Better individuals reproduce more.
Crossover: With probability p_c, swap tail segments of two parents at a random crossover point to produce two offspring.
Mutation: With probability p_m (small, e.g. 0.01), flip each bit. Maintains genetic diversity; prevents premature convergence.
Replace: New population replaces old. Repeat from Step 2 until termination criterion (max generations or fitness threshold).
Encode the Play Tennis attributes as a bit string: Outlook(2 bits) + Temperature(2 bits) + Humidity(1 bit) + Wind(1 bit) = 6-bit chromosome. 1=relevant/True, 0=irrelevant/False.
| Individual | Chromosome | Rule Decoded | Fitness (accuracy) | Selection Prob. |
|---|---|---|---|---|
| A | 110011 | Sunny AND High-Humidity AND Strong-Wind → No | 0.72 | 0.72/2.65 = 27% |
| B | 010100 | Overcast AND Low-Temp → Yes | 0.65 | 0.65/2.65 = 25% |
| C | 100110 | Outlook AND Humidity AND Wind rule | 0.71 | 0.71/2.65 = 27% |
| D | 111001 | Sunny AND Hot AND Normal | 0.57 | 0.57/2.65 = 22% |
| Chromosome | Decoded Rule | Fitness | |
|---|---|---|---|
| Parent A | 110|011 | Sunny AND … | 0.72 |
| Parent C | 100|110 | Outlook AND … | 0.71 |
| Child A' | 110|110 | New rule combining best of both | 0.78 ↑ Improved! |
| Child C' | 100|011 | New variant | 0.69 |
Child A' achieves higher fitness (0.78) than either parent by combining their best segments — this is the power of crossover.
| Feature | Neural Networks | Decision Trees | Genetic Algorithms |
|---|---|---|---|
| Learning paradigm | Gradient-based optimisation | Greedy recursive splitting | Population-based evolution |
| Interpretability | ❌ Black box | ✅ Fully interpretable | ❌ Hard to interpret |
| Data requirement | Large (thousands–millions) | Small–medium (hundreds) | Medium (evaluation-heavy) |
| Handles non-linearity | ✅ Excellent | ✅ Good (axis-aligned) | ✅ Excellent |
| Escapes local optima | ❌ SGD can get stuck | N/A (greedy) | ✅ Via crossover + mutation |
| Best for | Images, text, audio, sequences | Tabular data, explainable AI | Combinatorial optimisation, rule evolution |
In the 1970s and 80s, AI researchers asked a provocative question: could we capture the expertise of the world's best doctors, lawyers, and engineers in a computer program? The answer was expert systems — AI programs that emulate the decision-making ability of a human expert in a specific domain. Unlike general-purpose programs, expert systems encode deep, specialised knowledge and can explain their reasoning — a property that earned them widespread adoption in medicine, engineering, and finance.
The most famous early success was MYCIN (Stanford, 1976) — a system that diagnosed bacterial blood infections with accuracy matching senior physicians. This section covers the architecture, design, and knowledge acquisition process that make expert systems work.
The power of an expert system comes entirely from the quality and completeness of its knowledge base. Domain knowledge is encoded in several forms, all of which we saw in Unit III and IV.
-- Rule 52: Identify organism as Pseudomonas --
IF the gram-stain of the organism is gramneg
AND the morphology is rod
AND the aerobicity is aerobic
THEN there is suggestive evidence (CF=0.6) that
the identity of the organism is Pseudomonas
-- Rule 073: Treat with Gentamicin for Pseudomonas --
IF the identity of organism-1 is Pseudomonas
AND the patient is not allergic to Gentamicin
THEN recommend Gentamicin [CF=0.8]
-- Rule 119: Penicillin coverage for Streptococcus --
IF the identity of organism-1 is Streptococcus
AND the patient has received Penicillin in past 6 months
THEN consider Penicillin-resistant strain [CF=0.4]
Goal: What drug should be prescribed? → Triggers drug-recommendation rules → Triggers identity-of-organism rules → Triggers lab-result queries.
| Step | Goal | Rule Applied | Sub-goal / Action |
|---|---|---|---|
| 1 | PRESCRIBE(drug, patient) | Drug rules | Need: IDENTITY(organism, ?) |
| 2 | IDENTITY(organism, Pseudomonas) | Rule 52 | Need: GramStain=neg, Morphology=rod, Aerobic |
| 3 | GramStain=neg | Ask user | Q: "What is the gram stain of organism-1?" |
| 4 | Morphology=rod | Ask user | Q: "What is the morphology of organism-1?" |
| 5 | Identity ≈ Pseudomonas [CF=0.6] | Rule 073 | RECOMMEND(Gentamicin) [CF=0.8×0.6=0.48] |
-- User asks WHY is gram stain needed? --
SYSTEM: "I am trying to determine the identity of organism-1."
"Rule 52 states: IF gram-stain is gramneg AND morphology is rod"
"AND aerobic THEN identity is Pseudomonas [CF=0.6]."
"I need gram-stain to apply this rule."
-- User asks HOW did you conclude Pseudomonas? --
SYSTEM: "I concluded Pseudomonas [CF=0.6] because:"
" 1. Gram stain = gramneg (you told me, CF=1.0)"
" 2. Morphology = rod (you told me, CF=1.0)"
" 3. Aerobicity = aerobic (lab result, CF=0.9)"
" → Rule 52 applied with combined CF = 0.6×0.9 = 0.54"
MYCIN's explanation facility was arguably as important as its diagnostic accuracy. Physicians could ask WHY (what information is needed and why) and HOW (how a conclusion was reached). This transparency built trust and allowed doctors to catch errors — something a black-box neural network cannot provide.
An expert system shell is a reusable framework containing the inference engine, working memory management, explanation facility, and user interface — everything except the domain-specific knowledge base. A knowledge engineer can build a new expert system by simply populating the shell with domain rules, without implementing the reasoning engine from scratch.
EMYCIN (Empty MYCIN) was the first major shell, created by stripping MYCIN's medical knowledge and keeping the reasoning architecture. Subsequent shells became commercial products used across industries.
| Shell / System | Year | Origin | Key Features | Applications |
|---|---|---|---|---|
| EMYCIN | 1979 | Stanford (from MYCIN) | Backward chaining, certainty factors | Medical diagnosis |
| OPS5 | 1977 | Carnegie Mellon | Forward chaining, Rete algorithm | R1 (DEC VAX config) |
| CLIPS | 1985 | NASA | Forward chaining, C-based, free | Aerospace, manufacturing |
| JESS | 1995 | Sandia National Labs | Java-based CLIPS variant, JVM integration | Enterprise, web apps |
| Drools | 2001 | Red Hat / JBoss | Java, RETE algorithm, business rules | Finance, banking, insurance |
Knowledge acquisition — the process of extracting expert knowledge and encoding it into the knowledge base — is the single hardest and most time-consuming step in building an expert system. Experts find it difficult to articulate the heuristics and intuitions they use, a phenomenon called tacit knowledge.
Identification: Define the problem domain, identify the expert(s), select the representation formalism. Determine scope — what questions must the system answer?
Conceptualisation: Identify key concepts, their relationships, and the reasoning strategies experts use. Techniques: structured interviews, think-aloud protocols, case analysis.
Formalisation: Translate conceptualised knowledge into formal rules, frames, or ontologies suitable for the chosen shell. This is where tacit knowledge is hardest to capture.
Implementation: Enter formal rules into the knowledge base. Test on sample cases. Identify missing rules and incorrect certainty factors.
Testing and Validation: Evaluate against known expert cases. Expert reviews the system's reasoning traces. Iterate: add rules, adjust CFs, refine conditions.
Maintenance: Update the KB as domain knowledge changes (new drugs, new diseases, changed protocols). Track rule interactions to avoid unintended consequences.
Success (1970s–80s): R1/XCON (DEC, 1980) configured VAX computers, saving $40M/year. MYCIN matched physicians in diagnosis. PROSPECTOR discovered a molybdenum deposit worth $100M.
Decline (late 80s–90s): Knowledge acquisition bottleneck — encoding new domains took years. Knowledge bases became unmaintainable. No learning — systems could not improve automatically. Could not handle exceptions gracefully.
Revival (2010s–present): Hybrid systems combine ML (for pattern recognition) with expert system shells (for transparent reasoning). Medical AI now combines neural networks with rule engines for explainability.
This section consolidates every definition, formula, algorithm, and comparison from Unit V into a single revision reference.
| Level | Task | Input→Output | Key Technique | Example |
|---|---|---|---|---|
| Morphological | Decompose word forms | Words → morphemes | Finite-state transducers | treated → treat + ed |
| Lexical (POS) | Tag parts of speech | Tokens → POS tags | HMM, CRF, BERT | treated/VBD doctor/NN |
| Syntactic | Build parse tree | Tagged words → tree | CFG, CYK algorithm | S→NP VP, NP→Det N |
| Semantic | Compute meaning | Parse tree → logical form | Lambda calculus, WSD | Treated(doctor, patient) |
| Discourse | Link sentences | Sentences → coherent text | Co-reference, RST | "She" → doctor |
| Pragmatic | Identify speaker intent | Utterance → speech act | Grice's maxims, speech acts | "Can you pass salt?" = Request |
| Algorithm | Type | Key Formula / Concept | Best For |
|---|---|---|---|
| Decision Tree (ID3) | Supervised | Gain(S,A) = H(S) − Σ|Sᵥ|/|S|·H(Sᵥ) | Tabular data; interpretable AI |
| Neural Network | Supervised | Backprop: δw = −η·∂L/∂w | Images, text, audio |
| Genetic Algorithm | Evolutionary | Selection + Crossover + Mutation | Combinatorial optimisation |
| Inductive Learning | Supervised | Generalise from (x,y) pairs | General classification / regression |
| EBL | Knowledge-intensive | Explain ONE example → generalise | Domains with strong prior knowledge |
| Reinforcement | Reward-based | max E[Σ γᵗ rₜ] | Games, robotics, control |
Mistake 1: Confusing structural ambiguity (two parse trees) with lexical ambiguity (one word, two meanings). "I saw the man with the telescope" is structural; "bank" is lexical.
Mistake 2: Forgetting that entropy = 0 means a PURE node (all same class) — this is the BEST outcome for a split, not the worst. ID3 aims for entropy 0.
Mistake 3: Mixing up forward chaining (data-driven, fires all matching rules) with backward chaining (goal-driven, asks only what's needed). Medical diagnosis typically uses backward chaining.
Mistake 4: In the GA crossover example, children inherit HEAD from one parent and TAIL from the other — not the reverse. Check which part of the string is being swapped.
Mistake 5: Saying neural networks are "complete" like logic-based systems. NNs are statistical learners — they generalise from data but can fail on out-of-distribution examples. Expert systems with rules are more predictable but cannot learn.
Mistake 6: In EBL, the generalisation step replaces constants with variables — not the other way round. The goal is to make the rule as general as possible while still being provably correct.
| Question Pattern | Required Approach | Key Terms |
|---|---|---|
| "Describe NLP processing levels" | List all 6 levels; give input/output/technique for each | Morphological, lexical, syntactic, semantic, discourse, pragmatic |
| "Draw parse tree for sentence X" | Apply CFG rules; use NP/VP/PP/Det/N/V notation | S→NP VP, NP→Det N, VP→V NP, PP→P NP |
| "Apply ID3 to dataset" | Compute entropy of S; compute gain for each attribute; pick highest; recurse | H(S) = −Σ pᵢ log₂ pᵢ; Gain = H(S) − weighted child entropy |
| "Explain backpropagation" | Forward pass → compute loss → backward pass (chain rule) → weight update | δL/δw, learning rate η, gradient descent |
| "How does a GA work?" | 5 steps: Init → Evaluate → Select → Crossover → Mutate | Population, chromosome, fitness, roulette wheel, crossover point |
| "Architecture of an expert system" | Draw diagram with KB, inference engine, WM, explanation, UI | Forward/backward chaining, certainty factors, WHY/HOW |