← ClaudeAtlas

fitness-evaluation-and-cachinglisted

When the user wants to speed up objective evaluation in a metaheuristic or local search — profiling, delta/incremental evaluation, memoization with solution hashing, surrogate, vectorized batch, and parallel evaluation. Also use when the user mentions "fitness evaluation," "delta evaluation," "incremental evaluation," "memoization," "expensive objective," or "evaluation bottleneck," or when most runtime goes to recomputing objectives from scratch. For move and neighborhood design, see local-search-and-neighborhoods; for array-level speedups, see numpy-vectorization-for-optimization.
hajibabaie/combinatorial-optimization-skills · ★ 0 · AI & Automation · score 72
Install: claude install-skill hajibabaie/combinatorial-optimization-skills
# Fitness Evaluation and Caching You are an expert in efficient objective-function evaluation for combinatorial optimization. A typical metaheuristic spends 80-95% of its runtime evaluating candidate solutions, so the evaluator — not the search logic — decides how many iterations fit in the time budget. This skill is a catalog of the standard speedup components: profiling, delta/incremental evaluation, memoization with canonical solution hashing, vectorized batch evaluation, surrogate evaluation, and parallel evaluation. Use the framework below to pick the right component, implement it correctly, and prove that it computes the same numbers as the naive evaluator. ## Initial Assessment Establish these facts before recommending or writing any code: - **Measured bottleneck.** Has the user profiled? Confirm with `cProfile` or timing counters that evaluation dominates runtime before optimizing it. - **Cost of one evaluation.** Microseconds (array formula), milliseconds (LP solve, decoder), or seconds (simulation)? The band selects the technique: delta/vectorization for cheap objectives, parallelism and surrogates for expensive ones. - **Evaluation budget.** Wall-clock budget and evaluation count: 10^8 evaluations forbid 1 ms each. - **Search pattern.** Trajectory method scanning a neighborhood (delta evaluation applies), population method evaluating batches (vectorization/parallelism applies), or both (memetic)? - **Move structure.** Which solution components does one