Greedy Stepwise Commitment¶
Build a solution one locally best irreversible step at a time when full lookahead is too costly and the local score is trusted for the problem class.
Essence¶
Greedy Stepwise Commitment is the solution pattern behind a greedy algorithm: choose the best currently feasible next step, commit it, update the residual state, and repeat. The practical value is speed and simplicity. The practical danger is that each early local commitment changes the remaining problem, so a rule that looks excellent step-by-step can become globally poor, unfair, or trapped.
Compression statement¶
Greedy Stepwise Commitment applies when a system must construct a solution through a sequence of choices, full search or future simulation is too expensive for the operating context, and each partial state exposes a set of currently feasible next steps. The intervention defines a local priority score, commits the highest-scoring feasible step without lookahead, updates the residual state, repeats, and surrounds the rule with explicit assumptions, constraint guards, validation benchmarks, trap sentinels, and fallback conditions so speed does not become blind path-dependent lock-in.
Canonical formula: state_0 -> repeat: choose argmax_{a in feasible_actions(state_t)} local_score(a, state_t); commit(a); state_{t+1}=update(state_t,a); stop when solution complete or sentinel triggers
When to Use It¶
Use this archetype when full lookahead is unavailable or not worth its cost, when feasible next steps can be generated cheaply, and when a local priority score is either proven or validated to correlate with whole-solution quality. It is especially useful for dispatch, scheduling, routing, coverage, allocation, graph construction, and ordinary-case triage.
Core Design Loop¶
- Represent the current partial state and residual capacity.
- Generate currently feasible next steps.
- Score each next step by local priority.
- Commit the highest-scoring feasible step using explicit tie-breaks.
- Update residual state and constraints.
- Repeat until completion or until a sentinel triggers repair, review, or a stronger method.
Safety Envelope¶
A good greedy design documents why local best should compose into a good whole. Sometimes this is a proof condition; often it is benchmark evidence and operational tolerance for approximation. The safety envelope includes constraint guards, tie-break rules, fairness or diversity constraints, trap sentinels, score-drift monitoring, and escalation for high-stakes edge cases.
Boundary Notes¶
This archetype should not collapse into generic heuristic selection, because it is not merely choosing between methods; it is the operating architecture of a specific local-commitment method. It should not collapse into search-space pruning, because pruning eliminates candidates whereas greedy commitment constructs a solution. It should not collapse into Local Optimum Escape, because escape methods usually appear after greedy commitment has failed or become trapped.
Examples¶
A graph routine repeatedly accepts the cheapest safe edge. A dispatch center repeatedly assigns the best currently available crew to the highest-priority feasible job. A coverage planner repeatedly selects the facility that covers the largest number of still-uncovered needs per dollar. A route planner repeatedly adds the nearest feasible stop when planning time is constrained.
Integration Note¶
During archive integration, treat named algorithms and rules such as priority-queue selection, nearest-neighbor routing, greedy set cover, Kruskal-style edge acceptance, Dijkstra-style frontier expansion, and earliest-deadline-first dispatch as mechanisms or variants unless they accumulate separate cross-domain component structures. The accepted target prime greedy_algorithm should point directly to this archetype.
Common Mechanisms¶
- Dijkstra-Style Frontier Expansion
- Earliest-Deadline-First Dispatch
- Greedy Assignment Pass
- Greedy Set-Cover Heuristic
- Highest-Marginal-Gain-First Rule
- Kruskal-Style Edge Acceptance
- Lexicographic Priority Rule
- Nearest-Neighbor Route Extension
- Priority-Queue Step Selection
- Shortest-Processing-Time-First Rule
- Sorted Candidate Sweep
- Trap-Sentinel Escalation
Related Abstractions¶
Abstractions this archetype builds on — directly (a source ingredient) or as a related pattern. Links follow the typed catalog namespace.
Built directly on (7)
- Algorithm: Step-by-step problem-solving procedure.
- Commitment: An agent binds itself in the present to a future course of action or to the truth of a proposition, creating a new constraint on future behavior that others can rely on.
- Decision: Committing to one alternative from a set under uncertainty and trade-off, collapsing open deliberation into a chosen path and foreclosing the others.
- Greedy Algorithm: Committing irrevocably to the locally best choice at each step, with no lookahead.
- Heuristic: Mental shortcuts.
- Optimization: Finds best solution under constraints.
- Prioritization: Ordering competing claims on finite resources by a value or urgency metric to produce a ranked sequence of action under constraint, making explicit what gets done first and what does not get done at all.
Also references 26 related abstractions
- Approximation: Good-enough representation.
- Backtracking: Extend a partial solution one step at a time and reverse the most recent commitment as soon as a constraint proves it cannot succeed, preserving earlier work.
- Bounded Rationality: Limited decision capacity.
- Branch and Bound: Systematic search with pruning.
- Complexity (Time/Space): Resource scaling with input size.
- Constraint: Limits possibilities to guide outcomes.
- Convergence: Movement toward stable state.
- Dynamic Programming: Solve via subproblem reuse.
- Integer Linear Programming (ILP): Discrete optimization with integer variables.
- Linear Programming (LP): Optimize linear objective with constraints.
Variants¶
Narrower or domain-specific specializations that share this archetype's core structure. Recognized variants are established; candidate variants are provisional.
Proof-Safe Greedy Variant · subtype · recognized
A greedy commitment pattern used where problem structure proves that each local best commitment can be extended to a global optimum.
- Distinct from parent: The parent allows validated approximate use; this variant requires a formal or strongly established safe-greedy condition.
- Use when: Exchange, cut, matroid-like, monotonicity, nonnegative-weight, or dominance properties have been proven for the problem class; The cost of proof or model checking is lower than the cost of exhaustive search in repeated use.
- Typical domains: computer science, operations research, network routing
- Common mechanisms: kruskal style edge acceptance, dijkstra style frontier expansion, sorted candidate sweep
Approximate Greedy Heuristic Variant · mechanism family variant · recognized
A greedy pattern used because it produces acceptable solutions quickly even when global optimality is not guaranteed.
- Distinct from parent: It emphasizes validation, regret tracking, and fallback rather than formal optimality conditions.
- Use when: Full search is infeasible or too slow; Historical, sampled, or benchmark comparisons show the local rule is usually good enough for the objective and stakes.
- Typical domains: resource allocation, logistics, software computing
- Common mechanisms: highest marginal gain first rule, greedy set cover heuristic, greedy assignment pass
Urgency-Triage Greedy Variant · domain variant · recognized
A greedy pattern that commits the next step by current urgency, deadline, acuity, or risk of delay.
- Distinct from parent: It narrows the local priority score to urgency and waiting-cost management.
- Use when: Delay cost rises sharply with waiting time; The main local score is urgency rather than total value, distance, or marginal coverage.
- Typical domains: incident response, medicine healthcare, customer support
- Common mechanisms: earliest deadline first dispatch, priority queue step selection, trap sentinel escalation
Marginal-Gain Greedy Variant · subtype · recognized
A greedy pattern that chooses the next item, feature, route, or action with the largest immediate marginal gain per cost.
- Distinct from parent: It focuses on recomputing incremental value after each selected item changes the residual state.
- Use when: The next-step value can be estimated independently enough for a marginal score; Diminishing returns or coverage effects can be recomputed after each commitment.
- Typical domains: portfolio selection, feature selection, coverage planning
- Common mechanisms: highest marginal gain first rule, greedy set cover heuristic, sorted candidate sweep
Near names: Greedy Algorithm, Greedy Heuristic, Local-Best-First Selection, Myopic Step Selection, Priority-First Commitment, Hill Climbing, Nearest-Neighbor Heuristic, Highest-Marginal-Gain First.