# Constraint Satisfaction
**Domain:** Artificial Intelligence / Optimization / Language Generation
**Doc Type:** Canonical Mechanism Node
**Maturity:** Developed
**Related:** [[wiki/Semantic-First Constrained Generation|Semantic-First Constrained Generation]], [[wiki/Formal Grammar|Formal Grammar]], [[wiki/Objective Function|Objective Function]], [[wiki/Candidate Generation and Ranking|Candidate Generation and Ranking]], [[wiki/Prosody and Syllabification|Prosody and Syllabification]]
---
## Definition
**Constraint Satisfaction is the search for assignments or outputs that satisfy multiple requirements, some mandatory and some negotiable.** A constraint system makes incompatibilities explicit and provides a basis for deciding which conditions may be relaxed.
## Language-Generation Context
Poetic generation combines meaning, grammaticality, rhyme, meter, lexical availability and naturalness. Improving one dimension can damage several others: the perfect rhyme destroys meaning, the precise word breaks meter, or a natural sentence loses conceptual direction.
[[wiki/Semantic-First Constrained Generation|Semantic-First Constrained Generation]] treats this as a multi-representation problem. Semantic continuity sets the direction; candidate generation supplies alternatives; phonological and formal structures filter them; ranking compares the remaining tradeoffs.
Constraints should retain their identities. A system that silently blends them into one score cannot tell the writer whether a suggestion was chosen for meaning, rhyme, attestation or merely model preference.
## Key Insight
**The hard problem is rarely satisfying one constraint. It is preserving the hierarchy and provenance of several constraints while they interfere with one another.**
## See Also
[[wiki/Semantic-First Constrained Generation|Semantic-First Constrained Generation]], [[wiki/Candidate Generation and Ranking|Candidate Generation and Ranking]], [[wiki/Objective Function|Objective Function]], [[wiki/Approximate Phonological Matching|Approximate Phonological Matching]], [[wiki/Formal Grammar|Formal Grammar]], [[wiki/Prosody and Syllabification|Prosody and Syllabification]]
## Sources / Provenance
- Primary project account: [[projects/Ten Years Building a Symbolic Language Engine|Ten Years Building a Symbolic Language Engine]].
- Standard constraint-satisfaction and optimization literature.
- Project account of simultaneous semantic, phonological and formal constraints.