Skip to main content
Ctrl+K

metaheuristic-designer 1.1.0 documentation

  • Quick Start
  • API reference
  • Custom components
  • Module Details
  • Simple subpackage
    • Algorithm Configuration
    • Operators and selection methods
    • Plotting Tutorial
  • Quick Start
  • API reference
  • Custom components
  • Module Details
  • Simple subpackage
  • Algorithm Configuration
  • Operators and selection methods
  • Plotting Tutorial

Section Navigation

  • metaheuristic_designer.strategies.no_search module

metaheuristic_designer.strategies.no_search module#

No-op strategy that returns the population unchanged (debug / baseline).

class NoSearch(initializer, name='No search', **kwargs)[source]#

Bases: SearchStrategy

Debug strategy that does nothing.

The population is never modified. Useful as a baseline or for testing other components in isolation.

Parameters:
initializerInitializer

Population initializer.

namestr, optional

Display name (default "No search").

**kwargs

Forwarded to SearchStrategy.

Attributes:
params

Access parameter values by attribute-style lookup.

population_size

Gets the amount of individuals in the population.

Parameters:
  • initializer (Initializer)

  • name (str)

Methods

extra_report()

Hook called at the end of the optimization (intended for subclasses).

extra_step_info()

Hook called after each generation (intended for subclasses).

gather_parameters()

Collect the current parameters from all sub-components.

get_params()

Return a copy of the current parameter dictionary.

get_state()

Gets the current state of the search strategy as a dictionary.

initialize(objfunc)

Initializes the optimization search strategy.

step(prev_population, objfunc)

Performs a single iteration of the algorithm on a given population.

store_kwargs([progress])

Store keyword arguments and evaluate them at the given progress.

update(progress)

Advances the state of the search by one iteration.

update_kwargs([progress])

Add or replace parameters and immediately evaluate them.

reset

step(prev_population, objfunc)[source]#

Performs a single iteration of the algorithm on a given population.

Return type:

Population

Parameters:
populationPopulation

Population of solutions in which to perform the operators.

Returns:
Population

Next population after performing all the steps in the iteration.

Parameters:
  • prev_population (Population)

  • objfunc (ObjectiveFunc)

On this page
  • NoSearch
    • NoSearch.step()
Show Source

© Copyright 2023, Eugenio Lorente-Ramos.

Created using Sphinx 8.1.3.

Built with the PyData Sphinx Theme 0.18.0.