APPENDIX
★

Glossary, Sources & AI-use note

Every term from the journey, where it came from, and how this book was made.

Manga panel: Almaty. Every word we learned on the road. Aru writes in a notebook in a library, Bota stamps a page, Max spins a pen; index cards fly around reading A*, BAYES, Q-LEARNING, VITERBI, TRANSFORMER and PERCEPTRON.

Glossary

90 terms

A* searchChapter 2
Expands the node with the lowest f(n) = g(n) + h(n). Optimal with an admissible (tree) or consistent (graph) heuristic.
Activation functionChapter 9
Nonlinear function g applied to a neuron's weighted sum (step, sigmoid, tanh, ReLU).
Admissible heuristicChapter 2
Never overestimates: 0 ≤ h(n) ≤ h*(n).
AgentChapter 1
Anything that perceives its environment through sensors and acts on it through actuators.
Alpha–beta pruningChapter 4
Skips branches that cannot affect the minimax decision; prune when α ≥ β.
Artificial neuronChapter 9
Computes g(Σ wᵢxᵢ + b).
BackpropagationChapter 9
Uses the chain rule to compute the gradient of the loss for every weight.
Backtracking searchChapter 3
Assigns variables one by one and backs up when a constraint is violated.
Base-rate fallacyChapter 6
Ignoring the prior; confusing P(E|H) with P(H|E).
Bayes' theoremChapter 6
P(H|E) = P(E|H)·P(H)/P(E): posterior from likelihood and prior.
Bayesian networkChapter 6
A directed acyclic graph plus a conditional probability table for each node.
Bellman equationChapter 5
Value = immediate reward + discounted expected value of the next state.
BFSChapter 2
Breadth-first search: expands the shallowest node first (FIFO queue). Optimal for equal step costs.
Conditional independenceChapter 6
A ⊥ B | C: knowing C makes B irrelevant for A.
Conditional probabilityChapter 6
P(A|B) = P(A,B)/P(B): the probability of A once B is known.
Consistent heuristicChapter 2
h(n) ≤ c(n, n') + h(n') for every edge; implies admissibility.
CPTChapter 6
Conditional probability table: P(node | parents) for every parent combination.
CSPChapter 3
Constraint satisfaction problem: variables, domains and constraints.
Data leakageChapter 8
Training uses information that would not be available at prediction time.
Decision treeChapter 8
Classifier made of learned if–then splits.
Deep learningChapter 9
Machine learning with many-layered neural networks.
Deterministic / stochasticChapter 1
Whether the same state and action always lead to the same next state.
DFSChapter 2
Depth-first search: expands the deepest node first (LIFO stack). Low memory, not optimal.
Discount factor γChapter 5
How much future rewards count relative to immediate ones.
Emission probabilityChapter 7
P(observation | hidden state).
Episodic / sequentialChapter 1
Whether each decision is independent or affects future options.
Evaluation functionChapter 4
Estimates the value of a non-terminal game position at the depth limit.
Expected utilityChapter 8
EU(a) = Σ P(outcome|a)·U(outcome).
ExpectimaxChapter 4
Like minimax, but chance nodes take probability-weighted averages.
Explaining awayChapter 6
Observing one cause of an effect lowers the probability of the other causes.
FilteringChapter 7
Estimating the current hidden state from observations so far.
Frontier (fringe)Chapter 2
The set of generated but not yet expanded nodes (partial plans).
Fully / partially observableChapter 1
Whether the sensors reveal all of the state relevant to the decision.
Generative AIChapter 10
Models that produce new content: text, images, audio, code.
Genetic algorithmChapter 3
Population-based search using selection, crossover and mutation.
Gradient descentChapter 3
Continuous optimisation: step opposite the gradient, x ← x − α∇f(x).
Greedy best-first searchChapter 2
Expands the node with the lowest h(n) only. Often fast, but neither optimal nor complete in general.
HallucinationChapter 10
A fluent but false or unsupported output from a generative model.
Heuristic h(n)Chapter 2
An estimate of the cost from n to the nearest goal.
Hidden Markov modelChapter 7
Hidden states that follow a Markov chain and emit observations.
Hill climbingChapter 3
Moves to the best neighbour while it improves; can stop at local maxima, plateaus, ridges.
Horizon effectChapter 4
A threat just beyond the search depth is invisible to the agent.
Iterative deepeningChapter 2
Depth-limited DFS with increasing limits; memory of DFS, completeness of BFS.
K-MeansChapter 8
Clustering that alternates assigning points to the nearest centroid and updating centroids.
Language modelChapter 10
A model of P(next token | previous tokens).
Linear regressionChapter 8
Predicts a number with ŷ = wx + b, usually by minimising MSE.
Linearly separableChapter 9
Classes that a single straight line (hyperplane) can separate. XOR is not.
Local searchChapter 3
Improves one or a few complete configurations by moving to neighbours; the path is irrelevant.
Logistic regressionChapter 8
Classifier giving P(y=1|x) = σ(wᵀx + b).
Machine learningChapter 8
Programs that improve at a task from data rather than hand-written rules.
Markov chainChapter 7
A sequence of states where the next state depends only on the current one.
MDPChapter 5
Markov decision process: states, actions, transition probabilities, rewards, discount γ.
MinimaxChapter 4
Backs up values: MAX nodes take the maximum, MIN nodes the minimum. Optimal against an optimal opponent.
Model-based agentChapter 1
Keeps an internal state to track aspects of the world it cannot currently see.
Multilayer perceptronChapter 9
A network with one or more hidden layers of neurons.
Naive BayesChapter 8
Classifier assuming features are conditionally independent given the class.
OverfittingChapter 8
Fitting noise in the training data, so performance on new data is poor.
PEASChapter 1
Performance measure, Environment, Actuators, Sensors: a specification of a task environment.
PerceptChapter 1
What the agent's sensors deliver at one moment; the percept sequence is the full history.
PerceptronChapter 9
A single step-activation neuron trained with w ← w + η(y − ŷ)x; learns linearly separable classes.
Policy πChapter 5
A rule specifying an action for every state.
PrecisionChapter 8
TP / (TP + FP): how many positive predictions were correct.
Q-learningChapter 5
Off-policy TD control: Q ← Q + α[r + γ max Q(s',a') − Q].
Q-value Q(s,a)Chapter 5
Expected return after taking action a in state s and then following a policy.
Random forestChapter 8
An ensemble of decision trees trained on bootstrap samples; votes or averages.
Random variableChapter 6
A variable whose value is an uncertain outcome.
Rational agentChapter 1
Chooses the action expected to maximise its performance measure, given its evidence and knowledge. Not omniscient.
RecallChapter 8
TP / (TP + FN): how many actual positives were found.
Reflex agentChapter 1
Chooses actions from the current percept using condition–action rules.
Reinforcement learningChapter 5
Learning a policy from rewards obtained by interacting with an environment.
Rejection samplingChapter 6
Generate samples and keep only those consistent with the evidence.
ReturnChapter 5
Discounted sum of future rewards: G = R₁ + γR₂ + γ²R₃ + …
RLHFChapter 10
Reinforcement learning from human feedback, used to align LLMs with preferences.
Search problemChapter 2
Initial state, actions, transition model, goal test and path cost.
Self-attentionChapter 10
Each token weighs the relevance of the tokens it can see (in LLMs, a causal mask allows only earlier tokens): softmax(QKᵀ/√d + M)V.
Simulated annealingChapter 3
Local search that accepts worse moves with probability e^(ΔE/T), with T decreasing over time.
SmoothingChapter 7
Estimating a past state using both earlier and later observations (forward–backward).
Supervised learningChapter 8
Learning from labelled examples.
TD errorChapter 5
δ = r + γV(s') − V(s): the surprise used to update estimates.
TemperatureChapter 10
A sampling setting: low means predictable choices, high means more random ones.
TokenChapter 10
A unit of text (word or word piece) processed by a language model.
TransformerChapter 10
Neural architecture based on self-attention (2017); the basis of modern LLMs.
UCSChapter 2
Uniform-cost search: expands the node with the lowest path cost g(n). Optimal with positive costs.
Unsupervised learningChapter 8
Finding structure in unlabelled data, e.g. clustering.
UtilityChapter 8
A number expressing how much an agent prefers an outcome.
Value function V(s)Chapter 5
Expected return from state s following a policy.
Value iterationChapter 5
Repeats Bellman optimality updates until the values converge.
Viterbi algorithmChapter 7
Finds the single most likely sequence of hidden states (max instead of sum).
Zero-sum gameChapter 4
One player's gain is exactly the other's loss.
ε-greedyChapter 5
Explore with probability ε (random action), otherwise exploit the best known action.

Sources

Course materials (QAIRU, AI Fundamentals AIF1303, 2026)

  1. Course syllabus, AI Fundamentals, 2026–2027 academic year.
  2. Lecture 1: Introduction, Agents and Environments.
  3. Lecture 2: Uninformed Search, A* Search & Heuristics; Practical Work 2: Route Planning in a Simplified Kazakhstan Transport Network (graph and heuristic values used in Chapter 2).
  4. Lecture 3: Local Search Algorithms.
  5. Lecture 4: Adversarial Search & Game Trees; Practical Work 4 Methodical Guide (delivery price-war example).
  6. Lecture 5: Markov Decision Processes + Reinforcement Learning.
  7. Lecture 6: Probability & Bayesian Networks.
  8. Lecture 7: Hidden Markov Models.
  9. Lecture 8: Rational Decisions and Classical Machine Learning.
  10. Understanding Kazakhstan's AI Legal Framework (course presentation, September 2026).

Books and papers

  1. Russell, S., & Norvig, P. (2021). Artificial Intelligence: A Modern Approach (4th ed.). Pearson. Chapters 2–7, 12–17, 19–21, 24 and 28 informed all chapters.
  2. Turing, A. M. (1950). Computing machinery and intelligence. Mind, 59(236), 433–460.
  3. McCulloch, W. S., & Pitts, W. (1943). A logical calculus of the ideas immanent in nervous activity. Bulletin of Mathematical Biophysics, 5, 115–133.
  4. Rosenblatt, F. (1958). The perceptron: A probabilistic model for information storage and organization in the brain. Psychological Review, 65(6), 386–408.
  5. Minsky, M., & Papert, S. (1969). Perceptrons. MIT Press.
  6. Hart, P. E., Nilsson, N. J., & Raphael, B. (1968). A formal basis for the heuristic determination of minimum cost paths. IEEE Transactions on Systems Science and Cybernetics, 4(2), 100–107.
  7. Kirkpatrick, S., Gelatt, C. D., & Vecchi, M. P. (1983). Optimization by simulated annealing. Science, 220(4598), 671–680.
  8. Viterbi, A. (1967). Error bounds for convolutional codes and an asymptotically optimum decoding algorithm. IEEE Transactions on Information Theory, 13(2), 260–269.
  9. Pearl, J. (1988). Probabilistic Reasoning in Intelligent Systems. Morgan Kaufmann.
  10. Rumelhart, D. E., Hinton, G. E., & Williams, R. J. (1986). Learning representations by back-propagating errors. Nature, 323, 533–536.
  11. Watkins, C. J. C. H., & Dayan, P. (1992). Q-learning. Machine Learning, 8, 279–292.
  12. Sutton, R. S., & Barto, A. G. (2018). Reinforcement Learning: An Introduction (2nd ed.). MIT Press.
  13. Goodfellow, I., Bengio, Y., & Courville, A. (2016). Deep Learning. MIT Press.
  14. Krizhevsky, A., Sutskever, I., & Hinton, G. E. (2012). ImageNet classification with deep convolutional neural networks. NeurIPS.
  15. Silver, D., et al. (2016). Mastering the game of Go with deep neural networks and tree search. Nature, 529, 484–489.
  16. Vaswani, A., et al. (2017). Attention is all you need. NeurIPS.
  17. Ouyang, L., et al. (2022). Training language models to follow instructions with human feedback. NeurIPS.
  18. Law of the Republic of Kazakhstan "On Artificial Intelligence", No. 230-VIII ZRK, 17 November 2025 (Adilet legal information system).
HOW THIS BOOK WAS MADE · AI-USE DISCLOSURE

Tools used: Claude (Anthropic) through Claude Code; OpenAI Codex CLI with its built-in image generation.

Used for: Claude helped draft the English text and wrote the HTML/CSS/JavaScript of the website, its interactive demos and the SVG diagrams. Codex generated all manga illustrations: the cover, the character sheet and portraits (including the mood variants used on chapter title pages), the story page and closing strip of every chapter, the Chapter 5 route strip and the glossary scene. The Chapter 9 caption was later edited in the image to read "Konaev (Kapchagay)." Each image was generated from a written script (scene, dialogue, character reference sheet) and checked for correct dialogue text and character consistency.

Design choice: formulas, worked numbers and demos are kept as real text and code rather than inside images, so that they stay exact, searchable and interactive.

How the content was verified:

  • Every definition and worked example was checked against the course lecture slides and practical guides (listed above) and against Russell & Norvig.
  • Numerical examples were recomputed independently in Python: search results and costs on the Practical 2 graph (A* expands 4 states, UCS 8, both cost 12; greedy finds cost 13), the alpha–beta trace, the perceptron AND training trace, and the XOR network weights. The HMM, Bayes and Q-learning numbers match the lecture values.
  • All demos run the real algorithms in the browser, and their outputs were compared with the Python results.
  • Chapters 9 and 10 have no course lecture file. They are based on the syllabus topics, the textbooks and the original papers above.

Authors: Nurdaulet and Mustafa (joint project).

Authors' responsibility: the structure, story concept, chapter selection and final review are the authors'. Any remaining errors are the authors' own.

ABOUT THE STORY

All characters are original. The city route follows the course's teaching graph; road costs and heuristics are classroom values, not real distances. The zigzag from Balkhash to Shymkent, Semey, Pavlodar and Taldykorgan is deliberate: Bota optimises lessons learned, not kilometres (see the route note in Chapter 5). Konaev was called Kapchagay until 2022.

★