selection-and-replacement-strategies

selection-and-replacement-strategies is a skill for Claude Code from hajibabaie/combinatorial-optimization-skills. It costs 142 tokens per session (12,949 once invoked), scanned A, original, MIT.

A guide to choosing parents and replacing survivors in evolutionary algorithms, which improve a population of possible solutions over repeated generations. It explains methods such as tournaments, ranking, elitism, and steady-state replacement.

In plain words
What is it for?
Use it to implement or tune parent selection, survivor replacement, elitism, and population strategies for evolutionary optimization.
Why use it?
These choices control how quickly the search favors better solutions and how much variety remains in the population.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the combinatorial-optimization plugin — 76 skills shipped together

Good fit Use it to implement or tune parent selection, survivor replacement, elitism, and population strategies for evolutionary optimization.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hajibabaie/combinatorial-optimization-skills/selection-and-replacement-strategies
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add hajibabaie/combinatorial-optimization-skills --skill selection-and-replacement-strategies
Clone the repo
git clone --depth 1 https://github.com/hajibabaie/combinatorial-optimization-skills

Made for: Claude Code.

Or install combinatorial-optimization, the plugin that ships this one along with the rest of its 76 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for selection-and-replacement-strategies

README.md
[![agentmods](https://agentmods.dev/badge/skills/hajibabaie/combinatorial-optimization-skills/selection-and-replacement-strategies/github.svg)](https://agentmods.dev/skills/hajibabaie/combinatorial-optimization-skills/selection-and-replacement-strategies)
Your own site
<a href="https://agentmods.dev/skills/hajibabaie/combinatorial-optimization-skills/selection-and-replacement-strategies"><img src="https://agentmods.dev/badge/skills/hajibabaie/combinatorial-optimization-skills/selection-and-replacement-strategies/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for selection-and-replacement-strategies

Your own site · 80×15
<a href="https://agentmods.dev/skills/hajibabaie/combinatorial-optimization-skills/selection-and-replacement-strategies"><img src="https://agentmods.dev/badge/skills/hajibabaie/combinatorial-optimization-skills/selection-and-replacement-strategies.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 142 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 12,949 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00142 $0.12949
Opus 5 $0.00071 $0.06474
Sonnet 5 $0.00028 $0.02590
Haiku 4.5 $0.00014 $0.01295

Measured 7d ago against content hash a853ffc1177d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

selection-and-replacement-strategies scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/selection-and-replacement-strategies/SKILL.md · 770 lines

How it starts

The opening of the file, as written. The whole thing — 770 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Selection and Replacement Strategies

You are an expert in selection and replacement for evolutionary and population-based metaheuristics. This skill is the reference catalog: for every standard parent-selection scheme — tournament, fitness-proportionate (roulette), linear and exponential rank, stochastic universal sampling, Boltzmann — and every standard survivor strategy — generational, elitist, steady-state, (mu+lambda), (mu,lambda) — it gives when to use it, a numpy implementation, a complexity note, and the algorithms and problem settings it fits. Use the pressure framework below (selection intensity, takeover time) to set pressure deliberately instead of inheriting it by accident from a default operator, and use the measurement harness to verify the setting empirically.

Initial Assessment

Establish these facts before recommending or writing any selection code:

  • Maximize or minimize, and can fitness be negative or zero? Fitness-proportionate selection requires strictly positive values and is not invariant to shifting; a penalized objective that dips below zero rules it out unless you accept that the shift itself silently sets the pressure. Rank and tournament are immune.
  • Audit every place selection pressure enters. Parent selection, survivor selection, elitism, and duplicate handling all exert pressure, and their effects compound. Tournament k=3 parents feeding a replace-worst steady-state population is a very different machine from the same tournament feeding pure generational replacement.
  • Population size N and total evaluation budget. Convert the budget to generations G = budget / lambda, then compare against takeover time. If takeover is far below G, most of the run is post-convergence mutation hill-climbing; if it is far above G, the run never exploits.
  • Which algorithm consumes the operator? A canonical GA, a memetic algorithm with strong local search (tolerates and usually wants lower parent pressure), an EDA (wants truncation), an ES with self-adaptive parameters (requires comma replacement), or a multi-objective EA (selection ranks by dominance and crowding, see multi-objective-optimization).
  • Generational or steady-state architecture, and how is evaluation parallelized? Generational and (mu,lambda) produce full batches that saturate parallel workers; steady-state evaluates one child at a time and serializes unless you run asynchronous variants.
  • Is the objective noisy or stochastic? Noise discounts effective selection intensity and makes naive elitism enshrine lucky evaluations. Plan resampling or comma replacement before tuning anything else.
  • What disruption do the variation operators cause? Strong mutation or local search after selection rebuilds diversity each generation and tolerates higher pressure; weak variation under high pressure converges prematurely.
  • Any observed pathology? "Converges in 20 generations then stalls" means pressure (or compounded pressure) is too high or diversity machinery is missing; "never improves past random search" usually means pressure is too low or proportionate selection has collapsed.
  • Constraint handling. Penalty terms stretch and compress the fitness scale over the run; scale-sensitive schemes (proportionate, raw Boltzmann) inherit that distortion, rank-based schemes do not.
  • Reproducibility. Every stochastic scheme takes an explicit np.random.Generator; record seeds per run. A scheme comparison without fixed seeds and repeated runs is noise.

Read the full file on GitHub · 770 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 770 lines · 142 tokens per session scan A a853ffc1177d

Subscribe to this mod's changes

selection-and-replacement-strategies is a skill published in the GitHub repository hajibabaie/combinatorial-optimization-skills (7 stars, last pushed 3mo ago), licensed MIT. It adds 142 tokens to every session and 12,949 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

phx-deps-audit

Audit Hex deps for supply-chain security risk — bidi chars, compile-time exec, maintainer changes, typosquats, CVEs. Use after mix deps.update, when checking if a package upgrade is safe, or reviewing mix.lock PR diffs.

oliver-kriska/claude-elixir-phoenix · 58 tokens

release

CONTRIBUTOR TOOL - Cut a plugin release: bump plugin.json version, finalize CHANGELOG, update README if needed, gate on make ci, commit, tag vX.Y.Z, and create the GitHub release. Use when shipping a new plugin version. NOT distributed.

oliver-kriska/claude-elixir-phoenix · 60 tokens

session-deep-dive

Deep qualitative analysis of high-signal sessions. Spawns subagents with v2 template, synthesizes patterns, compares against known findings. Use after /session-scan.

oliver-kriska/claude-elixir-phoenix · 40 tokens

catchup

Summarize and review what changed while you were away. Use after a weekend, vacation, or flight to check missed PRs, git commits, Linear tickets, and meetings — one prioritized brief, not a firehose.

oliver-kriska/claude-elixir-phoenix · 48 tokens

brainstorm

Brainstorm Elixir/Phoenix features — explore ideas, compare approaches, gather requirements. Use when vague idea, not sure how to approach, or want to discuss before plan.

oliver-kriska/claude-elixir-phoenix · 39 tokens

learn-from-fix

Capture Elixir/Ecto/LiveView lessons and Hex API rules. Use after corrections or when asked to document learning, record a lesson, prevent a fixed mistake, or remember package guidance with --library.

oliver-kriska/claude-elixir-phoenix · 46 tokens