Crow Search Algorithm.

class opytimizer.optimizers.swarm.csa.CSA(params: Optional[Dict[str, Any]] = None)

A CSA class, inherited from Optimizer.

This is the designed class to define CSA-related variables and methods.


A. Askarzadeh. A novel metaheuristic method for solving constrained engineering optimization problems: Crow search algorithm. Computers & Structures (2016).

__init__(params: Optional[Dict[str, Any]] = None) → None

Initialization method.

Parameters:params – Contains key-value parameters to the meta-heuristics.

Flight length.


Awareness probability.


Array of memories.

compile(space: opytimizer.core.space.Space) → None

Compiles additional information that is used by this optimizer.

Parameters:space – A Space object containing meta-information.
evaluate(space: opytimizer.core.space.Space, function: opytimizer.core.function.Function) → None

Evaluates the search space according to the objective function.

  • space – A Space object that will be evaluated.
  • function – A Function object that will be used as the objective function.
update(space: opytimizer.core.space.Space) → None

Wraps Crow Search Algorithm over all agents and variables.

Parameters:space – Space containing agents and update-related information.