Fundamentals
The everyday canon — recursion, a sort, a search, primes, the functional triad, a little set theory. Edit and run any of them; this is the same WebAssembly interpreter as the playground.
Factorial
Recursion — base case plus recursive step.
Euclid's GCD
The oldest algorithm still in daily use (c. 300 BCE).
Quicksort
Divide and conquer with set-builder partitions around a pivot.
Binary search
Halve the interval each step — O(log n) over a sorted array.
Primes
Trial division as a set comprehension — prime iff it has no divisor.
Map / filter / reduce
The functional triad — sum the squares of the evens.
FizzBuzz
The classic warm-up — multiples of 3, 5 and 15.
Palindrome
Fold a string's characters in reverse, then compare.
Powerset
Set theory is first-class — every subset of {1, 2, 3}.
Search & graph
Traversal and ordering over graphs — including the Datalog one-liner where a single recursive rule computes the entire transitive closure.
Reachability (Datalog)
A recursive Horn rule computes a graph's whole transitive closure.
Depth-first search
Recurse into each neighbour, tracking a visited set.
Breadth-first search
A hand-rolled queue (array + head index) explores level by level.
Dijkstra's shortest path
Weighted shortest paths from a source over a small graph.
Topological sort
DFS post-order, reversed — a valid dependency ordering.
Recursion & backtracking
Problems solved by trying and undoing — the shape of classical search.
Towers of Hanoi
Relocate a stack of disks, three pegs, recursively.
N-Queens
Backtracking: count non-attacking placements on a 6×6 board.
Permutations
Every ordering of a list, built recursively.
Dynamic programming
Overlapping subproblems solved once and cached — by array tabulation, or a dict memo keyed by the subproblem's state.
Fibonacci (memoized)
Top-down memoization — a dict caches each result, so every value is computed once.
Edit distance
Top-down, with a dict memo keyed by a compound "i,j" state — the idiom a flat array can't express directly.
Longest common subsequence
The longest order-preserving shared subsequence (length).
0/1 Knapsack
Maximum value within a weight budget, each item at most once.
Coin change
Fewest coins that make an amount, from given denominations.
Symbolic AI
Axioma's home ground: facts, rules, inference and defeasible reasoning — the classic GOFAI toolkit expressed directly. (Axioma is Datalog-flat, so these are forward-chaining and query-driven, not backtracking search.)
Forward-chaining expert system
Facts plus strict rules chain to a classification; the result is a theorem.
Family-tree inference
Parent facts; recursive ancestor, grandparent and sibling rules.
Unification by join
A shared variable bound across two relations does what unification does.
Defeasible reasoning
A strict law (theorem) survives; a default (conjecture) can be cancelled.
Rule-based NLP
Ordered morphological rules turn a noun into its English plural.
State-space reachability
States and moves as facts; a recursive rule finds every reachable state.
Turing-complete, and then some.
Recursion, loops, search, dynamic programming and a full inference engine — and every block above is editable and one click from the playground. The philosophical side lives next door in Symbolization.