An experimental Bachelor's Thesis (TFG) in Computer Science at the Facultat d'Informàtica de Barcelona (FIB - UPC).
This framework formalizes and implements a Generalized
The framework natively co-evolves 6 decision variable domains alongside their respective strategy parameters within a unified genome representation:
| Variable Type | Domain | Strategy Parameter | Mutation Operator | Mathematical Dynamics |
|---|---|---|---|---|
| Real ( |
Gaussian | Specular reflection: |
||
| Count ( |
Symmetric Skellam | Difference of Poissons: |
||
| Binary ( |
Bit-Flip (XOR) | Guided by Bernoulli( |
||
| Categorical ( |
Modular Jump | Jump offset: |
||
| Fuzzy ( |
Dual Gaussian Reflection | Perturb |
||
| Circular ( |
Modular Skellam | Ring offset: |
Global & Coordinate Learning Rates:
Log-Normal Scale Adaptation (
Logit-Normal Probability Adaptation (
The project is fully managed with uv for fast, reproducible, and lockfile-pinned builds.
# Windows (PowerShell)
irm https://astral.sh/uv/install.ps1 | iex
# Linux / macOS
curl -LsSf https://astral.sh/uv/install.sh | shFrom the project root:
uv syncThis single command automatically resolves Python 3.12, creates .venv, installs all dependencies (numpy, matplotlib, cma, cmaes, scipy, pandas, pymoo, pytest, ipykernel), and registers the console scripts es-model and generalized-es.
Execute commands from the project root using uv run:
uv run es-model
# or: uv run generalized-esLaunches an interactive terminal menu with options:
model: Runs the Generalized ES optimization loop on the default mixed configuration.benchmarks: Evaluates baseline optimizers (Isotropic ES, sep-CMA-ES, Standard CMA-ES).smoke: Fast sanity verification with minimal budget (dim=5,evals=200).all: Executesmodelfollowed bybenchmarks.
# Fast smoke validation
uv run es-model smoke
# Model execution with custom generations and logging frequency
uv run es-model model --generations 200 --log-interval 20
# Run continuous benchmarks (dim=20, 50,000 evaluations across 5 seeds)
uv run es-model benchmarks --dim 20 --max-evals 50000 --seeds 5In-depth empirical notebooks are available under experiments/:
experiment_1.ipynb: Equal-budget continuous benchmark comparisons against CMA-ES and Isotropic ES.experiment_2.ipynb: Target Shift (TS) tracking and mutation self-adaptation across all 6 variable types in isolation.experiment_3.ipynb: Simultaneous co-evolution across all 6 variable types on synthetic heterogeneous landscapes (Sphere, Coupled, Rastrigin, Multiplicative), including 4-way baseline comparisons against Uniform Random Search, Continuous Relaxation CMA-ES with rounding, and State-of-the-Art CatCMA with Margin (CatCMAwM, 2025).
To launch a Jupyter session:
uv run jupyter labExecute the test suite with pytest:
uv run pytestExecute the paired two-sided Wilcoxon signed-rank tests with Holm-Bonferroni correction (
# Experiment 3: Evaluate against external baselines (Random Search, CMA-ES, CatCMAwM)
uv run python experiments/experiment_3/runners/run_experiment_3.py --load-precomputed
# Experiment 1: Evaluate against canonical continuous baselines
uv run python experiments/experiment_1/runners/run_experiment_1.pyFor detailed architectural specifications, execution flowcharts, candidate genome diagrams, the full directory structure, and the complete module dependency matrix, see:
👉 Architecture & Technical Documentation
This project is licensed under the MIT License - see the LICENSE file for details.