class_docstr: An EP class, inherited from Optimizer.
  
  This is the designed class to define EP-related
  variables and methods.
  
  References:
      A. E. Eiben and J. E. Smith. Introduction to Evolutionary Computing.
      Natural Computing Series (2013).
docstr: Wraps Evolutionary Programming over all agents and variables.
  
  Args:
      space: Space containing agents and update-related information.
      function: A Function object that will be used as the objective function.
docstr_tok: ["Wraps","Evolutionary","Programming","over","all","agents","and","variables",".","Args",":","space",":","Space","containing","agents","and","update-related","information",".","function",":","A","Function","object","that","will","be","used","as","the","objective","function","."]
code: def update(self, space: Space, function: Function) -> None:
      """Wraps Evolutionary Programming over all agents and variables.
  
      Args:
          space: Space containing agents and update-related information.
          function: A Function object that will be used as the objective function.
  
      """
  
      n_agents = len(space.agents)
  
      children = []
      for i, agent in enumerate(space.agents):
          a = self._mutate_parent(agent, i, function)
          self._update_strategy(i, agent.lb, agent.ub)
  
          children.append(a)
  
      space.agents += children
  
      n_individuals = int(n_agents * self.bout_size)
      wins = np.zeros(len(space.agents))
  
      for i, agent in enumerate(space.agents):
          for _ in range(n_individuals):
              index = r.generate_integer_random_number(
                  0, len(space.agents)
              )
              if agent.fit < space.agents[index].fit:
                  wins[i] += 1
  
      space.agents = [
          agents
          for _, agents in sorted(
              zip(wins, space.agents),
              key=lambda pair: pair[0],
              reverse=True,
          )
      ]
      space.agents = space.agents[:n_agents]
  
imports: import copy
  from typing import Any, Dict, Optional
  import numpy
  import opytimizer.math.random
  import opytimizer.utils.exception
  from opytimizer.core import Optimizer
  from opytimizer.core.agent import Agent
  from opytimizer.core.function import Function
  from opytimizer.core.space import Space
  from opytimizer.utils import logging
label_desc: Use image node_id 11 for calling the EP obj's underlying member method code with example usage: obj.update(space, function) without return types