saealib.Algorithm#

class saealib.Algorithm[source]#

Bases: ABC

Base class for evolutionary algorithms.

Methods

__init__

ask

Generate one proposal batch from a read-only state view.

contract

Return the evolutionary-algorithm family contract.

create_pareto_archive

Create a ParetoArchive with the correct direction for the problem.

get_required_attrs

Return the list of attributes required for Population.

tell

Consume feedback and return the state changes it produced.

Method Details

Algorithm.__init__()#
abstractmethod Algorithm.ask(request, state)[source]#

Generate one proposal batch from a read-only state view.

Parameters:
  • request (ProposalRequest)

  • state (StateView)

Return type:

ProposalBatch

Algorithm.contract()[source]#

Return the evolutionary-algorithm family contract.

Return type:

ComponentContract

Algorithm.create_pareto_archive(attrs, init_capacity, problem)[source]#

Create a ParetoArchive with the correct direction for the problem.

Parameters:
Return type:

ParetoArchive

abstractmethod Algorithm.get_required_attrs(problem)[source]#

Return the list of attributes required for Population.

Parameters:

problem (Problem)

Return type:

list[PopulationAttribute]

abstractmethod Algorithm.tell(feedback, state)[source]#

Consume feedback and return the state changes it produced.

Parameters:
Return type:

StatePatch