---
library: "bootstrap"
slug: "Optimize"
name: "Optimize"
ref: "Optimize#3877"
hash: "sema:Optimize#mh:SHA-256:38771f5e8f583966cfb8af8ff0d2e6737c8d0bf87329ddc49d8049450e852674"
type: "Strategy"
layer: "Mind"
version: "0.11.0"
root: "a6a3d1ff0f982ee30430c5b42f3784c8ec901fd68482cfc1bc30899c1e5e48c5"
license: null
url: "https://semahash.org/vocabularies/bootstrap/patterns/Optimize"
---

# Optimize

Maximize utility against a metric

Mind · Strategy

## Mechanism

The iterative process of adjusting parameters or structure to maximize (or minimize) a specific Objective Function defined by a [Metric](https://semahash.org/vocabularies/bootstrap/patterns/Metric.md). It generates candidate [Solution](https://semahash.org/vocabularies/bootstrap/patterns/Solution.md)s, applies the definition to obtain comparable [MetricReading](https://semahash.org/vocabularies/bootstrap/patterns/MetricReading.md) values, and retains the best candidate. It can be Local ([Gradient](https://semahash.org/vocabularies/bootstrap/patterns/Gradient.md) Descent) or [Global](https://semahash.org/vocabularies/bootstrap/patterns/Global.md) (Evolutionary).

## Invariants

- Monotonicity: no step degrades the best-known [Solution](https://semahash.org/vocabularies/bootstrap/patterns/Solution.md). A step that finds nothing better retains the incumbent.
- Measurability: the Objective Function must be quantifiable via a [Metric](https://semahash.org/vocabularies/bootstrap/patterns/Metric.md).

## Preconditions

- Objective Function is defined
- Candidate space is explorable
- Baseline [MetricReading](https://semahash.org/vocabularies/bootstrap/patterns/MetricReading.md) is known

## Postconditions

- Best Candidate [Solution](https://semahash.org/vocabularies/bootstrap/patterns/Solution.md) found
- Best observed [MetricReading](https://semahash.org/vocabularies/bootstrap/patterns/MetricReading.md) is at least as good as the Baseline reading

## Failure modes

- Overfitting: [Solution](https://semahash.org/vocabularies/bootstrap/patterns/Solution.md) works perfectly on test data but fails in reality.
- Goodhart's Law: Optimizing for a proxy [Metric](https://semahash.org/vocabularies/bootstrap/patterns/Metric.md) destroys the actual value.
- Local Optima: Getting stuck in a 'good enough' state that prevents finding the best state.
- Premature Optimization: Optimizing before the problem is fully understood.

## Where this came from

—

## Builds on

- [Global](https://semahash.org/vocabularies/bootstrap/patterns/Global.md) (references)
- [Gradient](https://semahash.org/vocabularies/bootstrap/patterns/Gradient.md) (references)
- [MetricReading](https://semahash.org/vocabularies/bootstrap/patterns/MetricReading.md) (references)
- [Metric](https://semahash.org/vocabularies/bootstrap/patterns/Metric.md) (references)
- [Solution](https://semahash.org/vocabularies/bootstrap/patterns/Solution.md) (accepts)

## Used by

- [EvaluatorOptimizer](https://semahash.org/vocabularies/bootstrap/patterns/EvaluatorOptimizer.md) (references)
- [LateralOptimization](https://semahash.org/vocabularies/bootstrap/patterns/LateralOptimization.md) (composes_with)
- [ManifestPlanning](https://semahash.org/vocabularies/bootstrap/patterns/ManifestPlanning.md) (composes_with)
- [PUREOptimization](https://semahash.org/vocabularies/bootstrap/patterns/PUREOptimization.md) (composes_with)
- [ValuePeg](https://semahash.org/vocabularies/bootstrap/patterns/ValuePeg.md) (references)

## Related

- [EvaluatorOptimizer](https://semahash.org/vocabularies/bootstrap/patterns/EvaluatorOptimizer.md)
- [RegretMinimization](https://semahash.org/vocabularies/bootstrap/patterns/RegretMinimization.md)
- [ParetoFront](https://semahash.org/vocabularies/bootstrap/patterns/ParetoFront.md)

## Identity

- Library: bootstrap 0.11.0 (root a6a3d1ff0f98)
- Ref: Optimize#3877
- Hash: sema:Optimize#mh:SHA-256:38771f5e8f583966cfb8af8ff0d2e6737c8d0bf87329ddc49d8049450e852674

## Links

- Page: https://semahash.org/vocabularies/bootstrap/patterns/Optimize
- JSON: https://semahash.org/vocabularies/bootstrap/patterns/Optimize.json
- Library: https://semahash.org/vocabularies/bootstrap
- Library index: https://semahash.org/vocabularies/bootstrap/index.json
