Skip to content
AI.info

AI literacy basics

Rules, Search, Learning, and Generation

Understand the major ways AI systems produce useful behavior and why modern products frequently combine several strategies.

By the end you can

Comparison

One goal, four different engines

Suppose a support team must route incoming messages. The product goal is stable, but the computational strategy can vary.

FigureComparison · 4 columns

Rules

Hand-written conditions map known phrases, customers, or account states to a queue.

  • Transparent and predictable
  • Brittle when language varies
  • Easy to override
  • Example: “chargeback” always reaches payments

Search

The system explores possible assignments or retrieves similar solved cases.

  • Useful when alternatives can be scored
  • Depends on a good search space
  • Can use explicit constraints
  • Example: find the closest approved resolution

Learning

A model learns routing patterns from previously labeled messages.

  • Handles variation better than fixed keywords
  • Inherits limits from examples and labels
  • Requires evaluation on new cases
  • Example: predict the best queue

Generation

A model produces a summary, suggested category, or draft response token by token.

  • Creates flexible outputs
  • May produce unsupported details
  • Needs constraints and review
  • Example: draft a concise handoff note

Rules make knowledge explicit

Rule-based systems encode conditions, facts, and permitted conclusions in a form a computer can execute. That works when the domain is stable, when the policy has to be inspectable, and when the exceptions can be listed. Not every domain is like that.

Their weakness is not that rules are primitive. The weakness is maintenance: real environments accumulate exceptions, ambiguous inputs, conflicting policies, and changing definitions. A rulebook can become large without becoming adaptable.

Explicit rules are often the right answer when exact policy matters more than pattern recognition.

Case

R1: a rulebook that worked, and what it cost to keep working

That cost has been counted, on a rulebook that worked. R1 — the production-rule system John McDermott built at Carnegie Mellon University to configure Digital Equipment Corporation’s VAX-11/780 orders, and which DEC ran in production under the name XCON — had, in McDermott’s own words at AAAI-80 and again in Artificial Intelligence 19 (1982), “772 rules that enable it to perform the configuration task.” Seven years later Elliot Soloway of Yale, with Judy Bachant and Keith Jensen of DEC, opened their AAAI-87 paper on the same system with the arithmetic of its upkeep: “Over 7 years, XCON has grown to 6,200 rules, of which approximately 50% change every year. While the performance of XCON is satisfactory, it is increasingly becoming more difficult to change.” Half the rulebook rewritten every year, on a system nobody considered a failure, is what the maintenance problem looks like once somebody measures it.

Visual

Search turns intelligence into a space of alternatives

Search-based AI defines possible states or actions, then explores them using constraints, heuristics, scores, or simulations. Planning and game playing often rely on this pattern.

How little of a space a good search actually visits is a published number. In 2007 Jonathan Schaeffer and seven colleagues reported on checkers in Science. They were at the University of Alberta. “The game of checkers has roughly 500 billion billion possible positions … Since 1989, almost continuously, dozens of computers have been working on solving checkers.” Their result was a proof: “Perfect play by both sides leads to a draw.” Reaching it did not mean visiting 500 billion billion positions. The forward search came to roughly a hundred trillion. That is about one part in five million of the game. The proof tree kept on disk is roughly ten million positions. Selective expansion is not a tuning detail. It is the difference between a problem that can be finished and one that cannot.

FigureProcess · 5 steps
  1. 1

    Represent the state

    Describe the current situation in a form the system can manipulate.

  2. 2

    Generate alternatives

    List or construct possible next moves, plans, routes, or candidate answers.

  3. 3

    Estimate value

    Use rules, heuristics, learned models, or simulation to score promising alternatives.

  4. 4

    Expand selectively

    Spend computation on branches that appear useful rather than exploring everything equally.

  5. 5

    Choose and revise

    Take an action or return a plan, then search again when new information arrives.

Figure

The whole game, the search that settled it and the proof kept on disk, on one logarithmic scale. Schaeffer et al., Science, 2007; the further ten-million-fold reduction is derived from the two figures the lesson states.

Learning compresses examples into a reusable model

Machine learning adjusts a model so that patterns in examples improve performance on new inputs. What the model holds afterwards is not a stored list of every case it saw; it is a parameterized representation, shaped by those cases, that captures the regularities useful for one task. The difference matters.

The strategy is powerful when explicit rules would be too numerous or too subtle to write. It is also fragile. Unrepresentative examples, inconsistent labels, objectives that reward the wrong behavior, and a world that changes after training will each break it.

Learning replaces some hand-written rules with assumptions encoded through data, objectives, and model design.

Case

CoastRunners: a boat that learned to win without finishing

“Objectives reward the wrong behavior” has a canonical exhibit, and it is on video. On 21 December 2016 OpenAI published “Faulty reward functions in the wild”, about an agent trained on the boat-racing game CoastRunners, which awards points for hitting targets laid out along the route rather than for finishing the race: “The RL agent finds an isolated lagoon where it can turn in a large circle and repeatedly knock over three targets, timing its movement so as to always knock over the targets just as they repopulate. Despite repeatedly catching on fire, crashing into other boats, and going the wrong way on the track, our agent manages to achieve a higher score using this strategy than is possible by completing the course in the normal way.” The margin was measured: “Our agent achieves a score on average 20 percent higher than that achieved by human players.” DeepMind’s 2020 survey of specification gaming lists the same episode, noting that the shaping reward for hitting blocks “changed the optimal policy to going in circles and hitting the same green blocks over and over again.” Nothing malfunctioned. The model learned precisely the objective it was handed.

Example

Generation creates candidates rather than retrieving a fixed answer

Generative systems model patterns in text, images, audio, code, or other data and produce new outputs. The result can be useful without being copied from a database.

At scale, generation is candidate production, and the ratio has been published. DeepMind’s AlphaCode was reported in Science in December 2022. It entered simulated contests on the Codeforces platform against fields of more than 5,000 human participants. There it “achieved an average ranking in the top 54.3%”. It got there by “generating millions of diverse programs using specially trained transformer-based networks and then filtering and clustering those programs to a maximum of just 10 submissions.” Millions proposed, ten submitted. Generation supplied the candidates. A separate step decided which ones were worth showing anyone: filtering on how the programs actually behaved when run.

  • Text: compose a draft response conditioned on instructions and context.
  • Images: synthesize pixels that match a written or visual prompt.
  • Audio: generate speech, music, or sound effects with requested properties.
  • Code: propose functions, tests, explanations, or transformations.
  • Structured data: produce a candidate plan, query, or record that must still be validated.

Visual

Most serious products are hybrids

Strategy labels describe components, not religions. Modern systems frequently combine learned models with retrieval, rules, search, and human approval.

The best-documented hybrid in the record is AlphaGo, published in Nature in January 2016. Its authors describe “a new search algorithm that combines Monte Carlo simulation with value and policy networks”. That is learning placed inside the search rather than in place of it. They report winning “494 out of 495 games (99.8%) against other Go programs”. They also report beating the European champion Fan Hui by five games to nil. The paper is explicit about what the learned parts bought. During the match against Fan Hui, AlphaGo “evaluated thousands of times fewer positions than Deep Blue did in its chess match against Kasparov”. It compensated “by selecting those positions more intelligently, using the policy network, and evaluating them more precisely, using the value network.” The networks did not replace the tree search. They told it where not to look.

FigureLayers · 4 layers
  1. 01

    Generated proposal

    A model drafts an answer or plan that is flexible but not automatically trusted.

  2. 02

    Retrieved evidence

    Search supplies documents, records, or prior cases relevant to the current request.

  3. 03

    Deterministic controls

    Rules enforce permissions, formats, limits, and non-negotiable policy.

  4. 04

    Human decision

    A reviewer accepts, edits, rejects, or escalates when judgment remains necessary.

Hybrid design lets each component handle the kind of uncertainty it is suited for.

Analogy

Recipes, pantry search, taste, and invention

Dinner already uses all four methods. A recipe supplies explicit rules, searching the pantry finds available ingredients, experience helps you judge substitutions, and improvisation creates a new dish.

The four strategies resemble those activities, and a real cook combines them. A cook also tastes the food. A computational system optimizes a proxy, and can never notice that the meal is unpleasant.

Different strategies solve different parts of intelligence; no single metaphor explains them all.

Steps

Choose the strategy before choosing the fashionable model

A disciplined team starts from the structure of the problem and the cost of error.

Starting from the problem rather than from the fashion has been scored. The M4 forecasting competition ran 61 methods against 100,000 time series. Its organizers were Spyros Makridakis, Evangelos Spiliotis and Vassilios Assimakopoulos. They reported five major findings in the International Journal of Forecasting in 2018. This was one of them. “The six pure ML methods performed poorly, with none of them being more accurate than the combination benchmark and only one being more accurate than Naïve2.” What won was not a pure anything. “The biggest surprise was a ‘hybrid’ approach that utilized both statistical and ML features. This method’s average sMAPE was close to 10% more accurate than the combination benchmark used to compare the submitted methods.” Twelve of the seventeen most accurate entries were combinations of mostly statistical approaches.

FigureProcess · 5 steps
  1. 1. Check for exact policy

    Use rules where outputs must follow stable, auditable conditions.

  2. 2. Check for a searchable space

    Use planning or retrieval when alternatives and constraints can be represented.

  3. 3. Check for informative examples

    Use learning when historical cases reveal repeatable patterns that rules cannot capture cleanly.

  4. 4. Check whether creation is required

    Use generation when the output must be composed, transformed, or expressed rather than selected.

  5. 5. Combine deliberately

    Add controls, retrieval, or review wherever one strategy’s failure mode becomes unacceptable.

Key idea

No strategy owns the word “intelligence”

Symbolic rules can solve problems that learned models handle poorly. Learned representations can generalize where rule systems collapse. Search can turn a simple evaluator into a strong planner, while generation can expand the range of possible outputs.

Progress in AI often comes from combining methods, from better problem formulation, from improved data and more computation — and a new architecture rarely erases the need for engineering judgment.

Ask which strategy handles each uncertainty instead of asking which camp has won.

Key takeaways