{
 "id": "epf094rnkz",
 "slug": "honey-badger-algorithm",
 "title": "Honey badger algorithm",
 "updated": "2026-10-15",
 "topic_path": [
  {
   "id": "technology",
   "label": "Technology and the built world",
   "api_url": "https://www.edgepedia.org/api/v1/topics/technology"
  },
  {
   "id": "technology.computing",
   "label": "Computing and digital systems",
   "api_url": "https://www.edgepedia.org/api/v1/topics/technology.computing"
  },
  {
   "id": "technology.computing.ai",
   "label": "Artificial intelligence and data",
   "api_url": "https://www.edgepedia.org/api/v1/topics/technology.computing.ai"
  },
  {
   "id": "technology.computing.ai.algorithms",
   "label": "Algorithms and computational methods",
   "api_url": "https://www.edgepedia.org/api/v1/topics/technology.computing.ai.algorithms"
  },
  {
   "id": "technology.computing.ai.optimization_dp",
   "label": "Optimization and dynamic programming",
   "api_url": "https://www.edgepedia.org/api/v1/topics/technology.computing.ai.optimization_dp"
  },
  {
   "id": "technology.computing.ai.optimization_dp.swarm-intelligence-optimizers",
   "label": "Swarm intelligence optimizers",
   "api_url": "https://www.edgepedia.org/api/v1/topics/technology.computing.ai.optimization_dp.swarm-intelligence-optimizers"
  }
 ],
 "geo": [
  {
   "id": "geo.nongeo.t2021.technology.computing.ai",
   "label": "Non-geographic · 2021 and later: Artificial intelligence and data",
   "api_url": "https://www.edgepedia.org/api/v1/geo/geo.nongeo.t2021.technology.computing.ai",
   "path": [
    {
     "id": "geo.nongeo",
     "label": "Non-geographic",
     "api_url": "https://www.edgepedia.org/api/v1/geo/geo.nongeo"
    },
    {
     "id": "geo.nongeo.t2021",
     "label": "Non-geographic · 2021 and later",
     "api_url": "https://www.edgepedia.org/api/v1/geo/geo.nongeo.t2021"
    },
    {
     "id": "geo.nongeo.t2021.technology",
     "label": "Technology and the built world",
     "api_url": "https://www.edgepedia.org/api/v1/geo/geo.nongeo.t2021.technology"
    },
    {
     "id": "geo.nongeo.t2021.technology.computing",
     "label": "Computing and digital systems",
     "api_url": "https://www.edgepedia.org/api/v1/geo/geo.nongeo.t2021.technology.computing"
    },
    {
     "id": "geo.nongeo.t2021.technology.computing.ai",
     "label": "Artificial intelligence and data",
     "api_url": "https://www.edgepedia.org/api/v1/geo/geo.nongeo.t2021.technology.computing.ai"
    }
   ]
  }
 ],
 "excerpt": "The honey badger algorithm (HBA) is a nature-inspired metaheuristic for numerical optimization that mimics honey badger foraging, introduced by Fatma A. Hashim and colleagues in 2021.",
 "snippet": "The honey badger algorithm (HBA) is a nature-inspired metaheuristic for numerical optimization that mimics honey badger foraging, introduced by Fatma A. Hashim and colleagues in 2021.",
 "node": "technology.computing.ai.optimization_dp.swarm-intelligence-optimizers",
 "markdown": "# Honey badger algorithm\n\nThe honey badger algorithm (HBA) is a nature-inspired metaheuristic that mimics the foraging behavior of honey badgers to search for the optimum of a numerical optimization problem, returning the best solution position and its objective value found over a run. It belongs to the family of swarm-based, metaphor-driven algorithms and was formulated so that two foraging behaviors, digging and honey finding, map onto exploration and exploitation phases.\n\n| Key fact | Detail |\n|---|---|\n| Introduced by | Fatma A. Hashim and colleagues, Mathematics and Computers in Simulation, 2021/2022 <sup>[1](https://doi.org/10.1016/j.matcom.2021.08.013)</sup> |\n| Problem class | Continuous numerical (global) optimization; binary and multi-objective variants exist <sup>[2](https://dergipark.org.tr/tr/pub/ogummf/article/1477088)</sup> |\n| Core parameters | \\( \\beta = 6 \\) (food-getting ability) and \\( C = 2 \\) (density constant), from sensitivity analysis <sup>[3](https://www.nature.com/articles/s41598-023-43622-9)</sup> |\n| Density factor | \\( \\alpha = C \\times \\exp(-t/t_{\\max}) \\), decreasing from \\( C \\) toward 0 over the run <sup>[4](https://ideas.repec.org/a/eee/matcom/v192y2022icp84-110.html)</sup> |\n| Original evaluation | 24 benchmark functions, the CEC'17 test suite, and four engineering design problems against ten algorithms <sup>[4](https://ideas.repec.org/a/eee/matcom/v192y2022icp84-110.html)</sup> |\n| Official code | Public MATLAB implementation on MATLAB Central File Exchange <sup>[5](https://www.mathworks.com/matlabcentral/fileexchange/98204-honey-badger-algorithm)</sup> |\n| Known weaknesses | Premature convergence, trapping in local optima, slow late-stage search <sup>[6](https://www.mdpi.com/2313-7673/10/2/92)</sup> |\n\n## How it works\n\nHBA maintains a population of \\( N \\) candidate solutions, each called a honey badger, and repeatedly moves them toward the best position found so far, called the prey position \\( x_{\\text{prey}} \\). The metaphor distinguishes two foraging modes: digging for prey, which models exploration, and following the honey guide bird to a beehive, which models exploitation.<sup>[4](https://ideas.repec.org/a/eee/matcom/v192y2022icp84-110.html)</sup>\n\nThree control quantities shape the search.<sup>[4](https://ideas.repec.org/a/eee/matcom/v192y2022icp84-110.html)</sup> The intensity \\( I \\) is computed from the source strength \\( S \\) at the prey location and the distance \\( d_{i} \\) between the prey and the \\( i \\)-th badger.<sup>[4](https://ideas.repec.org/a/eee/matcom/v192y2022icp84-110.html)</sup> The density factor \\( \\alpha = C \\times \\exp(-t/t_{\\max}) \\) decreases with the iteration count \\( t \\), reducing randomization over time and smoothing the transition from exploration to exploitation; \\( C \\) is a constant at least 1 with default 2.<sup>[4](https://ideas.repec.org/a/eee/matcom/v192y2022icp84-110.html)</sup><sup> • </sup><sup>[3](https://www.nature.com/articles/s41598-023-43622-9)</sup> A flag \\( F \\), set to 1 when a random number \\( r_{6} \\leq 0.5 \\) and to \\( -1 \\) otherwise, flips the search direction to help escape local optima.<sup>[4](https://ideas.repec.org/a/eee/matcom/v192y2022icp84-110.html)</sup>\n\nIn the digging phase, the position update follows a cardioid-like motion:\n\n\\[ x_{\\text{new}} = x_{\\text{prey}} + F \\times \\beta \\times I \\times x_{\\text{prey}} + F \\times r_{3} \\times \\alpha \\times d_{i} \\times \\left| \\cos(2\\pi r_{4}) \\times \\left[ 1 - \\cos(2\\pi r_{5}) \\right] \\right| \\]\n\nwhere \\( \\beta \\geq 1 \\) (default 6) is the badger's ability to get food and \\( r_{3}, r_{4}, r_{5} \\) are random numbers between 0 and 1.<sup>[4](https://ideas.repec.org/a/eee/matcom/v192y2022icp84-110.html)</sup><sup> • </sup><sup>[3](https://www.nature.com/articles/s41598-023-43622-9)</sup> In the honey phase the update is a simpler guided move:\n\n\\[ x_{\\text{new}} = x_{\\text{prey}} + F \\times r_{7} \\times \\alpha \\times d_{i} \\]\n\nwith \\( r_{7} \\) random between 0 and 1.<sup>[4](https://ideas.repec.org/a/eee/matcom/v192y2022icp84-110.html)</sup>\n\n## How it is done\n\nA practitioner runs the following loop <sup>[4](https://ideas.repec.org/a/eee/matcom/v192y2022icp84-110.html)</sup><sup> • </sup><sup>[3](https://www.nature.com/articles/s41598-023-43622-9)</sup>:\n\n1. Initialize \\( N \\) badger positions uniformly between the bounds, \\( x_{i} = lb_{i} + r_{1} \\times (ub_{i} - lb_{i}) \\), with \\( r_{1} \\) random in \\( [0,1] \\).\n2. Evaluate each position and set \\( x_{\\text{prey}} \\) to the best one.\n3. At each iteration \\( t \\), compute \\( \\alpha = C \\times \\exp(-t/t_{\\max}) \\), the intensities \\( I \\), and the flags \\( F \\).\n4. For each badger, apply the digging equation or the honey equation, and evaluate the new position.\n5. Update \\( x_{\\text{prey}} \\) and repeat until \\( t_{\\max} \\) iterations or another stopping criterion is reached.\n\nThe two user-defined parameters \\( \\beta \\) and \\( C \\) strongly affect performance; the introducing paper's sensitivity analysis on CEC Composition Function 2 found the best fitness at \\( \\beta = 6 \\) and \\( C = 2 \\), and later applications adopt these values.<sup>[4](https://ideas.repec.org/a/eee/matcom/v192y2022icp84-110.html)</sup><sup> • </sup><sup>[3](https://www.nature.com/articles/s41598-023-43622-9)</sup> The authors' official MATLAB implementation is publicly available.<sup>[5](https://www.mathworks.com/matlabcentral/fileexchange/98204-honey-badger-algorithm)</sup>\n\n## Origin\n\nHBA was reported by Fatma A. Hashim and colleagues in \"Honey Badger Algorithm: New metaheuristic algorithm for solving optimization problems\", published in [Mathematics](https://www.edgepedia.org/mathematics) and Computers in [Simulation](https://www.edgepedia.org/simulation) in 2021, with the journal volume 192, pages 84 to 110, appearing in 2022.<sup>[1](https://doi.org/10.1016/j.matcom.2021.08.013)</sup><sup> • </sup><sup>[4](https://ideas.repec.org/a/eee/matcom/v192y2022icp84-110.html)</sup><sup> • </sup><sup>[7](https://portal.mardi4nfdi.de/wiki/Publication:2666510)</sup> The paper evaluated the algorithm on 24 standard benchmark functions, the CEC'17 test suite, and four engineering design problems, comparing it with ten well-known metaheuristics including SA, PSO, CMA-ES, L-SHADE, MFO, EHO, WOA, GOA, TEO, and HHO, and reported superiority in convergence speed and exploration-exploitation balance relative to those methods.<sup>[4](https://ideas.repec.org/a/eee/matcom/v192y2022icp84-110.html)</sup>\n\n## Variants\n\nA survey meta-analysis counts 52 studies presenting improved HBAs, 20 hybrid HBA studies, and 101 applications of the original algorithm.<sup>[8](https://doi.org/10.1016/j.fraope.2024.100141)</sup> Named variants modify different stages:\n\n- **GOHBA** replaces the initialization with Tent chaotic mapping, substitutes the density factor, and adds a golden sine strategy; it achieved the optimal mean value on 14 of 23 tested functions and on two real-world engineering design problems.<sup>[6](https://www.mdpi.com/2313-7673/10/2/92)</sup>\n- **MSHBA** adds Cubic chaotic mapping initialization, a random search strategy, elite tangential search, and differential mutation; it excelled on 26 of 29 IEEE CEC 2017 benchmark functions and was applied to four engineering design problems.<sup>[9](https://www.mdpi.com/2313-7673/10/9/581)</sup>\n- **IMOHBA** extends HBA to multi-objective problems with a dynamic archive of Pareto solutions, crowding-distance and roulette leader selection, and a modified mutualism phase from the Symbiotic Organisms Search algorithm; it was tested on CEC2009 functions and engineering problems.<sup>[10](https://link.springer.com/article/10.1007/s11227-025-07177-y)</sup>\n- **BinHBA** converts the continuous algorithm to a binary one using S-shaped transfer functions, including time-varying variants, plus uniform crossover, tested on 27 knapsack problems.<sup>[2](https://dergipark.org.tr/tr/pub/ogummf/article/1477088)</sup>\n- A 2024 quantum HBA combines dynamic opposite learning, Laplace crossover, and differential mutation for fuzzy front-end product design.<sup>[11](https://pmc.ncbi.nlm.nih.gov/articles/PMC11154476/)</sup>\n- **EHBA** adds [Lévy flight](https://www.edgepedia.org/levy-flight) and refraction opposition-based learning, validated on 18 benchmark functions and the IEEE CEC2017 suite <sup>[12](https://sage.cnpereading.com/doi/10.3233/JIFS-213206)</sup>, and another improved HBA was compared with seven metaheuristics on 10 functions and 5 engineering problems using Wilcoxon rank-sum, Friedman, and Mann-Whitney U tests.<sup>[13](https://www.techscience.com/cmc/v76n2/53990)</sup>\n\n## Applications\n\nPublished applications span several domains. In power systems, HBA has been used for reliability-constrained dynamic generation expansion planning.<sup>[3](https://www.nature.com/articles/s41598-023-43622-9)</sup> In machine learning, a multi-objective HBA hybridized with NSGA-II and a kernel extreme learning machine was applied to wrapper-based feature selection on eighteen benchmark datasets.<sup>[14](https://ijeecs.iaescore.com/index.php/IJEECS/article/download/35684/18660)</sup> In medical imaging, an improved HBA was applied to multi-level thresholding segmentation of brain tumor MRI images.<sup>[15](https://link.springer.com/article/10.1007/s10586-024-04525-0)</sup> Engineering design problems, including constrained structural designs, appear in both the original evaluation and many variant papers.<sup>[4](https://ideas.repec.org/a/eee/matcom/v192y2022icp84-110.html)</sup><sup> • </sup><sup>[9](https://www.mdpi.com/2313-7673/10/9/581)</sup>\n\n## Limitations and alternatives\n\nLater authors identify concrete weaknesses of the base algorithm. The density factor starts at C and decreases exponentially toward 0, an approach that can cause premature convergence to local optima, especially on complex high-dimensional problems.<sup>[6](https://www.mdpi.com/2313-7673/10/2/92)</sup> Other reported issues are slow search performance in late stages and a tendency to become trapped in local optima <sup>[9](https://www.mdpi.com/2313-7673/10/9/581)</sup>, low convergence accuracy, and insufficient global optimization ability on high-dimensional complex problems, with one multi-strategy variant reporting 88% performance optimization over the original HBA <sup>[16](https://www.ecice06.com/EN/10.19678/j.issn.1000-3428.0066465)</sup>, and difficulties with exploitation and convergence speed.<sup>[15](https://link.springer.com/article/10.1007/s10586-024-04525-0)</sup>\n\nThe original paper's comparison set includes PSO, CMA-ES, L-SHADE, WOA, HHO, and six other algorithms <sup>[4](https://ideas.repec.org/a/eee/matcom/v192y2022icp84-110.html)</sup>.\n\nHBA also sits inside a broader controversy about metaphor-driven metaheuristics. Kenneth Sörensen described a \"tsunami\" of novel metaphor-based methods and criticized the field's metaphor-driven notion of novelty.<sup>[17](https://onlinelibrary.wiley.com/doi/10.1111/itor.12001)</sup> A 2021 critique in Swarm Intelligence argued that metaphor-based metaheuristics often repackage known concepts under new terminology, and that biased \"apples to oranges\" comparisons against outdated algorithms give a false picture of performance.<sup>[18](https://link.springer.com/article/10.1007/s11721-021-00202-9)</sup> An analysis of six such algorithms, including gray wolf, moth-flame, whale, firefly, bat, and antlion, found that none proposes a single new idea, with most using particle swarm optimization concepts.<sup>[19](https://iridia.ulb.ac.be/~ccamacho/publications/ITOR-Exposing.pdf)</sup> These critiques address the general class and other named algorithms; no published study specifically demonstrates that HBA is a repackaging of an existing method, so its independent novelty remains an open question.\n\n## References\n\n1. [Fatma A. Hashim and colleagues (2021). Honey Badger Algorithm: New metaheuristic algorithm for solving optimization problems. Mathematics and Computers in Simulation.](https://doi.org/10.1016/j.matcom.2021.08.013)\n2. [Binary Honey Badger Algorithm enhanced with time-varying sigmoid transfer function and crossover strategy (BinHBA)](https://dergipark.org.tr/tr/pub/ogummf/article/1477088)\n3. [Reliability constrained dynamic generation expansion planning using honey badger algorithm (Scientific Reports, 2023)](https://www.nature.com/articles/s41598-023-43622-9)\n4. [Honey Badger Algorithm: New metaheuristic algorithm for solving optimization problems (Mathematics and Computers in Simulation, vol. 192)](https://ideas.repec.org/a/eee/matcom/v192y2022icp84-110.html)\n5. [Honey Badger Algorithm - File Exchange - MATLAB Central](https://www.mathworks.com/matlabcentral/fileexchange/98204-honey-badger-algorithm)\n6. [GOHBA: Improved Honey Badger Algorithm for Global Optimization (MDPI Biomimetics, 2025)](https://www.mdpi.com/2313-7673/10/2/92)\n7. [MaRDI portal record for the HBA paper](https://portal.mardi4nfdi.de/wiki/Publication:2666510)\n8. [A comprehensive survey of honey badger optimization algorithm and meta-analysis of its variants and applications](https://doi.org/10.1016/j.fraope.2024.100141)\n9. [Multi-Strategy Honey Badger Algorithm for Global Optimization (MDPI Biomimetics, 2025)](https://www.mdpi.com/2313-7673/10/9/581)\n10. [An improved multi-objective honey badger algorithm based on global searching strategy (IMOHBA, Journal of Supercomputing)](https://link.springer.com/article/10.1007/s11227-025-07177-y)\n11. [Differential Mutation Incorporated Quantum Honey Badger Algorithm with Dynamic Opposite Learning and Laplace Crossover for Fuzzy Front-End Product Design (2024)](https://pmc.ncbi.nlm.nih.gov/articles/PMC11154476/)\n12. [An enhanced honey badger algorithm based on Lévy flight and refraction opposition-based learning for engineering design problems (Journal of Intelligent & Fuzzy Systems)](https://sage.cnpereading.com/doi/10.3233/JIFS-213206)\n13. [An Improved Honey Badger Algorithm through Fusing Multi-Strategies (IHBA, CMC)](https://www.techscience.com/cmc/v76n2/53990)\n14. [Multi-objective HBA combined with NSGA-II for wrapper-based feature selection (MOHBNSGA2, IJEECS)](https://ijeecs.iaescore.com/index.php/IJEECS/article/download/35684/18660)\n15. [An improved honey badger algorithm for global optimization and multilevel thresholding segmentation: real case with brain tumor images (Cluster Computing, 2024)](https://link.springer.com/article/10.1007/s10586-024-04525-0)\n16. [Improved Honey Badger Algorithm Based on Multi-Strategy and Its Applications](https://www.ecice06.com/EN/10.19678/j.issn.1000-3428.0066465)\n17. [Metaheuristics, the metaphor exposed (Sörensen, International Transactions in Operational Research)](https://onlinelibrary.wiley.com/doi/10.1111/itor.12001)\n18. [Metaphor-based metaheuristics, a call for action: the elephant in the room (Swarm Intelligence)](https://link.springer.com/article/10.1007/s11721-021-00202-9)\n19. [Exposing the grey wolf, moth-flame, whale, firefly, bat, and antlion algorithms: six misleading optimization techniques inspired by bestial metaphors (author's copy)](https://iridia.ulb.ac.be/~ccamacho/publications/ITOR-Exposing.pdf)\n\n---\n*Topic: Encyclopedia › Technology and the built world › Computing and digital systems › Artificial intelligence and data › Algorithms and computational methods › Optimization and dynamic programming › Swarm intelligence optimizers*\n\n*Initially written Sep 29, 2026 · Reviewed: Sep 30, 2026 · Edited: Sep 30, 2026; Oct 15, 2026 · Last review: Sep 30, 2026*\n\n*Copyright 2026 EdgeChat AI, a subsidiary of Biostate AI.*\n\nLicense: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license\n",
 "same_as": [],
 "url": "https://www.edgepedia.org/honey-badger-algorithm",
 "markdown_url": "https://www.edgepedia.org/honey-badger-algorithm.md",
 "license": {
  "name": "Edgepedia Community License 1.0",
  "url": "https://www.edgepedia.org/edgepedia/license",
  "summary": "Free with credit, commercial use included. AI training is open to everyone. For other uses, organizations over USD 100M in revenue or 100M monthly users license separately.",
  "spdx": "LicenseRef-Edgepedia-Community-1.0"
 },
 "credit": "\"Honey badger algorithm\", Edgepedia (EdgeChat), https://www.edgepedia.org/honey-badger-algorithm. Edgepedia Community License 1.0.",
 "credit_md": "\"[Honey badger algorithm](https://www.edgepedia.org/honey-badger-algorithm)\", Edgepedia (EdgeChat), [https://www.edgepedia.org/honey-badger-algorithm](https://www.edgepedia.org/honey-badger-algorithm). [Edgepedia Community License 1.0](https://www.edgepedia.org/edgepedia/license).",
 "credit_html": "\"<a href=\"https://www.edgepedia.org/honey-badger-algorithm\">Honey badger algorithm</a>\", Edgepedia (EdgeChat), <a href=\"https://www.edgepedia.org/honey-badger-algorithm\">https://www.edgepedia.org/honey-badger-algorithm</a>. <a href=\"https://www.edgepedia.org/edgepedia/license\">Edgepedia Community License 1.0</a>.",
 "speakable": "The honey badger algorithm is a nature-inspired metaheuristic for numerical optimization that mimics honey badger foraging, introduced by Fatma A. Hashim and colleagues in 2021."
}
