saealib.space.SearchSpace#

class saealib.space.SearchSpace(*args, **kwargs)[ソース]#

ベースクラス: 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)[ソース]#

Draw n sampled genomes from the space.

パラメータ:
  • n (int)

  • rng (Generator | None)

戻り値の型:

GenomeBatch

SearchSpace.validate(genomes)[ソース]#

Validate a batch of genomes against space constraints.

パラメータ:

genomes (GenomeBatch)

戻り値の型:

ValidationResult