| |
| |
|
|
| |
| max_iterations: 100 |
| checkpoint_interval: 10 |
| log_level: "INFO" |
| random_seed: 42 |
| diff_based_evolution: true |
| max_code_length: 20000 |
|
|
| |
| llm: |
| api_base: "https://openrouter.ai/api/v1" |
| models: |
| - name: "google/gemini-2.5-flash" |
| weight: 0.8 |
| - name: "google/gemini-2.5-pro" |
| weight: 0.2 |
| |
| temperature: 0.4 |
| max_tokens: 128000 |
| timeout: 150 |
| retries: 3 |
|
|
| |
| prompt: |
| system_message: | |
| SETTING: |
| You're an autonomous programmer tasked with solving a specific problem. You are to use the commands defined below to accomplish this task. Every message you send incurs a cost—you will be informed of your usage and remaining budget by the system. |
| You will be evaluated based on the best-performing piece of code you produce, even if the final code doesn't work or compile (as long as it worked at some point and achieved a score, you will be eligible). |
| Apart from the default Python packages, you have access to the following additional packages: |
| - cryptography |
| - cvxpy |
| - cython |
| - dace |
| - dask |
| - diffrax |
| - ecos |
| - faiss-cpu |
| - hdbscan |
| - highspy |
| - jax |
| - networkx |
| - numba |
| - numpy |
| - ortools |
| - pandas |
| - pot |
| - psutil |
| - pulp |
| - pyomo |
| - python-sat |
| - pythran |
| - scikit-learn |
| - scipy |
| - sympy |
| - torch |
| Your primary objective is to optimize the `solve` function to run as as fast as possible, while returning the optimal solution. |
| You will receive better scores the quicker your solution runs, and you will be penalized for exceeding the time limit or returning non-optimal solutions. |
| |
| Below you find the description of the task you will have to solve. Read it carefully and understand what the problem is and what your solver should do. |
|
|
| You are an expert programmer specializing in numerical_methods algorithms. Your task is to improve the polynomial_real algorithm implementation with baseline comparison. |
|
|
| The problem description is: |
| PolynomialReal Task: |
|
|
| Given a polynomial of degree n with all real roots, the task is to approximate the roots of the polynomial. |
| The goal is to compute the approximated roots so that each is within 0.001 of the true value—i.e., correct to at least three decimal places (any extra precision beyond three decimal places is not considered). |
| A given solution's distance is said to be the average absolute difference between the approximated roots and the true roots. |
|
|
| Focus on improving the solve method to correctly handle the input format and produce valid solutions efficiently. Your solution will be compared against the reference AlgoTune baseline implementation to measure speedup and correctness. |
|
|
| PERFORMANCE OPTIMIZATION OPPORTUNITIES: |
| You have access to high-performance libraries that can provide significant speedups: |
| |
| • **JAX** - JIT compilation for numerical computations that can provide 100x+ speedups |
| JAX offers drop-in NumPy replacements (jax.numpy) that work with JIT compilation |
| Works best with pure functions (no side effects) and may require code restructuring |
| |
| • **Numba** - Alternative JIT compilation, often simpler to use |
| |
| • **scipy optimizations** - Direct BLAS/LAPACK access and specialized algorithms |
| Many scipy functions have optimized implementations worth exploring |
| |
| • **Vectorization** - Look for opportunities to replace loops with array operations |
| |
| EXPLORATION STRATEGY: |
| 1. Profile to identify bottlenecks first |
| 2. Consider multiple optimization approaches for the same problem |
| 3. Try both library-specific optimizations and algorithmic improvements |
| 4. Test different numerical libraries to find the best fit |
| |
| num_top_programs: 5 |
| num_diverse_programs: 5 |
| include_artifacts: true |
|
|
| |
| database: |
| population_size: 1000 |
| archive_size: 100 |
| num_islands: 4 |
| |
| |
| elite_selection_ratio: 0.1 |
| exploration_ratio: 0.3 |
| exploitation_ratio: 0.6 |
| |
| |
| feature_bins: 10 |
| |
| |
| migration_interval: 20 |
| migration_rate: 0.1 |
|
|
| |
| evaluator: |
| timeout: 600 |
| max_retries: 3 |
| |
| |
| cascade_evaluation: true |
| cascade_thresholds: [0.5, 0.8] |
| |
| |
| parallel_evaluations: 1 |
|
|
| |
| algotune: |
| num_trials: 5 |
| data_size: 500 |
| timeout: 300 |
| num_runs: 3 |
| warmup_runs: 1 |
|
|