L’interface est localisée ; les présentations et documents des Skills sont traduits automatiquement par IA dans votre langue. Le code, les commandes, chemins et termes techniques restent en version originale, et le document de l’auteur fait foi.
Explorer les Skills
Design et création · SKILL.md

pygad

pygad

Route PyGAD genetic-algorithm optimization, benchmarks, visualization/reporting, and neural-model weight workflows.

Independent GitHub snapshot · Automated classification · Original documentation governs

Documentation de la Skill

GitHub

name: pygad description: "Route PyGAD genetic-algorithm optimization, benchmarks, visualization/reporting, and neural-model weight workflows." metadata: disco-role: operating disable-model-invocation: true license: BSD 3-Clause

PyGAD repo skill

Use this repo skill when a task involves PyGAD, the Python genetic-algorithm package from GeneticAlgorithmPython: creating or tuning pygad.GA runs, solving single- or multi-objective optimization problems, using bundled benchmark problems, plotting/reporting completed runs, or optimizing neural-network weights through PyGAD helpers.

First checks

Install the core package when PyGAD is not already available:

python -m pip install pygad

Then verify the import in the same environment that will run the optimization:

import pygad
print(pygad.__version__)

Core PyGAD usage needs numpy and cloudpickle. Optional plotting/reporting and deep-learning integrations need extra dependencies; see references/installation.md before installing heavy extras.

Route by task

If the user asks for...Read this sub-skill
Build or debug a pygad.GA fitness function, population, genes, operators, callbacks, stop criteria, save/load, single-objective optimization, or NSGA-II/NSGA-III custom multi-objective runsub-skills/genetic-algorithm/SKILL.md
Use built-in benchmark classes (Sphere, ZDT, DTLZ, Knapsack, TSP) or quality indicators (hypervolume, IGD, GD, spacing)sub-skills/benchmarks/SKILL.md
Summarize, plot, export PNGs, handle headless matplotlib, configure logging, or generate a PDF report from a completed GA runsub-skills/results-and-visuals/SKILL.md
Optimize dense NN/CNN/Keras/PyTorch model weights with PyGAD (pygad.nn, gann, cnn, gacnn, kerasga, torchga)sub-skills/neural-networks/SKILL.md

Root references and scripts

Operating priorities

  1. Keep PyGAD's maximization convention explicit. Convert losses/minimization objectives to higher-is-better fitness before constructing pygad.GA.
  2. Validate shapes early. Most failures are inconsistent initial_population, num_genes, gene_space, custom operators, batch fitness returns, or model-weight vector restoration.
  3. Start with tiny deterministic runs. Use random_seed, small populations, and short generation counts before scaling to expensive objective functions.
  4. Install only needed extras. Plot/report dependencies and deep-learning frameworks are optional. Do not install TensorFlow/PyTorch unless the user's workflow requires them.
  5. Use bundled references/scripts instead of the original checkout. This skill is self-contained; runtime guidance should not depend on reopening repository examples or docs.

Handoff notes

  • If the user is asking to perform a new downstream optimization experiment, load the relevant sub-skill in Researcher mode and execute the experiment there.
  • If source APIs or docs changed after the provenance commit, refresh this repo skill before relying on old defaults.
  • If a task depends on external services such as Vilvik cloud export, confirm credentials, service intent, and dependency installation separately; the safe default is local PyGAD execution only.
Skills enregistrées