saealib.space.SearchSpace#

class saealib.space.SearchSpace(*args, **kwargs)[source]#

Bases: Protocol

Protocol for an optimization search space.

A SearchSpace owns representation identity, service registry, genome sampling, and genome validation.

Methods

__init__

sample

Draw n sampled genomes from the space.

validate

Validate a batch of genomes against space constraints.

Method Details

SearchSpace.__init__(*args, **kwargs)#
SearchSpace.sample(n, rng=None)[source]#

Draw n sampled genomes from the space.

Parameters:
  • n (int)

  • rng (Generator | None)

Return type:

GenomeBatch

SearchSpace.validate(genomes)[source]#

Validate a batch of genomes against space constraints.

Parameters:

genomes (GenomeBatch)

Return type:

ValidationResult