class_docstr: An LOA class, inherited from Optimizer.
  
  This is the designed class to define LOA-related
  variables and methods.
  
  References:
      M. Yazdani and F. Jolai. Lion Optimization Algorithm (LOA): A nature-inspired metaheuristic algorithm.
      Journal of Computational Design and Engineering (2016).
class_docstr_tok: ["An","LOA","class",",","inherited","from","Optimizer",".","This","is","the","designed","class","to","define","LOA-related","variables","and","methods",".","References",":","M.","Yazdani","and","F.","Jolai",".","Lion","Optimization","Algorithm","(","LOA",")",":","A","nature-inspired","metaheuristic","algorithm",".","Journal","of","Computational","Design","and","Engineering","(","2016",")","."]
docstr: Performs the hunting procedure (s. 2.2.2).
  
  Args:
      prides: List of prides holding their corresponding lions.
      function: A Function object that will be used as the objective function.
code: def _hunting(self, prides: List[Lion], function: Function) -> None:
      """Performs the hunting procedure (s. 2.2.2).
  
      Args:
          prides: List of prides holding their corresponding lions.
          function: A Function object that will be used as the objective function.
  
      """
  
      for pride in prides:
          for agent in pride:
              if agent.female:
                  agent.group = r.generate_integer_random_number(high=4)
              else:
                  agent.group = 0
  
          first_group = np.sum(
              [agent.fit for agent in pride if agent.group == 1]
          )
          second_group = np.sum(
              [agent.fit for agent in pride if agent.group == 2]
          )
          third_group = np.sum(
              [agent.fit for agent in pride if agent.group == 3]
          )
  
          prey = np.mean(
              [agent.position for agent in pride if agent.group == 0],
              axis=0,
          )
  
          groups_idx = (
              np.argsort([first_group, second_group, third_group]) + 1
          )
          center = groups_idx[0]
          left = groups_idx[1]
          right = groups_idx[2]
  
          for agent in pride:
              if agent.group == center:
                  for j in range(agent.n_variables):
                      if agent.position[j] < prey[j]:
                          # Updates its position (eq. 5 - top)
                          agent.position[
                              j
                          ] = r.generate_uniform_random_number(
                              agent.position[j], prey[j]
                          )
                      else:
                          # Updates its position (eq. 5 - bottom)
                          agent.position[
                              j
                          ] = r.generate_uniform_random_number(
                              prey[j], agent.position[j]
                          )
  
              if agent.group in [left, right]:
                  for j in range(agent.n_variables):
                      encircling = 2 * prey[j] - agent.position[j]
  
                      if encircling < prey[j]:
                          # Updates its position (eq. 4 - top)
                          agent.position[
                              j
                          ] = r.generate_uniform_random_number(
                              encircling, prey[j]
                          )
                      else:
                          # Updates its position (eq. 4 - bottom)
                          agent.position[
                              j
                          ] = r.generate_uniform_random_number(
                              prey[j], encircling
                          )
  
              agent.clip_by_bound()
  
              agent.p_fit = copy.deepcopy(agent.fit)
              agent.fit = function(agent.position)
              if agent.fit < agent.p_fit:
                  agent.best_position = copy.deepcopy(agent.position)
  
                  p_improvement = agent.fit / agent.p_fit
  
                  r1 = r.generate_uniform_random_number()
                  prey += r1 * p_improvement * (prey - agent.position)
  
imports: import copy
  import itertools
  from typing import Any, Dict, List, Optional, Tuple, Union
  import numpy
  import opytimizer.math.distribution
  import opytimizer.math.general
  import opytimizer.math.random
  import opytimizer.utils.constant
  import opytimizer.utils.exception
  from opytimizer.core import Agent, Optimizer
  from opytimizer.core.function import Function
  from opytimizer.core.space import Space
  from opytimizer.utils import logging
label_desc: Use image node_id 19 for calling the LOA obj's underlying member method code with example usage: obj._hunting(prides, function) without return types