Fitness
Defines weighted objectives. The evolved brain optimizes for these.
Fitness is how you tell evolution what “success” looks like - it is the only guidance the evolution engine receives. Define what to maximize, what to reward, what to penalize, and let evolution figure out the rest. Getting this right is the most impactful decision in any experiment: a well-designed fitness function produces rich emergent behavior, while a poorly designed one leads to degenerate strategies that game the scoring without doing anything meaningful. See the Fitness Design guide for practical advice.
fitness ForagerGoals { maximize survival: 10.0 // higher = better maximize health: 5.0 reward food_eaten: 2.0 // accumulative count penalize sickness: 5.0 // subtracted from fitness penalize idle: 1.0 penalize complexity: 0.001 // genome connection count (always available)}| Verb | Meaning | Example |
|---|---|---|
maximize | Higher values produce higher fitness | maximize health: 5.0 |
reward | Accumulative count contributes positively | reward food_eaten: 2.0 |
penalize | Value is subtracted from fitness | penalize sickness: 5.0 |
- Metric names are domain-specific - the domain layer defines what’s computable
complexity(genome connection count) is always available regardless of domain- The number after the metric name is the weight