@@ -105,6 +105,8 @@ A paper introducing jMetalPy is available at: https://doi.org/10.1016/j.swevo.20
105105### Table of Contents
106106- [Installation](#installation)
107107- [Usage](#hello-world-)
108+ - [Hyperparameter Tuning](#hyperparameter-tuning-)
109+ - [Agents](#agents)
108110- [Features](#features)
109111- [Changelog](#changelog)
110112- [License](#license)
@@ -193,6 +195,128 @@ plot_front.plot(front, label='NSGAII-ZDT1', filename='NSGAII-ZDT1', format='png'
193195
194196<img src=docs/source/_static/NSGAII-ZDT1.png width=450 alt="Pareto front approximation">
195197
198+ ## Hyperparameter Tuning 🎛️
199+
200+ jMetalPy includes an Optuna-based hyperparameter tuning system that allows you to automatically find optimal algorithm configurations.
201+
202+ ### Quick Start
203+
204+ ```python
205+ from jmetal.tuning import tune
206+
207+ # Basic tuning with default settings
208+ result = tune("NSGAII", n_trials=50)
209+ print(f"Best parameters: {result.best_params}")
210+ ```
211+
212+ ### Using YAML Configuration Files
213+
214+ The recommended way to configure tuning experiments is through YAML files:
215+
216+ ```bash
217+ # Run with a configuration file
218+ python -m jmetal.tuning.cli.sequential --config examples/tuning/configs/default.yaml
219+
220+ # Override specific settings via CLI
221+ python -m jmetal.tuning.cli.sequential --config examples/tuning/configs/quick_demo.yaml --trials 30
222+ ```
223+
224+ ### Example YAML Configurations
225+
226+ **Quick Demo** (`examples/tuning/configs/quick_demo.yaml`):
227+ ```yaml
228+ algorithm: NSGAII
229+ n_trials: 20
230+ n_evaluations: 5000
231+
232+ problems:
233+ - name: ZDT1
234+ reference_front: ZDT1.pf
235+ - name: ZDT2
236+ reference_front: ZDT2.pf
237+ ```
238+
239+ **SBX-Only Configuration** (`examples/tuning/configs/sbx_only.yaml`):
240+ ```yaml
241+ algorithm: NSGAII
242+ n_trials: 100
243+ n_evaluations: 10000
244+
245+ parameter_space:
246+ offspring_population_size:
247+ values: [50, 100, 150, 200]
248+
249+ crossover:
250+ type: sbx # Only explore SBX crossover
251+ probability: {min: 0.8, max: 1.0}
252+ distribution_index: {min: 5.0, max: 100.0}
253+
254+ mutation:
255+ type: polynomial # Only explore polynomial mutation
256+ probability_factor: {min: 0.5, max: 2.0}
257+ distribution_index: {min: 5.0, max: 100.0}
258+ ```
259+
260+ **Narrow Search Space** (`examples/tuning/configs/narrow_search.yaml`):
261+ ```yaml
262+ algorithm: NSGAII
263+ n_trials: 50
264+
265+ parameter_space:
266+ crossover:
267+ probability: {min: 0.9, max: 1.0}
268+ distribution_index: {min: 10.0, max: 30.0}
269+ mutation:
270+ probability_factor: {min: 0.8, max: 1.2}
271+ ```
272+
273+ ### Parallel Tuning
274+
275+ For large-scale tuning experiments, use parallel execution with PostgreSQL:
276+
277+ ```bash
278+ # Launch 4 parallel workers
279+ python -m jmetal.tuning.cli.parallel --config examples/tuning/configs/default.yaml --workers 4
280+
281+ # With progress observer
282+ python -m jmetal.tuning.cli.parallel --config my_config.yaml --workers 8 --observer progress
283+ ```
284+
285+ ### Programmatic Usage with Custom Config
286+
287+ ```python
288+ from jmetal.tuning import tune, TuningConfig
289+
290+ # Load configuration from YAML
291+ config = TuningConfig.from_yaml("my_config.yaml")
292+
293+ # Run tuning with config
294+ result = tune(
295+ algorithm=config.algorithm,
296+ problems=config.get_problems_as_tuples(),
297+ n_trials=config.n_trials,
298+ n_evaluations=config.n_evaluations,
299+ parameter_space=config.parameter_space,
300+ )
301+
302+ print(f"Best score: {result.best_score}")
303+ print(f"Best params: {result.best_params}")
304+ ```
305+
306+ ## Agents
307+
308+ If you use AI assistants (e.g., Copilot, Codex) while working on this project, please follow the guidelines in [AGENTS.md](AGENTS.md).
309+
310+ ### Available Example Configurations
311+
312+ | File | Description |
313+ |------|-------------|
314+ | `default.yaml` | Standard ZDT benchmark with 100 trials |
315+ | `quick_demo.yaml` | Fast demo with 20 trials, 2 problems |
316+ | `sbx_only.yaml` | SBX crossover + polynomial mutation only |
317+ | `narrow_search.yaml` | Narrow parameter ranges for fine-tuning |
318+ | `dtlz_3obj.yaml` | DTLZ problems with 3 objectives |
319+
196320## Features
197321The current release of jMetalPy (v1.9.0) contains the following components:
198322
0 commit comments