ProgramMetricAggregationOptions

Options & Configuration · AiDotNet.Configuration

Declares how a metrics dictionary is collapsed into the single quality an archive ranks on.

For Beginners

Your evaluation code returns several numbers; this object says how they become one score. Leave it alone and the behaviour matches the reference implementation. Set Strategy to Weighted and fill in Weights when you know that, say, accuracy matters four times as much as speed. Add the names of your MAP-Elites coordinates to ExcludedFeatureDimensions so those coordinates describe the program without also scoring it.

How It Works

The defaults reproduce the reference OpenEvolve rule (openevolve/utils/metrics_utils.py``get_fitness_score): a metric literally named combined_score wins outright, and otherwise the numeric metrics that are not archive feature dimensions are averaged. ExcludedFeatureDimensions is the counterpart of that function’s feature_dimensions argument, which exists so a behaviour coordinate such as program length does not also pull on fitness.

The remaining settings enable rules upstream has no counterpart for. Weights turns the implicit, unvalidated mean into an explicit weighted mean whose weights are checked before a run starts, and ReferencePoint with AugmentationCoefficient configures a Chebyshev achievement scalarization that improves whichever objective is currently furthest from target. RequireAllWeightedMetrics decides whether a weight naming a metric the evaluator did not report is a configuration error or merely something to report.

Constructors

Constructor Summary
ProgramMetricAggregationOptions()

Properties

Property Summary
ICollection<string> ExcludedFeatureDimensions { get; set; } Gets the metric names excluded from averaging because they are archive feature dimensions.
IDictionary<string, double> ReferencePoint { get; set; } Gets the per-metric target values used by Tchebycheff.
IDictionary<string, double> Weights { get; set; } Gets the per-metric weights used by Weighted and Tchebycheff.
ProgramMetricAggregationStrategy Strategy { get; set; } Gets or sets the rule used to collapse the metrics.
bool AllowTextMetricConversion { get; set; } Gets or sets whether text metrics that parse as finite numbers are accepted.
bool RequireAllWeightedMetrics { get; set; } Gets or sets whether a declared weight naming an unreported metric is an error.
double AugmentationCoefficient { get; set; } Gets or sets the augmentation coefficient of the Chebyshev scalarization.
string CombinedScoreKey { get; set; } Gets or sets the metric name that short-circuits aggregation.

Methods

Method Summary
ProgramMetricAggregationOptions Clone() Creates an independent copy so a running aggregation is unaffected by later mutation.
string ToString() Returns a stable, culture-independent representation of every value that changes a score.
void Validate() Rejects a configuration that could not produce a defensible score.

Fields

Field Summary
int MaxReportedIssues The largest number of issues one aggregation reports.
string DefaultCombinedScoreKey The metric name the reference implementation prefers over every other, combined_score.