Include competition between evolved populations
Evolution often results in more interesting organisms when competition is present. It would be awesome if OpenEvolve implemented competition.
As a concrete use case: I am working on a project to evolve AI control protocols. This involves a red team and a blue team. The red team wins if they can execute unwanted actions, and the blue team wins if they can get useful work from the red team without the red team performing unwanted actions. Ideally, my project could evolve both of the policies together so that the red team can respond to the blue team and vice versa until a robust blue team results.
My current plan is to apply OpenEvolve to the blue team, get some control protocols that work against a static red team, then evolve the red teams against the blue teams that result.
Since OpenEvolve already supports island-based evolution with MAP-Elites, you could extend this to adversarial islands:
- Multi-Population Database: Partition islands into teams (e.g., red vs blue). Each team evolves independently using the current MAP-Elites approach.
- Cross-Population Evaluation: Modify the evaluator to sample opponents from the competing population. During fitness evaluation, red programs are tested against current blue programs and vice versa.
- Coevolutionary Fitness: Use competitive metrics like win rate, Elo ratings, or Nash equilibrium distance rather than absolute scores.
- Synchronization: Run alternating or parallel iterations for each population, with periodic cross-evaluation phases.
You might want to think about competition between at least 9 parties and preferably many more. Two you get duplicity, especially as it's not in a binary system is it, not just revolving around each other, but in a the body fourth base fortunately you can count on their patience and they've been really rather good about things.
Look to where true free markets are running things in reality and wonder... could you create that condition in code?
I'd like to work on #311 with a coordinator that alternates two existing OpenEvolve engines, keeping their populations separate.
The main constraint is score comparability when opponents change. I checked main at 9196d87 through run_evolution and its process workers using a local scripted generation endpoint. In a controlled policy game, resuming against a different opponent retained a best score of 1.0 although that policy now scored 0.0. Re-evaluating the retained programs before selection let the engine choose a candidate whose recorded and current scores both were 0.5. This tests a prerequisite for coevolution; it is not a claim that changing evaluators is an existing supported workflow, or that coevolution improves real model quality.
For a first implementation, I propose freezing an opponent cohort for each phase, re-evaluating the retained population against it, and then running ordinary evolution. The checkpoint would identify both populations, the completed phase, and the opponent/evaluator context so a resume cannot silently compare scores from different matchups. Existing single-population runs would stay unchanged.
Would a coordinating runner in core be a useful scope for this issue? I would start with an executable two-policy CPU example and tests for score refresh, population separation, and phase resume. The opponent sampling and population-retention rules would be explicit; I would leave Elo/Nash objectives out of the first version.
It will be good to add some example or use case as well where this (competition) shows improvements over the existing engine.