# Run2 Pareto Optimization

> Identifying Pareto-optimal solutions for multi-objective optimization (maximize F1, minimize delta).

- Skill: `cxcscmu/run2-pareto-optimization` (Agent Skill)
- Install (CLI): `npx get-skill add cxcscmu/run2-pareto-optimization`
- Raw SKILL.md: https://api.skillmd.com/api/skills/cxcscmu/run2-pareto-optimization/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: cxcscmu (https://skillmd.com/u/cxcscmu)
- Updated: 2026-11-24
- Page: https://skillmd.com/skills/cxcscmu/run2-pareto-optimization

---


# Pareto Frontier for Multi-Objective Optimization

## Definition
Point A dominates Point B iff:
- A.F1 >= B.F1 AND A.delta <= B.delta
- With at least one strict inequality

A point is Pareto-optimal if no other point dominates it.

## Efficient Implementation

```python
def find_pareto(results):
    """results: list of (f1, delta, ...) tuples. Maximize f1, minimize delta."""
    # Sort by F1 descending for efficiency
    indexed = sorted(enumerate(results), key=lambda x: -x[1][0])
    pareto = []
    min_delta = float('inf')

    for idx, r in indexed:
        if r[1] <= min_delta:
            pareto.append(r)
            min_delta = r[1]

    return pareto
```

This O(n log n) approach works because after sorting by F1 descending, a point is Pareto-optimal iff its delta is less than or equal to the minimum delta seen so far.

