Skip to content

lara-montano/sboa-optimizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Success-Based Optimization Algorithm (SBOA)

Reference Python implementation of the Success-Based Optimization Algorithm (SBOA), a population-based metaheuristic inspired by success attribution theory. The search is guided by two influence sub-populations: spA (the three best solutions, exploitation) and spB (a binary-tournament sub-population, exploration). A probabilistic criterion (Cp1, Cp2) selects which sub-population influences each candidate at every iteration.

Reference

If you use this code, please cite:

Lara-Montaño, O.D., Gómez-Castro, F.I., Gutiérrez-Antonio, C., Dragoi, E.N. (2025). Success-Based Optimization Algorithm (SBOA): Development and enhancement of a metaheuristic optimizer. Computers and Chemical Engineering, 194, 108987. https://doi.org/10.1016/j.compchemeng.2024.108987

Installation

pip install -r requirements.txt

Requires Python 3.10+.

Usage

import numpy as np
from sboa import sboa

def sphere(x):
    return float(np.sum(x ** 2))

best_pos, best_score, history = sboa(
    sphere, lb=-5.12, ub=5.12, dim=30,
    pop_size=50, max_iter=1000, seed=42,
)
print(best_score)

Signature

best_pos, best_score, history = sboa(fobj, lb, ub, dim,
                                     pop_size=50, max_iter=1000,
                                     Cp1=0.9, Cp2=0.55, seed=None)
  • fobj — objective function to minimize: takes a length-dim vector, returns a scalar.
  • lb, ub — lower/upper bounds (scalar or length-dim array).
  • dim — number of decision variables.
  • pop_size (n), max_iter (N) — population size and iteration budget.
  • Cp1, Cp2 — probability criteria. Defaults are the paper's tuned values (Table 3).
  • Returns the best position, its objective value, and the per-iteration convergence curve.

Benchmark

benchmark.py compares SBOA against PSO, DE and GWO on five classic test functions, reporting mean ± std over independent runs, the Wilcoxon signed-rank test (SBOA vs. each competitor), and per-run compute time. It also saves a convergence plot (convergencia.png).

python3 benchmark.py

This is a lightweight benchmark (dim=30, pop=30, 500 iterations, 15 runs) for quick verification. It does not reproduce the paper's experimental protocol (CEC 2017, pop=100, N = 10000·m/n). Results are illustrative, not the published benchmark.

Implementation notes

Two points in the paper leave room for interpretation; this implementation resolves them as follows:

  1. spB size. The paper's final version (Fig. 1) builds spB by binary tournament. Here spB has the same size as the population (pop_size tournament winners). The earlier ranking-based definition described in Section 3.3 is not used.
  2. Second probability test (r ≤ Cp2). Drawn independently from the first (r ≤ Cp1). With a shared draw and Cp2 < Cp1, the first spB strategy could never trigger.

If your original implementation differs on either point, adjust sboa.py accordingly.

Files

  • sboa.py — standalone SBOA implementation.
  • benchmark.py — comparison against PSO, DE, GWO with statistics and timing.
  • requirements.txt — pinned dependencies.

License

Released under the MIT License. See LICENSE.

About

Reference Python implementation of the Success-Based Optimization Algorithm (SBOA), a metaheuristic optimizer (Lara-Montaño et al., 2025, Comput. Chem. Eng.).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages