Skip to content

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)
}
VerbMeaningExample
maximizeHigher values produce higher fitnessmaximize health: 5.0
rewardAccumulative count contributes positivelyreward food_eaten: 2.0
penalizeValue is subtracted from fitnesspenalize 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