saealib.space.ObjectSpace#

class saealib.space.ObjectSpace(representation)[ソース]#

ベースクラス: object

A search space for arbitrary Python objects.

An ObjectSpace registers no services by default. It can be sampled, selected, and concatenated; components requiring richer operations will be rejected at compile time due to missing services.

パラメータ:

representation (RepresentationSpec)

Methods

__init__

sample

Sample n empty object slots (represented by None placeholders).

validate

Check if genomes batch is an ObjectBatch.

Method Details

ObjectSpace.__init__(representation)[ソース]#
パラメータ:

representation (RepresentationSpec)

戻り値の型:

None

ObjectSpace.sample(n, rng=None)[ソース]#

Sample n empty object slots (represented by None placeholders).

パラメータ:
  • n (int)

  • rng (Generator | None)

戻り値の型:

ObjectBatch

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

Check if genomes batch is an ObjectBatch.

パラメータ:

genomes (GenomeBatch)

戻り値の型:

ValidationResult