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.simple.random_search module

metaheuristic_designer.simple.random_search module#

Ready-to-run Random Search wrappers.

random_search_binary(objfunc, encoding=None, rng=None, **kwargs)[source]#

Random Search for binary-coded vectors.

Return type:

Algorithm

Parameters:
objfuncObjectiveFunc

The objective function to optimize.

encodingEncoding, optional

Encoding; defaults to TypeCastEncoding (int → bool).

rngRNGLike, optional

Random seed or generator.

**kwargs

Forwarded to Algorithm.

Parameters:
  • objfunc (ObjectiveFunc)

  • encoding (Encoding | None)

  • rng (int | Generator | None)

random_search_permutation(objfunc, encoding=None, rng=None, **kwargs)[source]#

Random Search for permutation-coded vectors.

Return type:

Algorithm

Parameters:
objfuncObjectiveFunc

The objective function to optimize.

encodingEncoding, optional

Encoding applied to the genotype.

rngRNGLike, optional

Random seed or generator.

**kwargs

Forwarded to Algorithm.

Parameters:
  • objfunc (ObjectiveFunc)

  • encoding (Encoding | None)

  • rng (int | Generator | None)

random_search_discrete(objfunc, encoding=None, rng=None, **kwargs)[source]#

Random Search for integer-coded vectors.

Return type:

Algorithm

Parameters:
objfuncObjectiveFunc

The objective function to optimize.

encodingEncoding, optional

Encoding applied to the genotype.

rngRNGLike, optional

Random seed or generator.

**kwargs

Forwarded to Algorithm.

Parameters:
  • objfunc (ObjectiveFunc)

  • encoding (Encoding | None)

  • rng (int | Generator | None)

random_search_real(objfunc, encoding=None, rng=None, **kwargs)[source]#

Random Search for real-coded vectors.

Return type:

Algorithm

Parameters:
objfuncObjectiveFunc

The objective function to optimize.

encodingEncoding, optional

Encoding applied to the genotype.

rngRNGLike, optional

Random seed or generator.

**kwargs

Forwarded to Algorithm.

Parameters:
  • objfunc (ObjectiveFunc)

  • encoding (Encoding | None)

  • rng (int | Generator | None)

On this page
  • random_search_binary()
  • random_search_permutation()
  • random_search_discrete()
  • random_search_real()
Show Source

© Copyright 2023, Eugenio Lorente-Ramos.

Created using Sphinx 8.1.3.

Built with the PyData Sphinx Theme 0.18.0.