The Artificial Gorilla Troops Optimizer (GTO) is a metaheuristic optimization algorithm inspired by the social behavior and foraging strategies of gorilla troops. It mimics the hierarchical structure and cooperative dynamics of gorillas, where a dominant "Silverback" leads the troop, and individuals engage in exploration and exploitation phases to find optimal solutions in the search space.
GTO operates through a population-based approach with the following key phases:
-
Initialization: A population of gorillas (candidate solutions) is randomly initialized within the problem bounds. The best individual is identified as the Silverback.
-
Exploration Phase: Gorillas explore the search space using three strategies:
- R1: Random migration to new positions.
- R2: Movement towards other gorillas with adaptive perturbations.
- R3: Collective movement based on differences between gorillas.
-
Exploitation Phase: Gorillas exploit promising areas using two strategies:
- R4: Following the Silverback with power-law based movements.
- R5: Co-existence strategy balancing between following the Silverback and maintaining diversity.
-
Group Formation: After each phase, the algorithm updates the population and Silverback based on fitness evaluations.
The algorithm uses control parameters like p (exploration probability), beta, and w to balance exploration and exploitation, with adaptive parameters F, C, and L that change over iterations.
The project can be built using CMake for the full project or Make for individual implementations.
mkdir build
cd build
cmake ..
makeAlternatively, build each implementation separately:
make -C serial
make -C parallel/mpi_island
make -C parallel/mpi_master_slave
make -C parallel/hybrid_island
make -C parallel/hybrid_master_slaveExecutables will be built in the bin/ directory.
To reproduce the benchmarks, use the benchmark.sh script. This script submits jobs to a PBS/Torque scheduler for running the GTO implementations with various configurations.
-p project: Filter by project name (e.g.,serial,mpi_island,mpi_master_slave,hybrid_island,hybrid_master_slave)-s: Skip existing runs (checks forexec_timings*files)-d: Dry run mode (prints commands without executing)
Example usage:
./benchmark.sh -p serial -d # Dry run for serial implementation
./benchmark.sh -s # Run all, skipping existingThe script runs benchmarks for population sizes 256, 512, 1024 with various processor configurations and topologies.
Use check_status.sh to monitor benchmark progress. It checks for missing runs, errors, and missing timing files.
-p project: Filter by project name (same as benchmark.sh)
Example:
./check_status.sh -p mpi_islandColors indicate status:
- Yellow: Missing run
- Red: Error in run
- Cyan: Missing timings
Benchmark results are saved in the output/ directories under each project folder (e.g., serial/output/run_pop256/).
To analyze performance and generate plots, run the analysis script:
python3 results/analyze_performance.pyThis generates performance comparisons, scalability plots, and data files in results/output/plots/ and results/output/data/.
This model is focused on improving solution quality by maintaining diversity through independent search and periodic, controlled migration.
| Component | GTO Role | Implementation Steps | Migration Policy |
|---|---|---|---|
| Island (Processor |
Independent GTO Troop | 1. Creates an independent sub-population ( |
Frequency: Typically every |
| Communication Layer | Migration Coordination |
Emigration: Selects a migrant(s) (e.g., the |
Selection (Emigration): Choose the |
| Synchronization | Information Exchange | Immigration: Receives migrant(s) from neighbors and integrates them into the local troop's population. | Topology: Ring, Star, or Fully Connected (defines who receives from whom). |
| Population Update | Diversity Injection | None (Migration is separate from GTO updates). |
Integration (Immigration): |
This is the fastest model for convergence, focusing on distributing computation (updates and fitness) across slaves while centralizing the population and
| Phase | Master Rank (0) Action | Slave Ranks (1 to P-1) Action | Communication Type & Timing |
|---|---|---|---|
| Pre-Loop | Initializes total population ( |
None | Initialization |
| Loop Start |
1. Distribution (Scatter): Sends subset of gorilla positions ( |
2. Receive: Gets |
Master |
| Slave Computation | 3. Wait/Synchronize. |
4. Compute Full GTO Logic: Executes both Exploration and Exploitation phases using the received |
Local Computation |
| Return Results |
5. Wait/Receive (Gather): Blocks until all slaves send back their final |
6. Send: Returns the final |
Slaves |
| Post-Loop |
7. Update Global Silverback: Aggregates all |
Loops back to Step 1 (Receive). | Centralized Update |