# Search vs Planning

URL: https://mechanisticmindset.com/wiki/search-vs-planning
Tags: core-framework, computational-lens, meta-principle


# Search vs Planning

## The Lens

Before testing a piece of code, you can reason about what it will do. Running it then supplies information about interactions the reasoning missed. The useful balance depends on how much the model can predict and how expensive the test is.

**Planning** builds a predictive model and derives a path before execution. It assumes a shortcut is available: thinking can obtain the answer without running every step.

**Search** acts, observes the outcome and changes direction. It accepts that some answers require running the system.

The question is when each strategy deserves more of the work. Their relative value determines when to simulate and when to make contact, and cheaper AI-assisted iteration changes that balance.

## Computational Reducibility vs Irreducibility

The distinction turns on whether the system permits a shortcut to its result.

### Computationally Reducible Systems

A reducible system can be predicted without simulating every intermediate step.

| Property | Reducible Example | Why Predictable |
|----------|------------------|-----------------|
| **Mathematical proof** | 2 + 2 = 4 | Axioms + logic = answer |
| **Physics equation** | Projectile motion | F = ma, solve analytically |
| **Simple algorithm** | Sorting | Known time complexity |
| **Chess endgame** | King + Rook vs King | Tabulated optimal moves |

Planning works perfectly in these cases: reasoning derives the correct answer, which can then be executed once.

### Computationally Irreducible Systems

An irreducible system has no shortcut. Knowing its outcome requires running the steps. In Wolfram's formulation, the system is its own fastest simulator.

| Property | Irreducible Example | Why Unpredictable |
|----------|---------------------|-------------------|
| **Markets** | Stock prices | Emergent from millions of agents |
| **Human behavior** | Will they buy? | Too many interacting variables |
| **Complex code** | Will it work? | Interactions exceed mental model |
| **Relationships** | How will they respond? | Other mind is opaque |
| **Startups** | Product-market fit? | Market is computationally irreducible |

Planning still permits an approximation, but a remainder of uncertainty can be resolved only by running the system.

### The Key Insight

Most domains of practical interest are irreducible: human behavior, markets, complex systems, relationships and creative work.

Expensive iteration encouraged treating them as if a sufficiently detailed plan could determine the answer. When there is only one chance to act, as with surgery or a rocket launch, extensive planning is necessary even though the model cannot remove every uncertainty.

## When Each Strategy Dominates

Iteration cost is only one part of the decision. Failure severity, model complexity, available feedback and system type also determine the value of planning versus trying.

| Factor | Planning Wins | Search Wins |
|--------|--------------|-------------|
| **Iteration cost** | Very high (surgery, rockets) | Low (software, conversations) |
| **Model complexity** | Simple enough to hold in mind | Unknown unknowns exist |
| **Failure cost** | Catastrophic and irreversible | Recoverable, can try again |
| **Feedback availability** | Delayed or unavailable | Immediate and clear |
| **System type** | Reducible (math, simple physics) | Irreducible (markets, behavior) |

### Planning Doesn't Fail in Irreducible Systems

Planning can identify likely regions and predict rough behavior without obtaining an exact answer. Reducing a million possibilities to a hundred is useful even when the hundred still contain uncertainty.

Search then tests within that smaller set to find the one that works. Planning narrows the gap; contact closes it.

## Why Planning + Search Together

Each strategy supplies what the other lacks: an initial direction and a correction from the actual result.

### Planning Alone

A model of an irreducible system is wrong to some degree. Optimizing entirely within that model can therefore produce a wrong answer with high confidence.

"But my analysis said this would work!" describes the failure. The analysis followed the model, while the world followed its own rules.

### Search Alone

Unguided search faces a different problem. Randomly trying possibilities in a space with 1000 dimensions is exponentially slow. Without direction, the attempts do not converge in a useful time.

### Together: Initialization + Descent

Planning provides a starting point and a likely direction. Search uses feedback to move from that point toward the optimum.

This is the gradient-descent relationship. A poor initialization with a good descent converges slowly. A good initialization without descent never leaves the starting point. A good initialization followed by descent converges quickly.

The plan need not be correct to constrain the search. Narrowing 1 million options to 100 can make testing tractable.

## AI's Effect: Collapsing Iteration Cost

Reducing the cost of an attempt changes how much planning is worth doing before that attempt.

### Before AI

When producing and revising an artifact took hours or days, avoiding a failed iteration was valuable.

| Domain | Iteration Cost | Strategy | Reasoning |
|--------|---------------|----------|-----------|
| **Software** | Hours/days | Mostly planning | Debug cycles expensive |
| **Writing** | Hours | Mostly planning | Revision is slow |
| **Research** | Days/weeks | Heavy planning | Experiments expensive |
| **Design** | Hours | Mostly planning | Prototypes take time |

The expensive cycle favored planning before action.

### After AI

Cheaper generation and revision make it possible to obtain feedback through more attempts.

| Domain | Iteration Cost | Strategy | Reasoning |
|--------|---------------|----------|-----------|
| **Software** | Minutes | Search dominant | AI generates, tests fail/pass, iterate |
| **Writing** | Minutes | Search dominant | AI drafts, you iterate on feedback |
| **Research** | Hours | Mixed | AI synthesizes, you validate |
| **Design** | Minutes | Search dominant | AI generates options, you select |

Software, writing and design shift toward search, while research retains a mixed strategy because validation still takes time.

### The Mechanism

AI changes the cost of running a system without making the system more reducible. More of the unanswered questions can therefore be addressed through affordable experiments.

$$\text{Strategy} = f(\text{iteration cost}, \text{system reducibility})$$

Lower iteration cost makes search viable in domains where the previous expense favored extensive planning.

## Reality Contact as the Differentiator

Planning runs the model in the person's head. Search runs the actual system. The difference is whether the next observation comes from simulation or from the world the model is meant to describe.

### AI Accelerates Reality Contact

AI can interpret an error quickly, produce a variation for the next attempt and extract a direction from a binary result. [Gradient extraction](/wiki/gradients#ai-as-gradient-extraction-layer) develops that last step.

When the interface to reality becomes faster and cheaper, the balance shifts from planning first toward acting to obtain the next observation.

### The Danger

The same tool can accelerate an isolated simulation. More elaborate plans and more scenarios do not supply outside evidence, so blind spots can expand along with the model.

When each iteration encounters reality, AI instead accelerates the sequence of feedback and correction. The tool does not choose between those uses. The distinction is whether it helps avoid the encounter or makes the encounter easier.

## The Planning-Search Loop

In an irreducible domain, the two strategies form a repeating process:

```
1. PLAN (LLM constrains search space)
   → Hypothesis about what might work
   → Direction to search

2. ACT (execute in reality)
   → Try the hypothesis
   → Touch actual territory

3. OBSERVE (collect signal)
   → What happened?
   → How does it differ from prediction?

4. EXTRACT GRADIENT (LLM converts outcome to direction)
   → Binary outcome → directional information
   → What does this suggest about where to go next?

5. UPDATE PLAN (refine model)
   → Incorporate new information
   → Narrow search space further

6. REPEAT until converged
```

### This Loop Is Irreducible

Each step supplies something needed by the next iteration. Omitting one produces a distinct failure:

| If You Skip | What Happens |
|-------------|--------------|
| **No hypothesis (step 1)** | Random walk, no direction |
| **No reality contact (step 2)** | Pure simulation, blind spots |
| **No observation (step 3)** | Wasted action, no learning |
| **No gradient extraction (step 4)** | Binary outcomes don't guide |
| **No model update (step 5)** | Same mistakes repeated |
| **No repetition (step 6)** | Single-shot = planning only |

The complete sequence is the minimum structure for learning in an irreducible domain. No step can be skipped.

### Variations Are Parameter Changes

Parallel attempts, nested timescales, batched updates and different amounts of exploration alter how the process runs without replacing its structure.

| Variation | What Changes | Core Loop Intact |
|-----------|--------------|------------------|
| **Parallelization** | Run multiple hypotheses simultaneously | Yes, just more loops in parallel |
| **Hierarchy** | Nested loops (tactical inner, strategic outer) | Yes, loops at different scales |
| **Batch vs online** | Update frequency | Yes, just timing of updates |
| **Exploration/exploitation** | How much to deviate from best hypothesis | Yes, parameter in step 5 |

## Agentic AI as Planning-Search Loops

Tool calling alone does not define an agent. An agent combines planning and search with contact and state that persists between attempts.

### What Makes an Agent

The modules supply hypotheses, execution, observed results, interpretation and a record that carries forward.

| Component | Function | Implementation |
|-----------|----------|----------------|
| **Planning module** | Generate hypotheses, constrain space | LLM reasoning |
| **Execution module** | Interface with reality | Tool calls, APIs |
| **Observation module** | Collect outcomes | Parse results, measure |
| **Gradient extraction** | Interpret outcomes directionally | LLM analysis of results |
| **State** | Persist across iterations | Memory, context |

### Infrastructure Determines Viability

Manual wiring and repeated state management make every iteration expensive. Automated loops and persistent state reduce that cost.

Good AI infrastructure makes the complete loop cheap enough that search can dominate. Its value depends on the expense of the next iteration, rather than on the sophistication of a plan produced once.

## High-Leverage Domains for Search

Search is especially useful when the solution space has structured rules and defined moves, results can be verified, and the number of possibilities exceeds what exhaustive planning can handle.

| Domain | Why Search Works | Example |
|--------|-----------------|---------|
| **Coding** | Tests verify, iteration cheap | Try → run tests → iterate |
| **Tax optimization** | Rules defined, compliance testable | Try deduction → valid/invalid → iterate |
| **Cooking ratios** | Chemistry verifiable, taste testable | Adjust ratio → taste → iterate |
| **Workout programming** | Recovery measurable, results visible | Try protocol → measure → adjust |
| **Calendar optimization** | Constraints verifiable, conflicts detectable | Try schedule → conflicts? → iterate |

These domains can supply binary results. Gradient extraction turns the result into directional information for the next attempt, allowing a repeated optimization loop.

## Practical Application

### When to Plan More

Planning deserves more effort when attempts are expensive, failure is catastrophic or irreversible, the model is simple enough to predict accurately, or feedback is unavailable. These conditions make the next untested action costly or make reasoning comparatively informative.

### When to Search More

Search deserves more effort when attempts are cheap, failures are recoverable, the model contains too many unknowns for accurate prediction, and feedback arrives quickly. A trial then obtains information the plan cannot supply at a tolerable cost.

### The Meta-Heuristic

Spending more than 20% of the time planning without reality contact probably indicates the wrong strategy. The suggested planning/search ratio responds to the lower iteration cost made available by AI.

## Related Concepts

- [AI as Accelerator](/wiki/ai-as-accelerator) explains the falling iteration cost.
- [Reality Contact](/wiki/reality-contact) distinguishes running the system from running its simulation.
- [Gradients](/wiki/gradients) turns binary outcomes into directional feedback.
- [Algorithmic Complexity](/wiki/algorithmic-complexity) explains how modeling constrains a search.
- [Cybernetics](/wiki/cybernetics) describes the feedback structure of the loop.
- [Startup as a Bug](/wiki/startup-as-a-bug) applies search to an irreducible market.
- [Clarity](/wiki/clarity) distinguishes the initial direction supplied by planning from its later refinement.
- [Skill Acquisition](/wiki/skill-acquisition) searches technique space through feedback.
- [Bounded Search](/wiki/bounded-search) supplies the budget required for search to converge.

## Key Principle

Planning constrains the possibilities worth testing. Search supplies the evidence needed to correct that plan and converge on what works.

Cheaper iteration changes how much uncertainty it is worth resolving before an attempt. It does not remove the need to act, observe, extract a direction, update the model and repeat.
