Before neural networks, there were algorithms.
AI researchers have developed a rich collection of algorithmic techniques for solving problems associated with intelligence. These traditional methods — search, logic, probability, and classification — remain fundamental to AI even as deep learning has become dominant. Understanding them is essential for understanding the full scope of the field.
Learning objectives
By the end of this note, you should be able to:
- Explain how search algorithms explore possible solutions
- Distinguish state space search from local search
- Describe propositional, predicate, and fuzzy logic
- Explain Bayesian networks and probabilistic reasoning
- Compare symbolic and statistical approaches to AI
Many AI problems are search problems.
At its core, much of AI is about searching through a space of possible solutions to find one that satisfies some criteria. Whether planning a route, solving a puzzle, or optimising a function, search algorithms are the workhorse of traditional AI.
Most interesting AI problems have exponentially many possible solutions. A chess game has roughly 10120 possible positions — more than atoms in the observable universe. Search algorithms must find good solutions without examining every possibility. This is the fundamental challenge of AI.
Exploring a tree of possibilities.
State space search searches through a tree of possible states to try to find a goal state. Planning algorithms search through trees of goals and subgoals, attempting to find a path to a target goal.
Breadth-first search
Explores all states at the current depth before moving deeper. Guarantees finding the shortest path but requires exponential memory. Good when the solution is shallow.
Depth-first search
Explores one branch fully before backtracking. Uses less memory but may miss shorter paths or get stuck in infinite branches. Good when solutions are deep.
A* search
Uses a heuristic function to estimate the cost to reach the goal from each state. Explores the most promising states first. Widely used in pathfinding, game AI, and robotics. Optimal when the heuristic is admissible (never overestimates).
Adversarial search
For games and competitive situations. Minimax algorithms search through possible moves, assuming the opponent plays optimally. Alpha-beta pruning makes this tractable by eliminating branches that cannot affect the final decision.
Optimising by moving toward better solutions.
Local search starts with an initial solution and iteratively improves it by making small changes. Rather than exploring all possibilities, it moves through the solution space toward a local optimum.
Hill climbing
Always move to the best neighbouring solution. Simple but gets stuck in local optima — a solution that is better than its neighbours but not the best overall.
Simulated annealing
Occasionally accepts worse solutions to escape local optima, inspired by the annealing process in metallurgy. The probability of accepting worse solutions decreases over time.
Evolutionary algorithms
Maintain a population of solutions, combining and mutating them over generations. Inspired by biological evolution. Effective for complex optimisation problems with many local optima.
Reasoning with precise rules.
Formal logic is used for reasoning and knowledge representation. It comes in two main forms: propositional logic (which operates on statements that are true or false and uses logical connectives) and predicate logic (which also operates on objects, relations, and quantifiers).
Propositional logic
Operates on simple true/false statements with logical connectives. Useful for rule-based systems, verification, and simple reasoning tasks. Limited because it cannot represent objects, quantities, or relationships between entities.
Example: IF temperature > 100 AND pressure > normal THEN alert(operator)
Predicate logic (first-order)
Extends propositional logic with variables, objects, relations, and quantifiers (∀ "for all", ∃ "there exists"). Can express complex knowledge about the world.
Example: ∀x (Human(x) → Mortal(x)); Human(Socrates); ∴ Mortal(Socrates)
Fuzzy logic
Assigns a degree of truth between 0 and 1, rather than strict true/false. Useful for systems that must handle vague or imprecise concepts like "warm," "fast," or "tall." Widely used in control systems (washing machines, air conditioning, automotive systems).
Limitations of logic
Logic requires explicit knowledge encoding — someone must write all the rules. It struggles with uncertainty, ambiguity, and the frame problem (determining what is relevant). These limitations drove the shift toward statistical and learning-based approaches.
Reasoning under uncertainty.
Many problems in AI (including reasoning, planning, learning, perception, and robotics) require the agent to operate with incomplete or uncertain information. Probabilistic methods provide mathematical tools for this.
Bayes' theorem
Updates beliefs based on evidence: P(H|E) = P(E|H) × P(H) / P(E). The foundation of probabilistic AI — it tells us how to revise our estimates when we observe new data.
Markov models
Model sequences where the next state depends only on the current state (Markov property). Hidden Markov Models (HMMs) are widely used in speech recognition and natural language processing.
Decision theory
Combines probabilities with utilities (values) to make optimal decisions under uncertainty. Expected utility = Σ P(outcome) × Utility(outcome). The rational agent chooses the action with highest expected utility.
Categorising inputs into classes.
The simplest AI applications can be divided into two types: classifiers (e.g., "if shiny then diamond") and controllers (e.g., "if diamond then pick up"). Classifiers are functions that use pattern matching to determine the closest match for a given input.
Decision trees
A tree of yes/no questions that leads to a classification. Interpretable and fast, but can overfit training data. Random forests combine many trees for better accuracy.
Support vector machines
Find the hyperplane that best separates classes in feature space. Effective for high-dimensional data. Were state-of-the-art for many tasks before deep learning.
k-Nearest neighbours
Classify an input by finding the k most similar examples in the training data and taking a vote. Simple, intuitive, but computationally expensive for large datasets.
Classifiers can be hand-designed with rules or trained from data using statistical learning methods. The shift from hand-designed to data-trained classifiers was one of the key transitions in AI history. → Note 04: Machine Learning
Hardware and software for AI.
In the late 2010s, graphics processing units (GPUs) that were increasingly designed with tensor operations started being used to accelerate neural networks, overtaking CPUs as the dominant platform for AI workloads.
Hardware evolution
AI hardware has evolved from general-purpose CPUs to specialised accelerators. GPUs provide massive parallelism for matrix operations. TPUs are custom-designed for neural network training. Specialised chips (Groq, Cerebras) target specific AI workloads with even greater efficiency.
Software ecosystem
Key languages include Python (dominant), C++ (performance), and specialised languages like Prolog (logic programming) and Lisp (symbolic AI). Frameworks like PyTorch, TensorFlow, and scikit-learn provide the building blocks for modern AI development.
Modern AI is constrained by hardware availability. Training a frontier model requires thousands of GPUs running for months. This creates a significant barrier to entry and concentrates AI development in well-funded organisations. → Note 05: Modern AI Systems
Symbolic vs. statistical approaches.
AI has historically been divided into two broad paradigms: symbolic (rule-based, logical) and statistical (data-driven, probabilistic). Understanding their complementary strengths is essential.
| Aspect | Symbolic AI | Statistical / Learning AI |
|---|---|---|
| Knowledge source | Hand-encoded rules and logic | Learned from data |
| Reasoning | Deductive, precise, provable | Inductive, approximate, probabilistic |
| Transparency | High — rules are human-readable | Low — learned representations are opaque |
| Uncertainty handling | Difficult (requires extensions like fuzzy logic) | Natural (built into probabilistic frameworks) |
| Perception tasks | Poor — hard to encode visual/auditory patterns | Excellent — deep learning excels here |
| Common-sense reasoning | Requires encoding vast amounts of knowledge | Learns implicit knowledge from data |
| Brittleness | Fails when rules don't cover the case | Graceful degradation, but can hallucinate |
| Data requirements | Low (needs expert knowledge instead) | High (needs large training datasets) |
| Scalability | Expensive to maintain as rules grow | Scales with data and compute |
| Best suited for | Formal reasoning, verification, planning | Perception, language, pattern recognition |
Modern AI systems increasingly combine both paradigms. Large language models (statistical) can be augmented with symbolic reasoning tools, code interpreters, and structured knowledge bases. The either/or debate is giving way to hybrid approaches that leverage the strengths of each. → Note 09: Philosophy
Remember these ideas.
Many AI problems are search problems — finding a path through a space of possible solutions. Search algorithms must handle combinatorial explosion.
State space search explores a tree of states (A*, minimax); local search iteratively improves a solution (gradient descent, simulated annealing).
Formal logic provides precise reasoning but requires explicit knowledge encoding and struggles with uncertainty and ambiguity.
Probabilistic methods (Bayesian networks, decision theory) enable reasoning under uncertainty — essential for real-world AI systems.
Symbolic and statistical approaches have complementary strengths. Modern AI increasingly combines both rather than choosing one paradigm.
Hardware constraints (GPUs, compute costs) shape what AI is possible — and who can build it.