|
| 1 | +# Configuration for MAP-Elites with Adaptive Exploration + Memory - Symbolic Regression |
| 2 | +# Combines adaptive search with memory-augmented evolution |
| 3 | + |
| 4 | +# Evolution settings |
| 5 | +max_iterations: 200 |
| 6 | +checkpoint_interval: 10 |
| 7 | +log_level: "INFO" |
| 8 | +random_seed: 42 |
| 9 | +target_score: "combined_score" |
| 10 | + |
| 11 | +# Memory Configuration - ENABLED |
| 12 | +memory: |
| 13 | + enabled: true |
| 14 | + load_from_snapshot: false # Start fresh |
| 15 | + semantic_search_topk: 3 # Number of similar parents from memory |
| 16 | + embed_model: "text-embedding-3-large" # OpenAI embedding model |
| 17 | + |
| 18 | +# LLM configuration - SAME AS BASE CONFIG |
| 19 | +llm: |
| 20 | + primary_model: "gpt-4o" |
| 21 | + primary_model_weight: 0.8 |
| 22 | + secondary_model: "o3" |
| 23 | + secondary_model_weight: 0.2 |
| 24 | + api_base: "https://api.openai.com/v1" |
| 25 | + temperature: 0.7 |
| 26 | + top_p: 0.95 |
| 27 | + max_tokens: 8192 |
| 28 | + timeout: 300 |
| 29 | + |
| 30 | +# Prompt configuration - SAME AS BASE CONFIG |
| 31 | +prompt: |
| 32 | + system_message: | |
| 33 | + You are an expert in symbolic regression and mathematical modeling. |
| 34 | + Your task is to evolve a Python function `func(x, params)` that models a scientific process, |
| 35 | + predicting output variables based on input variables. |
| 36 | +
|
| 37 | + The function signature is: |
| 38 | + ```python |
| 39 | + def func(x: np.ndarray, params: np.ndarray) -> np.ndarray: |
| 40 | + ``` |
| 41 | +
|
| 42 | + - `x` is a 2D NumPy array of shape `(n_samples, n_features)` containing input variables |
| 43 | + - `params` is a 1D NumPy array of up to 10 parameters (optimized externally via BFGS) |
| 44 | + - The function should return a 1D NumPy array of predictions with shape `(n_samples,)` |
| 45 | +
|
| 46 | + Key principles: |
| 47 | + - Aim for accurate predictions with low mean squared error (MSE) |
| 48 | + - Prefer simple, interpretable mathematical expressions |
| 49 | + - Consider the physical meaning and relationships of input variables |
| 50 | + - Avoid numerical issues (division by zero, log of negative numbers, etc.) |
| 51 | + - Balance model complexity with generalization ability |
| 52 | +
|
| 53 | + Performance metric: score = -log10(MSE) |
| 54 | + Higher scores are better. The model will be evaluated on held-out test data. |
| 55 | +
|
| 56 | + Strategies to explore: |
| 57 | + - Polynomial terms and interactions between variables |
| 58 | + - Exponential, logarithmic, and trigonometric functions |
| 59 | + - Physical laws and domain-specific relationships |
| 60 | + - Feature engineering and transformations |
| 61 | + - Regularization through simplicity |
| 62 | + num_top_programs: 4 |
| 63 | + use_template_stochasticity: true |
| 64 | + # Memory rendering (from semantic search) |
| 65 | + num_similar_parent_best: 3 |
| 66 | + num_similar_parent_worst: 3 |
| 67 | + include_similar_parent_worst: true |
| 68 | + |
| 69 | +# Database configuration - ADAPTIVE VERSION |
| 70 | +database: |
| 71 | + population_size: 70 |
| 72 | + archive_size: 30 |
| 73 | + num_islands: 4 |
| 74 | + elite_selection_ratio: 0.3 |
| 75 | + |
| 76 | + # ADAPTIVE EXPLORATION/EXPLOITATION (NEW!) |
| 77 | + use_adaptive_search: true |
| 78 | + adaptive_window_size: 10 # Track last 10 iterations |
| 79 | + adaptive_min_exploration: 0.1 # When improving (10% explore, 80% exploit, 10% random) |
| 80 | + adaptive_max_exploration: 0.7 # When stuck (70% explore, 20% exploit, 10% random) |
| 81 | + |
| 82 | + # Static fallback (if use_adaptive_search: false) |
| 83 | + exploration_ratio: 0.3 |
| 84 | + exploitation_ratio: 0.6 |
| 85 | + |
| 86 | + # MAP-Elites features |
| 87 | + feature_dimensions: ["complexity", "diversity"] |
| 88 | + feature_bins: 10 |
| 89 | + |
| 90 | +# Evaluator configuration - SAME AS BASE CONFIG |
| 91 | +evaluator: |
| 92 | + timeout: 90 |
| 93 | + cascade_evaluation: false |
| 94 | + cascade_thresholds: [1.0] |
| 95 | + parallel_evaluations: 4 |
| 96 | + use_llm_feedback: false |
| 97 | + |
| 98 | +# Evolution settings - SAME AS BASE CONFIG |
| 99 | +diff_based_evolution: true |
| 100 | +allow_full_rewrites: false |
0 commit comments