AGENT SKILL

operators-and-variables

Customize pymoo variables, sampling, crossover, mutation, repair, initialization, duplicate elimination, and mixed-variable search workflows.

License 许可
Apache-2.0
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
operators-and-variables
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Customize pymoo variables, sampling, crossover, mutation, repair, initialization, duplicate elimination, and mixed-variable search workflows.
disable-model-invocation
true

02 资源文件 4

03 SKILL.md 正文

operators-and-variables

Use this sub-skill when a task asks how to customize pymoo's search space or evolutionary operators: real/integer/binary/choice variables, mixed-variable problems, permutation or discrete encodings, sampling, crossover, mutation, repair, selection/survival, duplicate elimination, initial populations, or algorithm hyperparameter helper APIs.

Route first

  • Objective/constraint _evaluate shapes, G <= 0, bounds warnings, or built-in test problems belong to problem-modeling.
  • Running minimize, choosing termination, callbacks, direct stepping, or interpreting Result belongs to optimization-workflows.
  • Parallel evaluation, optional joblib/dask/ray, compiled-extension checks, and resource controls belong to performance-and-parallelization.
  • Hypervolume, IGD/GD, MCDM, reference directions, decomposition, or plots belong to analysis-and-visualization.
  • Stay here for how candidate values are represented and transformed during initialization and variation.

Fast operating checklist

  1. Match the encoding to the variables: ordinary real-valued algorithms use float arrays; mixed-variable workflows use vars={...} with Real, Integer, Binary, and Choice objects plus MixedVariableGA or compatible mixed-variable mating.
  2. Repair integer/discrete values after float variation: SBX/PM can produce floats unless you use integer-aware variables, RoundingRepair, or custom repair.
  3. Respect operator shapes: Sampling._do returns (n_samples, n_var) or an object-compatible list/matrix; Crossover._do receives (n_parents, n_matings, n_var) and returns (n_offsprings, n_matings, n_var); Mutation._do returns mutated X rows.
  4. Keep object encodings explicit: for strings, lists, routes, subsets, or dictionaries, use dtype=object, custom duplicate elimination, and problem-specific sampling/crossover/mutation.
  5. Initialize deliberately: pass sampling operators, initial arrays, or evaluated populations when the starting design matters.
  6. Use repair for feasibility-preserving encodings: bounds repair, rounding, or domain-specific repair can outperform penalty-only constraint handling.
  7. Treat optional helper integrations as optional: optuna and comocma are optional extras; do not assume them in a base pymoo environment.

Open the bundled references

  • Operator API reference: variable classes, operator base contracts, common import paths, and shape conventions.
  • Variable and operator workflows: mixed-variable GA, integer repair, custom object/string operators, initial populations, duplicate elimination, and hyperparameter helper recipes.
  • Troubleshooting: fixes for float integers, object dtype mistakes, crossover/mutation shape errors, duplicate handling, invalid initial populations, and missing optional extras.

Bundled script

  • scripts/mixed_variable_smoke.py: safe CPU-only smoke that solves a tiny Real/Integer/Binary/Choice problem with MixedVariableGA and asserts valid result types.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351