Skip to content

Issue #10 – Differential Evolution & Simulated Annealing #10

Description

@D4R102004

Description: Implement Differential Evolution (DE) in optimization/diff_evo.py and Simulated Annealing (SA) in optimization/annealing.py. These two algorithms provide the highest level of robustness in our toolkit. DE is a population-based vector optimizer, while SA is a single-state trajectory optimizer that uses "probabilistic jumping" to find global optima.

Objectives:

Implement the Differential Mutation strategy (u=a+F(b−c)) for DE.

Implement the Metropolis Criterion for SA: accepting worse solutions based on temperature.

Create a Cooling Schedule system (Linear and Geometric) for Simulated Annealing.

Finalize the optimization module with a benchmark script comparing all four methods (GA, PSO, DE, SA).

Tasks:

[ ] Implement optimization/diff_evo.py:

    Logic: For each individual, pick three random others (a,b,c). Create a mutant vector by adding the weighted difference of b and c to a.

    Implement Binomial Crossover: Decide gene-by-gene whether to take from the mutant or the original.

[ ] Implement optimization/annealing.py:

    State Management: Unlike the others, SA only tracks one current state.

    Probability Logic: P=e(new_fit−old_fit)/T. If a random number is less than P, accept the move even if it's worse.

[ ] Benchmark Suite:

    Create scripts/benchmark_optimization.py.

    Run all optimizers on the Rastrigin Function (a very "bumpy" function with many traps).

[ ] Unit Testing:

    Ensure SA can solve a discrete problem (like a small Traveling Salesman Problem).

    Ensure DE can solve high-dimensional continuous problems.

Acceptance Criteria:

[ ] DE successfully minimizes a 10-dimensional mathematical function.

[ ] SA demonstrates "hill-climbing" and "valley-jumping" behavior by accepting worse moves at high temperatures.

[ ] The benchmark script produces a clear table or plot comparing the convergence speed of each algorithm.

Dependencies:

Issue #8 (Optimization Infrastructure)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions