MapElitesAutoML<T, TInput, TOutput>

Models & Types · AiDotNet.AutoML

Built-in supervised AutoML strategy that searches a deterministic MAP-Elites archive.

Inheritance: AutoMLModelBase<T, TInput, TOutput> → SupervisedAutoMLModelBase<T, TInput, TOutput> → BuiltInSupervisedAutoMLModelBase<T, TInput, TOutput> → MapElitesAutoML<T, TInput, TOutput>

Implements: IMapElitesAutoMLModel<T, TInput, TOutput>

For Beginners

Ordinary AutoML keeps a single best model. This strategy keeps a small grid of “best in class” models instead, one slot for every model family at every level of configuration complexity, and still returns the overall winner the way any other AutoML strategy does. The extra diversity matters when the winner is not what you can deploy: if the top model is a heavy ensemble, the archive also tells you the best simple model that was found. Most users never construct this class directly; set AutoMLOptions.SearchStrategy = AutoMLSearchStrategy.MapElites, pass those options to ConfigureAutoML on the model builder, and read Archive after the run to inspect the grid. Construct it yourself only when you need custom MapElitesAutoMLOptions such as a different seed or bin count, then plug the instance in through the ConfigureAutoML(IAutoMLModel) overload.

How It Works

Quality is the configured validation metric. The built-in behavior descriptors are model family and normalized configuration complexity. Final-test data is not accepted by this API and cannot influence selection or archive membership.

TrialLimit is the maximum number of unique, expensive training attempts. Duplicate specifications are rejected before training and do not consume that budget. Evaluation is intentionally sequential because the shared AutoML trial executor owns best-model and trial-history state; proposal randomness still comes from stable, candidate-local streams.

The search drives the generic EvolutionEngine over a MapElitesArchive whose grid has one row per candidate model family and ComplexityBinCount columns. Each step selects a parent elite through CuriosityEvolutionSelectionPolicy, which favors parents whose offspring improved the archive, then either samples a fresh family with probability ExplorationProbability or mutates the parent’s hyperparameters, optionally borrowing individual values from an inspiring elite of the same family drawn from up to InspirationCount archive members. The proposal is trained and validated once and kept only if it beats the incumbent of its cell. This is MAP-Elites as described by Mouret and Clune, “Illuminating search spaces by mapping elites” (2015, arXiv:1504.04909). Seed and proposal streams are PCG generators (O’Neill, 2014) exposed through StableRandom, so a run is reproducible across processes and platforms. Wall-clock cost is dominated by the at most TrialLimit model fits; archive bookkeeping is at most O(n log n) in the number of occupied cells per insertion, which is negligible by comparison.

Constructors

Constructor Summary
MapElitesAutoML(MapElitesAutoMLOptions options, Random random) Initializes a MAP-Elites AutoML search strategy.

Properties

Property Summary
IReadOnlyList<MapElitesAutoMLArchiveEntry> Archive { get; }
string ArchiveStateHash { get; set; }

Methods

Method Summary
Task<Dictionary<string, object>> SuggestNextTrialAsync()
Task<IFullModel<T, TInput, TOutput>> SearchAsync(TInput inputs, TOutput targets, TInput validationInputs, TOutput validationTargets, TimeSpan timeLimit, CancellationToken cancellationToken)