class_docstr: An HHO class, inherited from Optimizer.
  
  This is the designed class to define HHO-related
  variables and methods.
  
  References:
      A. Heidari et al. Harris hawks optimization: Algorithm and applications.
      Future Generation Computer Systems (2019).
docstr: Performs the exploration phase.
  
  Args:
      agents: List of agents.
      current_agent: Current agent to be updated (or not).
      best_agent: Best population's agent.
  
  Returns:
      (np.ndarray): A location vector containing the updated position.
docstr_tok: ["Performs","the","exploration","phase",".","Args",":","agents",":","List","of","agents",".","current_agent",":","Current","agent","to","be","updated","(","or","not",")",".","best_agent",":","Best","population","'s","agent",".","Returns",":","(","np.ndarray",")",":","A","location","vector","containing","the","updated","position","."]
code: def _exploration_phase(
      self, agents: List[Agent], current_agent: Agent, best_agent: Agent
  ) -> np.ndarray:
      """Performs the exploration phase.
  
      Args:
          agents: List of agents.
          current_agent: Current agent to be updated (or not).
          best_agent: Best population's agent.
  
      Returns:
          (np.ndarray): A location vector containing the updated position.
  
      """
  
      q = r.generate_uniform_random_number()
      if q >= 0.5:
          j = r.generate_integer_random_number(0, len(agents))
  
          r1 = r.generate_uniform_random_number()
          r2 = r.generate_uniform_random_number()
  
          # Updates the location vector (eq. 1 - part 1)
          location_vector = agents[j].position - r1 * np.fabs(
              agents[j].position - 2 * r2 * current_agent.position
          )
      else:
          average = np.mean(
              [agent.position for agent in agents], axis=0
          )
  
          r3 = r.generate_uniform_random_number()
          r4 = r.generate_uniform_random_number()
  
          lb = np.expand_dims(current_agent.lb, -1)
          ub = np.expand_dims(current_agent.ub, -1)
  
          # Updates the location vector (eq. 1 - part 2)
          location_vector = (best_agent.position - average) - r3 * (
              lb + r4 * (ub - lb)
          )
  
      return location_vector
  
file_path: opytimizer/opytimizer/optimizers/population/hho.py
imports: from typing import Any, Dict, List, Optional, Tuple
  import numpy
  import opytimizer.math.distribution
  import opytimizer.math.random
  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 3 for calling the HHO obj's underlying member method code with example usage: obj._exploration_phase(agents, current_agent, best_agent) and returns: location_vector