|
| 1 | +# OpenEvolve Default Configuration |
| 2 | +# This file contains all available configuration options with sensible defaults |
| 3 | +# You can use this as a template for your own configuration |
| 4 | + |
| 5 | +# General settings |
| 6 | +max_iterations: 1000 # Maximum number of evolution iterations |
| 7 | +checkpoint_interval: 50 # Save checkpoints every N iterations |
| 8 | +log_level: "INFO" # Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL) |
| 9 | +log_dir: null # Custom directory for logs (default: output_dir/logs) |
| 10 | +random_seed: null # Random seed for reproducibility (null = random) |
| 11 | + |
| 12 | +# Evolution settings |
| 13 | +diff_based_evolution: true # Use diff-based evolution (true) or full rewrites (false) |
| 14 | +allow_full_rewrites: false # Allow occasional full rewrites even in diff-based mode |
| 15 | +max_code_length: 10000 # Maximum allowed code length in characters |
| 16 | + |
| 17 | +# LLM configuration |
| 18 | +llm: |
| 19 | + # Primary model (used most frequently) |
| 20 | + primary_model: "gemini-2.0-flash-lite" |
| 21 | + primary_model_weight: 0.8 # Sampling weight for primary model |
| 22 | + |
| 23 | + # Secondary model (used for occasional high-quality generations) |
| 24 | + secondary_model: "gemini-2.0-flash" |
| 25 | + secondary_model_weight: 0.2 # Sampling weight for secondary model |
| 26 | + |
| 27 | + # API configuration |
| 28 | + api_base: "https://api.openai.com/v1" # Base URL for API (change for non-OpenAI models) |
| 29 | + api_key: null # API key (defaults to OPENAI_API_KEY env variable) |
| 30 | + |
| 31 | + # Generation parameters |
| 32 | + temperature: 0.7 # Temperature for generation (higher = more creative) |
| 33 | + top_p: 0.95 # Top-p sampling parameter |
| 34 | + max_tokens: 4096 # Maximum tokens to generate |
| 35 | + |
| 36 | + # Request parameters |
| 37 | + timeout: 60 # Timeout for API requests in seconds |
| 38 | + retries: 3 # Number of retries for failed requests |
| 39 | + retry_delay: 5 # Delay between retries in seconds |
| 40 | + |
| 41 | +# Prompt configuration |
| 42 | +prompt: |
| 43 | + template_dir: null # Custom directory for prompt templates |
| 44 | + system_message: "You are an expert coder helping to improve programs through evolution." |
| 45 | + |
| 46 | + # Number of examples to include in the prompt |
| 47 | + num_top_programs: 3 # Number of top-performing programs to include |
| 48 | + num_diverse_programs: 2 # Number of diverse programs to include |
| 49 | + |
| 50 | + # Template stochasticity |
| 51 | + use_template_stochasticity: true # Use random variations in templates for diversity |
| 52 | + template_variations: # Different phrasings for parts of the template |
| 53 | + improvement_suggestion: |
| 54 | + - "Here's how we could improve this code:" |
| 55 | + - "I suggest the following improvements:" |
| 56 | + - "We can enhance this code by:" |
| 57 | + |
| 58 | + # Meta-prompting (experimental) |
| 59 | + use_meta_prompting: false # Use LLM to generate parts of the prompt |
| 60 | + meta_prompt_weight: 0.1 # Weight for meta-prompting influence |
| 61 | + |
| 62 | +# Database configuration |
| 63 | +database: |
| 64 | + # General settings |
| 65 | + db_path: null # Path to persist database (null = in-memory only) |
| 66 | + in_memory: true # Keep database in memory for faster access |
| 67 | + |
| 68 | + # Evolutionary parameters |
| 69 | + population_size: 1000 # Maximum number of programs to keep in memory |
| 70 | + archive_size: 100 # Size of elite archive |
| 71 | + num_islands: 5 # Number of islands for island model |
| 72 | + |
| 73 | + # Selection parameters |
| 74 | + elite_selection_ratio: 0.1 # Ratio of elite programs to select |
| 75 | + exploration_ratio: 0.2 # Ratio of exploration vs exploitation |
| 76 | + exploitation_ratio: 0.7 # Ratio of exploitation vs random selection |
| 77 | + diversity_metric: "edit_distance" # Diversity metric (edit_distance, feature_based) |
| 78 | + |
| 79 | + # Feature map dimensions for MAP-Elites |
| 80 | + feature_dimensions: # Dimensions for MAP-Elites feature map |
| 81 | + - "score" # Performance score |
| 82 | + - "complexity" # Code complexity (length) |
| 83 | + feature_bins: 10 # Number of bins per dimension |
| 84 | + |
| 85 | +# Evaluator configuration |
| 86 | +evaluator: |
| 87 | + # General settings |
| 88 | + timeout: 300 # Maximum evaluation time in seconds |
| 89 | + max_retries: 3 # Maximum number of retries for evaluation |
| 90 | + |
| 91 | + # Resource limits |
| 92 | + memory_limit_mb: null # Memory limit for evaluation (null = no limit) |
| 93 | + cpu_limit: null # CPU limit for evaluation (null = no limit) |
| 94 | + |
| 95 | + # Evaluation strategies |
| 96 | + cascade_evaluation: true # Use cascade evaluation to filter bad solutions early |
| 97 | + cascade_thresholds: # Thresholds for advancing to next evaluation stage |
| 98 | + - 0.5 # First stage threshold |
| 99 | + - 0.75 # Second stage threshold |
| 100 | + - 0.9 # Third stage threshold |
| 101 | + |
| 102 | + # Parallel evaluation |
| 103 | + parallel_evaluations: 4 # Number of parallel evaluations |
| 104 | + distributed: false # Use distributed evaluation |
| 105 | + |
| 106 | + # LLM-based feedback (experimental) |
| 107 | + use_llm_feedback: false # Use LLM to evaluate code quality |
| 108 | + llm_feedback_weight: 0.1 # Weight for LLM feedback in final score |
0 commit comments