# islam4562/the-main-characteristics-of-swarm-intelligence architecture

> Architecture diagram of the GitHub repository islam4562/the-main-characteristics-of-swarm-intelligence, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/islam4562/the-main-characteristics-of-swarm-intelligence
- Repository: https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence

## Overview

This repository is a collection of runnable swarm-intelligence examples, not a shared application. The principal workflow is to run an example, let its agents or optimizer perform repeated local decisions and updates, then inspect an optimized result or visualization. The README also presents five SI characteristics; the corresponding ant-colony examples illustrate those ideas, while bee search, particle-swarm tuning, and Q-learning broaden the demonstrations. Source excerpts support the shown algorithm and output links; the unsampled ACO hyperparameter script is included as a documented capability, with its CSV input indicated by its source code.

Main entry points: [`ACO Hyperparameter/aco_hyperaram.py`](https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/ACO%20Hyperparameter/aco_hyperaram.py) (ACO Hyperparameter Search), [`Bee Algorithm/bee_alg.py`](https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/Bee%20Algorithm/bee_alg.py) (Bee Algorithm), [`self_organization.py`](https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/self_organization.py) (Self Organization), [`PSO Metro/pso_metro.py`](https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/PSO%20Metro/pso_metro.py) (Metro Route ACO)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_si_concepts["SI Characteristics"]
  node_emergence["Emergent Behavior"]
  node_organization["Self Organization"]
  node_adaptation["Adaptation<br/>[adaptation.py]"]
  node_decentralized["Decentralized Control"]
  node_scalability["Scalability<br/>[scalability.py]"]
  node_emergence_view["Pheromone Plot"]
  node_learning_view["Training Plots"]
  node_adaptation_view["Pheromone Plot<br/>[adaptation.py]"]
  node_decentralized_view["Pheromone Plot"]
  node_scalability_view["Colony Plot<br/>[scalability.py]"]
end

subgraph group_ant_algorithms["Ant Colony Examples"]
  node_metro_aco["Metro Route ACO<br/>[pso_metro.py]"]
  node_metro_animation["Animated Route ACO"]
  node_aco_tuning["ACO Hyperparameter Search<br/>[aco_hyperaram.py]"]
  node_hyper_data["Hyperparameter Data"]
end

subgraph group_swarm_optimizers["Swarm Optimizers"]
  node_bee_search["Bee Algorithm<br/>[bee_alg.py]"]
  node_bee_data["Bee Data<br/>[ba_data.csv]"]
  node_fish_pso["Fish PSO Tuning<br/>[pso_fish.py]"]
end

subgraph group_learning_examples["Learning Examples"]
  node_q_environment["Grid Environment"]
  node_q_learning["Q Learning"]
end

node_engineer(("Engineer"))

node_engineer -->|"runs example"| node_emergence
node_engineer -->|"runs example"| node_organization
node_engineer -->|"runs example"| node_adaptation
node_engineer -->|"runs example"| node_decentralized
node_engineer -->|"runs example"| node_scalability
node_engineer -->|"runs example"| node_metro_aco
node_engineer -->|"runs example"| node_metro_animation
node_engineer -->|"runs example"| node_aco_tuning
node_engineer -->|"runs example"| node_bee_search
node_engineer -->|"runs example"| node_fish_pso
node_emergence -->|"plots pheromones"| node_emergence_view
node_organization -->|"steps environment"| node_q_environment
node_q_learning -->|"chooses actions"| node_q_environment
node_organization -->|"plots rewards"| node_learning_view
node_adaptation -->|"plots pheromones"| node_adaptation_view
node_decentralized -->|"plots pheromones"| node_decentralized_view
node_scalability -->|"plots colony"| node_scalability_view
node_metro_aco -->|"updates pheromones"| node_metro_aco
node_metro_animation -->|"animates routes"| node_metro_animation
node_aco_tuning -->|"reads data"| node_hyper_data
node_aco_tuning -->|"evaluates candidates"| node_aco_tuning
node_bee_search -->|"reads data"| node_bee_data
node_bee_search -->|"ranks solutions"| node_bee_search
node_fish_pso -->|"evaluates particles"| node_fish_pso

click node_emergence "https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/emerging_behavior.py"
click node_organization "https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/self_organization.py"
click node_adaptation "https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/adaptation.py"
click node_decentralized "https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/decentralized_management.py"
click node_scalability "https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/scalability.py"
click node_emergence_view "https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/emerging_behavior.py"
click node_learning_view "https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/self_organization.py"
click node_adaptation_view "https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/adaptation.py"
click node_decentralized_view "https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/decentralized_management.py"
click node_scalability_view "https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/scalability.py"
click node_metro_aco "https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/PSO%20Metro/pso_metro.py"
click node_metro_animation "https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/PSO%20Metro/pso_metro_animation.py"
click node_aco_tuning "https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/ACO%20Hyperparameter/aco_hyperaram.py"
click node_hyper_data "https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/ACO%20Hyperparameter/hyperparameter_data.csv"
click node_bee_search "https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/Bee%20Algorithm/bee_alg.py"
click node_bee_data "https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/Bee%20Algorithm/ba_data.csv"
click node_fish_pso "https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/PSO%20example%20fish/pso_fish.py"
click node_q_environment "https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/self_organization.py"
click node_q_learning "https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/self_organization.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_emergence,node_organization,node_adaptation,node_decentralized,node_scalability,node_emergence_view,node_learning_view,node_adaptation_view,node_decentralized_view,node_scalability_view toneBlue
class node_metro_aco,node_metro_animation,node_aco_tuning,node_hyper_data toneAmber
class node_bee_search,node_bee_data,node_fish_pso toneMint
class node_q_environment,node_q_learning toneRose
class node_engineer toneIndigo
```

## Components

### SI Characteristics

- [Emergent Behavior](https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/emerging_behavior.py): `emerging_behavior.py`
- [Self Organization](https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/self_organization.py): `self_organization.py`
- [Adaptation](https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/adaptation.py): `adaptation.py`
- [Decentralized Control](https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/decentralized_management.py): `decentralized_management.py`
- [Scalability](https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/scalability.py): `scalability.py`
- [Pheromone Plot](https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/emerging_behavior.py): `emerging_behavior.py`
- [Training Plots](https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/self_organization.py): `self_organization.py`
- [Pheromone Plot](https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/adaptation.py): `adaptation.py`
- [Pheromone Plot](https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/decentralized_management.py): `decentralized_management.py`
- [Colony Plot](https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/scalability.py): `scalability.py`

### Ant Colony Examples

- [Metro Route ACO](https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/PSO%20Metro/pso_metro.py): `PSO Metro/pso_metro.py`
- [Animated Route ACO](https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/PSO%20Metro/pso_metro_animation.py): `PSO Metro/pso_metro_animation.py`
- [ACO Hyperparameter Search](https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/ACO%20Hyperparameter/aco_hyperaram.py): `ACO Hyperparameter/aco_hyperaram.py`
- [Hyperparameter Data](https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/ACO%20Hyperparameter/hyperparameter_data.csv): `ACO Hyperparameter/hyperparameter_data.csv`

### Swarm Optimizers

- [Bee Algorithm](https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/Bee%20Algorithm/bee_alg.py): `Bee Algorithm/bee_alg.py`
- [Bee Data](https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/Bee%20Algorithm/ba_data.csv): `Bee Algorithm/ba_data.csv`
- [Fish PSO Tuning](https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/PSO%20example%20fish/pso_fish.py): `PSO example fish/pso_fish.py`

### Learning Examples

- [Grid Environment](https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/self_organization.py): `self_organization.py`
- [Q Learning](https://github.com/islam4562/the-main-characteristics-of-swarm-intelligence/blob/main/self_organization.py): `self_organization.py`

### Other components

- **Engineer**

## Connections

- Engineer → Emergent Behavior: runs example
- Engineer → Self Organization: runs example
- Engineer → Adaptation: runs example
- Engineer → Decentralized Control: runs example
- Engineer → Scalability: runs example
- Engineer → Metro Route ACO: runs example
- Engineer → Animated Route ACO: runs example
- Engineer → ACO Hyperparameter Search: runs example
- Engineer → Bee Algorithm: runs example
- Engineer → Fish PSO Tuning: runs example
- Emergent Behavior → Pheromone Plot: plots pheromones
- Self Organization → Grid Environment: steps environment
- Q Learning → Grid Environment: chooses actions
- Self Organization → Training Plots: plots rewards
- Adaptation → Pheromone Plot: plots pheromones
- Decentralized Control → Pheromone Plot: plots pheromones
- Scalability → Colony Plot: plots colony
- Metro Route ACO → Metro Route ACO: updates pheromones
- Animated Route ACO → Animated Route ACO: animates routes
- ACO Hyperparameter Search → Hyperparameter Data: reads data
- ACO Hyperparameter Search → ACO Hyperparameter Search: evaluates candidates
- Bee Algorithm → Bee Data: reads data
- Bee Algorithm → Bee Algorithm: ranks solutions
- Fish PSO Tuning → Fish PSO Tuning: evaluates particles
