Swarm Seek
Literature-validated Artificial Bee Colony (ABC) optimization for Python.
Swarm Seek implements Original ABC and principal peer-reviewed variants (GABC, qABC, MABC, CABC) with a NumPy core, optional Numba/JAX backends, an ask/tell API, scikit-learn / Optuna adapters, and automated checks against published benchmark figures.
Status: 0.2.0 (beta). Docs: https://swarm-seek.readthedocs.io/
Install
Requires Python 3.10+.
pip install swarm-seek
Optional extras:
pip install 'swarm-seek[numba]' # Numba backend
pip install 'swarm-seek[jax]' # JAX backend
pip install 'swarm-seek[sklearn]' # ABCSearchCV
pip install 'swarm-seek[optuna]' # ABCSampler
Editable install for development:
pip install -e ".[dev]"
Quick start
from swarm_seek import ABC, ContinuousSpace
from swarm_seek.benchmarks import sphere
space = ContinuousSpace([(-5.0, 5.0)] * 5)
colony = ABC(space, variant="original", pop_size=20, limit=100, max_evals=5_000, seed=0)
best = colony.minimize(sphere)
print(best.fitness)
Ask/tell loop:
import numpy as np
from swarm_seek import ABC, ContinuousSpace
from swarm_seek.benchmarks import sphere
space = ContinuousSpace([(-5.0, 5.0)] * 5)
colony = ABC(space, variant="gabc", pop_size=20, limit=100, max_evals=5_000, seed=0)
while not colony.converged:
candidates = colony.ask()
if candidates.size == 0:
colony.tell([])
continue
colony.tell(np.asarray(sphere(candidates), dtype=np.float64))
print(colony.best.fitness)
Combinatorial ABC (permutation / TSP-style):
from swarm_seek import ABC, PermutationSpace
from swarm_seek.benchmarks import random_cities, tour_length
cities = random_cities(12, seed=0)
space = PermutationSpace(12)
best = ABC(space, variant="cabc", pop_size=16, max_evals=2_000, seed=0).minimize(
lambda x: tour_length(x, cities)
)
print(best.fitness)
Runnable notebooks with stated pass criteria live in examples/.
Backend timing: python scripts/compare_backends.py.
Full documentation builds from docs/source/.
License
Apache License 2.0. See LICENSE.
Citation
See CITATION.cff for citation metadata. Archive / DOI:
10.5281/zenodo.21630532
(concept; version v0.1.1 is
10.5281/zenodo.21630533).
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file swarm_seek-0.2.0.tar.gz.
File metadata
- Download URL: swarm_seek-0.2.0.tar.gz
- Upload date:
- Size: 39.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28b89f367e098f7800a2f6386a261f7b930809be52b3bab3d7fa4ae3466de423
|
|
| MD5 |
1aa426a94d6d4819e0abe1964ef5a3d7
|
|
| BLAKE2b-256 |
e219465f0378e2261d1ed0be87351965c96f477f7e60463e7d3318eb91b919dc
|
Provenance
The following attestation bundles were made for swarm_seek-0.2.0.tar.gz:
Publisher:
release.yml on tjkessler/swarm-seek
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
swarm_seek-0.2.0.tar.gz -
Subject digest:
28b89f367e098f7800a2f6386a261f7b930809be52b3bab3d7fa4ae3466de423 - Sigstore transparency entry: 2260788894
- Sigstore integration time:
-
Permalink:
tjkessler/swarm-seek@3f29cc55697227a92449aca0210948ebc6f32868 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/tjkessler
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3f29cc55697227a92449aca0210948ebc6f32868 -
Trigger Event:
release
-
Statement type:
File details
Details for the file swarm_seek-0.2.0-py3-none-any.whl.
File metadata
- Download URL: swarm_seek-0.2.0-py3-none-any.whl
- Upload date:
- Size: 53.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee97963f81fa81e5c70bacb40a31a63fe6b82226bfe97d2518941b3987092f20
|
|
| MD5 |
fc31ed86a13de6912f9f30b13fe796c9
|
|
| BLAKE2b-256 |
deed4f82481bd4f5c5cd97fd8e7bf87be1944767b07bfae82417e8570cccb43a
|
Provenance
The following attestation bundles were made for swarm_seek-0.2.0-py3-none-any.whl:
Publisher:
release.yml on tjkessler/swarm-seek
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
swarm_seek-0.2.0-py3-none-any.whl -
Subject digest:
ee97963f81fa81e5c70bacb40a31a63fe6b82226bfe97d2518941b3987092f20 - Sigstore transparency entry: 2260789183
- Sigstore integration time:
-
Permalink:
tjkessler/swarm-seek@3f29cc55697227a92449aca0210948ebc6f32868 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/tjkessler
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3f29cc55697227a92449aca0210948ebc6f32868 -
Trigger Event:
release
-
Statement type: