Skip to content

Commit 26fa4c9

Browse files
committed
docs: fix PyPI image links and update installation guide
1 parent 515ed34 commit 26fa4c9

2 files changed

Lines changed: 14 additions & 27 deletions

File tree

README.md

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,62 +11,52 @@ Whether you are performing **Gradient-Free Neural Network Training** or **Automa
1111
The library is logically structured into 6 core categories, each reflecting a unique mathematical or biological inspiration. This organization allows researchers to easily compare different families of algorithms.
1212

1313
### 1. Swarm Intelligence (`swarmtorch.swarm`)
14-
1514
*The flagship category, modeling decentralized, self-organized collective behaviors.*
16-
1715
- **Top Algorithms:** PSO (Particle Swarm), GWO (Grey Wolf), HHO (Harris Hawks), SSA (Salp Swarm).
1816
- **Best For:** Global search in high-dimensional spaces.
1917

2018
### 2. Evolutionary Algorithms (`swarmtorch.evolutionary`)
21-
2219
*Based on the mechanisms of natural selection and biological evolution.*
23-
2420
- **Top Algorithms:** GA (Genetic Algorithm), DE (Differential Evolution), CEM (Cross-Entropy Method).
2521
- **Best For:** Robust, mutation-driven exploration.
2622

2723
### 3. Physics-Based (`swarmtorch.physics`)
28-
2924
*Algorithms derived from the fundamental laws of the physical world.*
30-
3125
- **Top Algorithms:** SA (Simulated Annealing), GSA (Gravitational Search), FPA (Flower Pollination).
3226
- **Best For:** Problems with well-defined energy or force landscapes.
3327

3428
### 4. Human-Based (`swarmtorch.human_based`)
35-
3629
*Simulates human social interactions, teaching, and learning processes.*
37-
3830
- **Top Algorithms:** TLBO (Teaching-Learning-Based), Harmony Search.
3931
- **Best For:** Knowledge-sharing-driven convergence.
4032

4133
### 5. Bio-Inspired (`swarmtorch.bio_inspired`)
42-
4334
*General biological models and life-cycle simulations.*
44-
4535
- **Top Algorithms:** ALO (Ant Lion), BBO (Biogeography-Based), MVO (Multi-Verse).
4636
- **Best For:** Specialized niche optimization tasks.
4737

4838
### 6. Hybrid Algorithms (`swarmtorch.hybrid`)
49-
5039
*Advanced optimizers that combine multiple strategies for superior convergence.*
51-
5240
- **Top Algorithms:** SMA (Slime Mold), Gorilla Optimizer, Cat Swarm.
5341
- **Best For:** Complex, multimodal surfaces where single-strategy algorithms might stall.
5442

5543
---
5644

5745
## 🚀 Installation & Integration
5846

59-
### Setup
47+
### Installation
6048

49+
**Using pip:**
6150
```bash
62-
# Clone and install as a development package
63-
git clone https://github.com/your-repo/swarmtorch.git
64-
cd swarmtorch
65-
pip install -e .
51+
pip install swarmtorch
6652
```
6753

68-
### 1. Model Weight Optimization (Gradient-Free)
54+
**Using uv (Recommended):**
55+
```bash
56+
uv add swarmtorch
57+
```
6958

59+
### 1. Model Weight Optimization (Gradient-Free)
7060
Train any PyTorch model without using `loss.backward()`. This is ideal for non-differentiable objectives or when exploring global landscapes.
7161

7262
```python
@@ -98,7 +88,6 @@ optimizer.step(closure)
9888
```
9989

10090
### 2. Hyperparameter Optimization (HPO)
101-
10291
Optimize architectural choices and training parameters (learning rates, layer sizes) using intelligent searchers instead of grid or random search.
10392

10493
```python
@@ -139,28 +128,28 @@ Our library has undergone a massive-scale rigorous evaluation of **118 algorithm
139128
### 1. Model Training Benchmarks (Weight Optimization)
140129
SwarmTorch enables the training of neural networks without gradients. Our tests on non-linear classification tasks show that several metaheuristics can achieve convergence comparable to standard gradient-based methods.
141130

142-
![Training Convergence](benchmarks/training_convergence.png)
131+
![Training Convergence](https://raw.githubusercontent.com/hallelx2/swarmtorch/master/benchmarks/training_convergence.png)
143132
*Figure 1: Convergence history comparing Swarm Optimizers (PSO, HHO, etc.) against Adam and SGD. Many swarm algorithms exhibit highly stable descent.*
144133

145-
![Top Training Optimizers](benchmarks/top_optimizers_training.png)
134+
![Top Training Optimizers](https://raw.githubusercontent.com/hallelx2/swarmtorch/master/benchmarks/top_optimizers_training.png)
146135
*Figure 2: The Top 25 most effective weight optimizers ranked by final loss. Hybrid and Swarm Intelligence algorithms show the strongest performance.*
147136

148137
### 2. High-Density Distribution Analysis
149138
We analyzed the reliability of each category. Swarm and Hybrid categories demonstrated the highest stability and lowest variance across multiple trials.
150139

151-
![Category Distribution](benchmarks/bench_category_dist.png)
140+
![Category Distribution](https://raw.githubusercontent.com/hallelx2/swarmtorch/master/benchmarks/bench_category_dist.png)
152141
*Figure 3: Statistical distribution of final loss across categories. Lower loss and tighter boxes indicate superior and more reliable optimization.*
153142

154143
### 3. Hyperparameter Optimization (HPO) Benchmarks
155144
Our metaheuristic searchers are designed to replace Random Search with more intelligent exploration strategies.
156145

157-
![HPO Success Rate](benchmarks/bench_success_rate.png)
146+
![HPO Success Rate](https://raw.githubusercontent.com/hallelx2/swarmtorch/master/benchmarks/bench_success_rate.png)
158147
*Figure 4: Success rate of metaheuristic searchers vs. the Random Search baseline. Over 94% of our algorithms outperformed Random Search.*
159148

160149
### 4. The "Generalist" Frontier
161150
By mapping Training Robustness against HPO Accuracy, we identified the most versatile algorithms in the library—those that excel in both weight optimization and hyperparameter tuning.
162151

163-
![Generalist Mapping](benchmarks/bench_generalist_map.png)
152+
![Generalist Mapping](https://raw.githubusercontent.com/hallelx2/swarmtorch/master/benchmarks/bench_generalist_map.png)
164153
*Figure 5: Scatter plot mapping Training Efficiency vs. HPO Accuracy. Elite generalist algorithms occupy the top-right quadrant.*
165154

166155
---
@@ -179,11 +168,9 @@ By mapping Training Robustness against HPO Accuracy, we identified the most vers
179168
---
180169

181170
## 🤝 Acknowledgments & References
182-
183171
This library was developed with reference to the **[pyMetaheuristic](https://github.com/mariosv/pyMetaheuristic)** library. We are grateful for their contributions to the metaheuristic optimization community, which served as a foundational resource for the algorithmic implementations in **SwarmTorch**.
184172

185173
## 📝 Citation
186-
187174
If you use **SwarmTorch** in your research, please cite it as follows:
188175

189176
```bibtex

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "swarmtorch"
3-
version = "0.1.1"
3+
version = "0.1.2"
44
description = "Professional PyTorch library for 120+ metaheuristic optimization algorithms (Swarm, Evolutionary, Physics, Hybrid)."
55
readme = "README.md"
66
requires-python = ">=3.10"

0 commit comments

Comments
 (0)