genetic-algorithms
Genetic Algorithms for AI optimization - EvoPrompt, hyperparameter tuning, evolutionary strategies.
npx skills add majiayu000/claude-skill-registry --skill genetic-algorithms --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Skill: Genetic Algorithms ## Contexto Algoritmos genéticos para optimización de prompts, hyperparámetros, y búsqueda en espacios complejos donde gradientes no existen. ## Cuándo Usar - Optimizar prompts automáticamente - Tuning de hyperparámetros (learning rate, batch size, etc.) - Búsqueda en espacios discretos/no diferenciables - Cuando necesitás múltiples soluciones (no solo una) ## Reglas Críticas 1. **Fitness rápido** - Evaluación debe ser eficiente 2. **Seeds diversos** - Población inicial variada 3. **Elitismo** - Siempre preservar mejores individuos 4. **Stopping criterio** - Definir cuándo parar ## Procedimiento ### 1. Definir Representación Genética ```python # Para prompts: texto gene = "Step by step, analyze..." # Para hyperparams: dict gene = {"lr": 0.001, "batch": 32} ``` ### 2. Crear Función de Fitness ```python def fitness(gene) -> float: """Evaluar calidad del gene. Mayor = mejor.""" result = test_gene(gene) return accuracy(result) ``` ### 3. Implementar Operadores ```python # Crossover def crossover(p1, p2): point = random.randint(1, len(p1)-1) return p1[:point] + p2[point:] # Mutation def mutate(gene, rate=0.1): if random.random() < rate: return apply_mutation(
- Contexto
- Cuándo Usar
- Reglas Críticas
- Procedimiento
- 1. Definir Representación Genética
- 2. Crear Función de Fitness
- 3. Implementar Operadores
- 4. Ejecutar Loop Evolutivo
- Ejemplo Completo (EvoPrompt)
- Best Practices
- Recursos Relacionados
What does the genetic-algorithms skill do?
Genetic Algorithms for AI optimization - EvoPrompt, hyperparameter tuning, evolutionary strategies.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill genetic-algorithms --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
