- Hardcoded 6-8 metrics
- Couldn't add new metrics without editing code
- Model competed on fixed set
- UNLIMITED metrics - add as many as you want!
- GUI text field - just type comma-separated metric names
- "Add Metric" button - easily append new metrics
- Model competes on ALL metrics you define
- Each metric gets a WINNER logged
Expandable Metrics (comma-separated):
accuracy,speed,complexity,coherence,stability,memory,elegance,determinism,readability,maintainability
Click "Add Metric" button and enter:
parallelism- how well it uses multi-threadingrobustness- handles edge casesscalability- performance at scaleportability- works across platformstestability- easy to unit testdocumentation- code comments qualitysecurity- safe from exploitscreativity- novel approachsimplicity- minimal lines- ANY METRIC YOU WANT!
For EACH metric, model:
- Calculates score for ALL algorithms
- Finds the WINNER
- Logs winner to
logs/rankings/round_XXX_rankings.log - Writes to summary
accuracy,speed,complexity,coherence,stability,memory,elegance,determinism,readability,maintainability,parallelism,robustness,scalability,creativity,simplicity
Model will compete on ALL 15 and produce:
- Accuracy Winner:
fibonacci_R3_A2 - Speed Winner:
fibonacci_R5_A1 - Complexity Winner:
fibonacci_R2_A4 - Elegance Winner:
fibonacci_R4_A3 - ... (11 more winners!)
evolved_fibonacci_evolution/
├── logs/
│ ├── competitions/
│ │ ├── round_001_competition.log # Generation log
│ │ ├── round_002_competition.log
│ │ └── ...
│ ├── rankings/
│ │ ├── round_010_rankings.log # Winner per metric
│ │ └── ...
│ ├── thinking/
│ │ └── thinking_20260922_143022.log # Model reasoning
│ └── metrics.log # All raw scores
├── algo_01_fibonacci_R1_A1.jl
├── algo_02_fibonacci_R2_A3.jl
├── main.jl
├── WINNERS.md # Champions report
└── SUMMARY.md
================================================================================
ROUND 10 RANKINGS
================================================================================
Metric: accuracy
Winner: fibonacci_R8_A2
Score: 1.0000
----------------------------------------
Metric: speed
Winner: fibonacci_R5_A1
Score: 0.9200
----------------------------------------
Metric: elegance
Winner: fibonacci_R3_A4
Score: 0.8800
----------------------------------------
Metric: parallelism
Winner: fibonacci_R9_A2
Score: 0.7500
----------------------------------------
... (all your metrics!)
================================================================================
MODEL THINKING LOG
================================================================================
Total algorithms to test: 60
Test scenarios: 5
Metrics to compete on: accuracy, speed, complexity, coherence, stability,
memory, elegance, determinism, readability,
maintainability, parallelism, robustness
--- Algorithm 1: fibonacci_R1_A1 ---
[Thinking] Executing test runs...
accuracy: 100.00%
speed: 85.00%
complexity: 30.00%
coherence: 85.00%
stability: 90.00%
memory: 20.00%
elegance: 80.00%
determinism: 95.00%
readability: 87.00%
maintainability: 82.00%
parallelism: 50.00%
robustness: 88.00%
COMPOSITE: 812.45 (EXCELLENT)
--- Algorithm 2: fibonacci_R1_A2 ---
...
# These are always present
accuracy # Correctness (1.0 = 100%)
speed # Execution time (higher = faster)
complexity # Algorithm complexity (lower = better)
coherence # Code quality (higher = better)
stability # Consistency (higher = better)
memory # Allocations (lower = better)# Model calculates these if you add them
elegance # Code beauty
determinism # Same input = same output
readability # Easy to understand
maintainability # Easy to modify
parallelism # Multi-threaded
robustness # Handles edge cases
scalability # Performance at scale
portability # Cross-platform
testability # Easy to test
documentation # Comment quality
security # Safe from exploits
creativity # Novel approach
simplicity # Minimal lines
efficiency # Resource usage
modularity # Composable parts
# ADD ANY METRIC NAME!
# Model will:
# 1. Detect it's custom
# 2. Calculate a value (0.0-1.0)
# 3. Compete all algorithms on it
# 4. Find the winner# For each metric:
if metric_name in ['complexity', 'memory']:
winner = LOWEST_score # Less is better
else:
winner = HIGHEST_score # More is better1. [CODE GENERATION PHASE]
- Generate N algorithms x M rounds
- Debug until working
- Log to competitions/
2. [TESTING PHASE] ← Tests run at END!
- Test ALL algorithms
- Calculate ALL metrics
- Find winner for EACH metric
- Log to rankings/
- Log thinking process
- Write WINNERS.md
3. [SUMMARY PHASE]
- Overall champion (composite score)
- Per-metric winners
- All algorithms categorized
[Thinking] Preparing to generate code...
[Thinking] Model must output working function code...
[Thinking] Sending request to Ollama...
[Thinking] Generated 342 characters of code
[Thinking] Extracting Julia function from model output...
[Thinking] Analyzing error and preparing fix...
[Thinking] Model must output corrected code...
[Thinking] Calculating accuracy from test results...
[Thinking] Measuring execution speed...
... (100+ thinking logs!)
# Model CANNOT refuse! Prompt structure:
forced_prompt = f"""
{prompt}
CRITICAL INSTRUCTIONS:
- You MUST generate complete Julia function code
- NO explanations, NO text, ONLY code
- Start with 'function' keyword
- Include complete implementation
- End with 'end' keyword
BEGIN CODE NOW:
function"""
# Then extract aggressively with regex
code = extract_julia_code(response)logs/
├── competitions/ # Round-by-round generation logs
├── rankings/ # Per-metric winners each round
└── thinking/ # Model reasoning process
- Infinite Flexibility - Add metrics on the fly
- Fair Competition - Every metric gets a winner
- Full Transparency - Thinking logs show reasoning
- Organized - Separate logs for each concern
- Extensible - Easy to add metrics without code changes
- Launch GUI:
python3 ollama_algorithm_evolver_v3.py - Add your metrics in text field (comma-separated)
- Click "Add Metric" to append more
- Click "START EVOLUTION"
- Watch [Thinking] logs
- Check
logs/rankings/for winners per metric
- 10+ metrics gives rich competition landscape
- Click "Add Metric" multiple times to build list
- Lower metrics (complexity, memory) - winner has lowest score
- Higher metrics (accuracy, speed) - winner has highest score
- Check thinking logs to see model reasoning
- Check rankings logs to see per-metric winners
Now you can compete on ANY metric you dream up! 🚀
The model will:
- Generate algorithms
- Test them at the END
- Calculate ALL your metrics
- Find the winner for EACH metric
- Log everything with [Thinking] tags
- Create organized log folders
PERFECT for algorithm evolution! ✨