opytimizer.optimizers.social.mvpa

Most Valuable Player Algorithm.

class opytimizer.optimizers.social.mvpa.MVPA(params: Optional[Dict[str, Any]] = None)

A MVPA class, inherited from Optimizer.

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

References

H. Bouchekara. Most Valuable Player Algorithm: a novel optimization algorithm inspired from sport. Operational Research (2017).

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

Initialization method.

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

Maximum number of teams.

n_p

Number of players per team.

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

Compiles additional information that is used by this optimizer.

Parameters:space – A Space object containing meta-information.
_get_agents_from_team(agents: List[opytimizer.core.agent.Agent], index: int) → List[opytimizer.core.agent.Agent]

Gets a set of agents from a specified team.

Parameters:
  • agents – List of agents.
  • index – Index of team.
Returns:

A sorted list of agents that belongs to the specified team.

Return type:

(List[Agent])

update(space: opytimizer.core.space.Space, function: opytimizer.core.function.Function) → None

Wraps Most Valuable Player Algorithm over all agents and variables.

Parameters:
  • space – Space containing agents and update-related information.
  • function – A Function object that will be used as the objective function.