Skip to content

Presets

The 34 preset builders backing every built-in algorithm class (sezgi.presets.X(pop_size, budget, ...), one per crates/components/src/presets.rs builder). Every built-in class in Built-in algorithm classes delegates to exactly one (or, for GeneticAlgorithm/DifferentialEvolution, one of several) of these -- this page is the compat-internals view of the same catalog. Rendered from the native sezgi._sezgi.preset_* functions directly (the wrapping _preset() closure in sezgi/__init__.py only rescues __doc__/__name__/signature via functools.wraps; the docstring itself lives on the native function).

presets.de_rand_1 builtin

preset_de_rand_1(pop_size, budget)

sezgi.presets.de_rand_1(pop_size, budget) -- DE/rand/1/bin (Storn & Price 1997), the classic Differential Evolution mutation/crossover: gen/de (strategy="rand1", f=0.5, cr=0.9) paired with replace/one-to-one-greedy. pop_size is the caller's choice (no canonical value from a single source).

presets.de_best_1 builtin

preset_de_best_1(pop_size, budget)

sezgi.presets.de_best_1(pop_size, budget) -- DE/best/1/bin: same shape as preset_de_rand_1, but the mutation base vector is the current best individual (strategy="best1", f=0.5, cr=0.9) instead of a random one -- more exploitative, faster convergence at the cost of diversity.

presets.jde builtin

preset_jde(pop_size, budget)

sezgi.presets.jde(pop_size, budget) -- self-adaptive jDE (Brest, Greiner, Boskovic, Mernik & Zumer 2006): gen/de-jde (F self-adapts per individual in [0.1, 0.9], CR self-adapts, both with adaptation rate tau1=tau2=0.1) paired with replace/one-to-one-greedy and adapter/jde-commit (persists each individual's own adapted F/CR across generations). No fixed F/CR to tune, unlike de_rand_1/de_best_1.

presets.shade builtin

preset_shade(pop_size, budget)

sezgi.presets.shade(pop_size, budget) -- SHADE (Success-History-based Adaptive DE, Tanabe & Fukunaga 2013): gen/de-shade (h=6, p=0.11) paired with replace/shade and adapter/shade-history. pop_size is the caller's choice (no canonical value from a single source).

presets.lshade builtin

preset_lshade(dim, budget)

sezgi.presets.lshade(dim, budget) -- L-SHADE (Linear-population-size- reduction SHADE, Tanabe & Fukunaga 2014): same gen/de-shade + replace/shade as shade, plus adapter/shade-lshade for the linear population shrink. Takes dim, not pop_size: the initial population is DERIVED as 18*dim (this preset's own formula), not a free parameter.

presets.ga_real builtin

preset_ga_real(pop_size, budget)

sezgi.presets.ga_real(pop_size, budget) -- real-coded Genetic Algorithm: gen/ga-real (tournament_k=2, SBX crossover pc=0.9 eta_c=15.0, polynomial mutation eta_m=20.0) paired with replace/mu-plus-lambda. pop_size is the caller's choice (no canonical value from a single source). One of the 5 representations GeneticAlgorithm auto-dispatches to for an all-Float space.

presets.pso builtin

preset_pso(pop_size, budget)

sezgi.presets.pso(pop_size, budget) -- Particle Swarm Optimization (Clerc & Kennedy constriction variant, spec name "pso/clerc-kennedy"): gen/pso (w=0.7298, c1=c2=1.49618) paired with replace/pso-commit. pop_size is the swarm size (caller's choice, no canonical value from a single source).

presets.gwo builtin

preset_gwo(pop_size, budget)

sezgi.presets.gwo(pop_size, budget) -- Grey Wolf Optimizer (Mirjalili, Mirjalili & Lewis 2014): gen/gwo paired with replace/generational (non-elitist by construction). pop_size is the pack size; canonical is 30 per the source paper.

presets.woa builtin

preset_woa(pop_size, budget)

sezgi.presets.woa(pop_size, budget) -- Whale Optimization Algorithm (Mirjalili & Lewis 2016): gen/woa paired with replace/generational. pop_size is the school size; canonical is 30 per the source paper.

preset_harmony_search(pop_size, budget)

sezgi.presets.harmony_search(pop_size, budget) -- Harmony Search (Geem, Kim & Loganathan 2001): gen/hs paired with replace/worst-if-better. pop_size is HMS (Harmony Memory Size); canonical is 30 per the source paper.

preset_cuckoo_search(pop_size, budget)

sezgi.presets.cuckoo_search(pop_size, budget) -- Cuckoo Search (Yang & Deb 2009): gen/cuckoo_levy paired with replace/one-to-one-greedy and adapter/abandon-worst-fraction (pa=0.25). pop_size is the nest count; canonical is 25 per the source paper.

presets.goa builtin

preset_goa(pop_size, budget)

sezgi.presets.goa(pop_size, budget) -- Grasshopper Optimisation Algorithm (Saremi, Mirjalili & Lewis 2017): gen/goa paired with replace/generational. pop_size is the swarm size; canonical is 30 per the source paper.

presets.sca builtin

preset_sca(pop_size, budget)

sezgi.presets.sca(pop_size, budget) -- Sine Cosine Algorithm (Mirjalili 2016): gen/sca paired with replace/generational. pop_size is the number of search agents; canonical is 30 per the source paper.

presets.jaya builtin

preset_jaya(pop_size, budget)

sezgi.presets.jaya(pop_size, budget) -- JAYA (Rao 2016): gen/jaya paired with replace/one-to-one-greedy. pop_size is the candidate count; canonical is 30 per this crate's own convention (the paper itself demonstrates with 5).

presets.mfo builtin

preset_mfo(pop_size, budget)

sezgi.presets.mfo(pop_size, budget) -- Moth-Flame Optimization (Mirjalili 2015): gen/mfo paired with replace/generational and adapter/mfo-flame-update (the flame memory). pop_size is the number of search agents; canonical is 30 per the source paper.

presets.ssa builtin

preset_ssa(pop_size, budget)

sezgi.presets.ssa(pop_size, budget) -- Salp Swarm Algorithm (Mirjalili et al. 2017): gen/ssa paired with replace/generational. pop_size is the number of salps; canonical is 30 per the source paper.

presets.firefly builtin

preset_firefly(pop_size, budget)

sezgi.presets.firefly(pop_size, budget) -- Firefly Algorithm (Yang, X.-S., Nature-Inspired Metaheuristic Algorithms, 2nd ed., Luniver Press, 2010): gen/fa paired with replace/generational. pop_size is the number of fireflies; canonical is 25 per this crate's own convention (the source's own demo uses 20).

presets.bat builtin

preset_bat(pop_size, budget)

sezgi.presets.bat(pop_size, budget) -- Bat Algorithm (Yang, X.-S. 2010, NICSO): gen/ba paired with replace/bat-loudness-greedy. pop_size is the number of bats; canonical is 30 per this crate's own convention (the source's own demo uses 20).

presets.fpa builtin

preset_fpa(pop_size, budget)

sezgi.presets.fpa(pop_size, budget) -- Flower Pollination Algorithm (Yang, X.-S. 2012, UCNC): gen/fpa paired with replace/one-to-one-greedy. pop_size is the flower/pollen-gamete count; canonical is 25 per the source's demo.

presets.tlbo builtin

preset_tlbo(pop_size, budget)

sezgi.presets.tlbo(pop_size, budget) -- Teaching-Learning-Based Optimization (Rao, Savsani & Vakharia 2011): a multi-stage preset, gen/tlbo-teacher then gen/tlbo-learner, each paired with replace/one-to-one-greedy. pop_size is the class size; canonical is 30 per the source paper. A full generation costs 2*pop_size evaluations.

presets.hho builtin

preset_hho(pop_size, budget)

sezgi.presets.hho(pop_size, budget) -- Harris Hawks Optimization (Heidari, Mirjalili, Faris, Aljarah, Mafarja & Chen 2019): gen/hho paired with replace/generational. pop_size is the hawk count; canonical is 30 per the source's own demo.

presets.alo builtin

preset_alo(pop_size, budget)

sezgi.presets.alo(pop_size, budget) -- Ant Lion Optimizer (Mirjalili 2015): gen/alo paired with replace/mu-plus-lambda. pop_size is the ant/antlion count; canonical is 25 per this crate's own convention.

presets.abc builtin

preset_abc(pop_size, budget)

sezgi.presets.abc(pop_size, budget) -- Artificial Bee Colony (Karaboga 2005, TR-06 / Karaboga & Basturk 2007): gen/abc-employed paired with replace/abc-trial-greedy and adapter/abc-onlooker-scout. pop_size IS SN (the food-source count), NOT Karaboga's colony size NP=2*SN; canonical is 20 per this crate's own resolved convention. A full cycle costs 2*pop_size evaluations (+1 when a scout fires).

presets.gsa builtin

preset_gsa(pop_size, budget)

sezgi.presets.gsa(pop_size, budget) -- Gravitational Search Algorithm (Rashedi, Nezamabadi-pour & Saryazdi 2009): gen/gsa paired with replace/generational. pop_size is the agent count; canonical is 30 per this crate's own convention.

presets.sa builtin

preset_sa(budget)

sezgi.presets.sa(budget) -- Simulated Annealing (Metropolis acceptance, geometric cooling t0=1.0, alpha=0.999): gen/step (gaussian, sigma=0.5) paired with replace/metropolis. Single-trajectory: this preset has NO pop_size parameter -- its own population is fixed at 1 internally.

preset_random_search(pop_size, budget)

sezgi.presets.random_search(pop_size, budget) -- uniform random resampling: gen/uniform-resample paired with replace/mu-plus-lambda -- the baseline every other algorithm in this crate should beat. pop_size is the caller's choice (no canonical value from a single source).

presets.nelder_mead builtin

preset_nelder_mead(dim, budget)

sezgi.presets.nelder_mead(dim, budget) -- Nelder-Mead simplex (M2b Task 13): gen/nelder-mead paired with replace/nelder-mead. Takes dim, not pop_size: the population is DERIVED as dim+1 (the population IS the simplex), not a free parameter.

presets.cmaes builtin

preset_cmaes(pop_size, budget)

sezgi.presets.cmaes(pop_size, budget) -- (mu/mu_w,lambda)-CMA-ES (Hansen's tutorial form, positive-weights variant): gen/cma paired with replace/cma-update. pop_size is lambda; Hansen's own guideline is 4+floor(3*ln(dim)) (see cmaes_ipop, which computes this automatically) -- this preset leaves the choice to the caller.

presets.cmaes_ipop builtin

preset_cmaes_ipop(dim, budget)

sezgi.presets.cmaes_ipop(dim, budget) -- CMA-ES with IPOP-style stagnation restarts (M2b Task 12): same gen/cma + replace/cma-update stage as cmaes, plus restart/stagnation (patience=2000, sizing=ipop, factor=2.0, max_pop=512). Takes dim, not pop_size: the starting population is DERIVED as 4+floor(3*ln(dim)) (Hansen's default, computed here since IPOP restarts scale from it), not a free parameter.

presets.es_mu_plus_lambda builtin

preset_es_mu_plus_lambda(pop_size, budget, dist='gaussian', mean=0.0, sigma=0.5, loc=0.0, scale=1.0, alpha=1.5, nu=3.0)

sezgi.presets.es_mu_plus_lambda(pop_size, budget, dist="gaussian", ...) -- (mu+lambda)-Evolution Strategy: gen/step over a caller-selected mutation distribution paired with replace/mu-plus-lambda. dist selects the distribution ("gaussian" (default) | "cauchy" | "levy" | "student_t" | "laplace" | "uniform"), each consuming a subset of the remaining keyword parameters: mean=/sigma= for gaussian, loc=/scale= for cauchy/laplace, alpha= for levy, nu= for student_t (uniform takes none). pop_size is the caller's choice (no canonical value from a single source).

Errors

ValueError for an unrecognized dist.

presets.ga_perm builtin

preset_ga_perm(pop_size, budget)

sezgi.presets.ga_perm(pop_size, budget) (M3-3 Task 4) -- Permutation GA, validated on TSP instances: mirrors ga_real's own preset structure (init + boundary + one stage pairing a fused crossover+mutation generator with replace/mu-plus-lambda), swapped to the Permutation representation -- init/perm-random (Fisher-Yates) and gen/ga-perm (fused OX-crossover + swap-mutation, tournament_k=2, pc=0.8) in place of ga_real's init/uniform and gen/ga-real. One of the 5 representations GeneticAlgorithm auto-dispatches to for an all-Permutation space (see crates/components/src/presets.rs for the full rationale, including why boundary/clamp is reused as a documented no-op here).

presets.ga_bin builtin

preset_ga_bin(pop_size, budget)

sezgi.presets.ga_bin(pop_size, budget) (M3-8 Task 9) -- mirrors preset_ga_perm's own shape; pairs with sezgi.problems.onemax(...).

presets.ga_int builtin

preset_ga_int(pop_size, budget)

sezgi.presets.ga_int(pop_size, budget) (M3-8 Task 9) -- pairs with sezgi.problems.int_quadratic(...).

presets.ga_cat builtin

preset_ga_cat(pop_size, budget)

sezgi.presets.ga_cat(pop_size, budget) (M3-8 Task 9) -- pairs with sezgi.problems.cat_match(...).