Sperm Competition as a Selection Operator for Tree-of-Thought Search

TTT: Tree-of-Thought with Sperm Competition — A Bio-Inspired Evolutionary Framework for LLM Idea Generation

Cleveris Research · Technical Report (Super IDE project)

Published: September 14, 2026

Abstract

A core weakness of large language models (LLMs) on open-ended creative tasks is diversity collapse: repeated sampling from the same prompt rapidly converges, trapping search in a local optimum. We abstract the biological process of sperm competition into a set of evolutionary operators and propose TTT (Tree-of-Thought with Sperm Competition): a thought tree first expands the prompt into a structured set of candidates; each candidate is then treated as a “gamete” and undergoes several generations of “elitism – tournament selection – recombination – mutation – real-LLM re-scoring”, until a single candidate is “fertilized” as the winner.

Our contributions are: (1) a formalization of the reproductive-selection analogy — overproduction → multi-stage filtering → recombination and mutation → single winner; (2) an engineering implementation inside Super IDE with real-LLM generation/scoring, batching, rate limiting and graceful degradation; (3) a default configuration, a derivation of the LLM call budget, and an honest account of current limitations, including the absence of semantic crossover, premature convergence, and the lack of controlled evaluation.

Note: This is a systems and methods report. It contains no quantitative results from controlled experiments. Every number is either a parameter of the implementation or an arithmetic quantity derived from it — not a measured performance figure.

Table of Contents

  1. Introduction: Diversity Collapse in Idea Generation
  2. Biological Background: Sperm Competition in Humans
  3. Related Work
  4. Method: The TTT Framework
  5. System Implementation: Super IDE
  6. Discussion: Why the Mapping Works
  7. Limitations and Threats to Validity
  8. Future Work
  9. Conclusion
  10. References

1. Introduction: Diversity Collapse in Idea Generation

When an LLM is used as an “idea generator”, two problems recur. The first is convergence: sampling repeatedly at high temperature yields solutions that are semantically highly overlapping. The second is the absence of selection: the model can produce a large volume of text, yet there is no stable, weightable mechanism for separating good ideas from merely many ideas.

Chain-of-Thought (CoT) asks the model to verbalize its reasoning; Tree-of-Thought (ToT) organizes reasoning into a tree with evaluation and pruning. Both, however, remain searches along a single elite trajectory: once the evaluation function is biased, the error is locked in. We want a mechanism closer to natural selection, spanning exploration and exploitation.

Sexual reproduction offers an extreme paradigm: overproduction + multi-stage filtering + a single winner. A single ejaculate contains hundreds of millions of genetically distinct gametes; the female reproductive tract together with the cumulus–zona pellucida filters them in layers, and typically exactly one sperm fuses with the oocyte. We formalize this process as algorithmic operators and call the result TTT.

2. Biological Background: Sperm Competition in Humans

2.1 Sperm competition theory

Sperm competition was introduced by Parker (1970) to describe the phenomenon in which, when a female mates with several males in a short window, sperm from different males compete inside the female reproductive tract for fertilization. It is a central component of post-copulatory sexual selection, explaining the evolution of sperm number, sperm morphology, and mating strategies.

2.2 Orders of magnitude and filtering in humans

A human ejaculate is typically about 2–5 mL; the WHO lower reference limit for sperm concentration is about 15 million per mL, so the total is commonly on the order of 10^8 (roughly 200–300 million). Yet:

2.3 Selection is not only between sperm

“Competition” is not simply “the fastest swimmer wins”. Morphology, motility, DNA integrity and acrosomal status affect survival; the cumulus and zona pellucida and the oviductal environment form physical and molecular filters; and in some species oocytes actively participate in selection (the “oocyte choice” hypothesis), with sperm storage occurring in others. The more accurate picture is therefore: many cheap, diverse candidates × layered, heterogeneous filtering × one winner.

2.4 Abstracted algorithmic principles

Biological phenomenonAlgorithmic counterpart
Overproduction of gametes (hundreds of millions)Batch-generate many more candidates than needed (budget-bounded)
Layered filtering (tract, cumulus, zona)Multi-generation re-scoring plus elitism, gradually converging
Recombination and mutationUniform crossover plus feature/text mutation
Sperm storage (in some species)Elite pool (top-10% retained each generation)
A single fertilizationReturn the argmax candidate

3. Related Work

3.1 Structured search over prompts and reasoning

CoT improves complex-task performance through explicit reasoning chains; ToT organizes reasoning into a tree, expanding and pruning via model self-evaluation; Graph-of-Thoughts further allows the merging and aggregation of thoughts; Self-Consistency improves robustness by voting over multiple reasoning chains. These methods share a “generate–evaluate–select” skeleton, but their selection operators are usually simple (voting or greedy).

3.2 Evolutionary LLM optimization

FunSearch uses an LLM to generate candidate programs filtered by an automatic evaluator, surpassing previously known results on combinatorial problems; AlphaEvolve generalizes this idea to algorithm discovery; EvoPrompt and OPRO treat the prompt itself as the object of evolution. Together they demonstrate the feasibility of an “LLM generation + automatic evaluation + evolutionary loop”.

3.3 Evolutionary computation and quality–diversity

Genetic algorithms, genetic programming and NSGA-II provide the classical selection/recombination/mutation operators; novelty search and MAP-Elites emphasize diversity rather than a single fitness in order to resist premature convergence. TTT borrows its selection and recombination operators directly from these mechanisms, with the LLM acting as both generator and fitness function.

3.4 LLM as a judge

LLM-as-a-Judge is now widely used to evaluate open-ended tasks, but suffers from position, length and self-consistency biases. TTT mitigates this with low temperature (0.2), batched scoring and a heuristic fallback, but does not eliminate it (see Section 7).

4. Method: The TTT Framework

An idea is represented as a node idea = (id, text, features, score, parent, children), where text is the natural-language idea, features are four fitness components in [0,1], and score is their weighted sum. TTT has two stages: thought-tree expansion and sperm-competition evolution.

4.1 Stage 1: thought-tree expansion

A root node is generated from an empty seed, and the tree then splits level by level: level d yields branching^d nodes, for Σd=0..depth branching^d nodes in total. This provides structured initial diversity covering different lines of thought, rather than random repetitions of one prompt.

nodes(b=4, depth=2) = 1 + 4 + 16 = 21

4.2 Stage 2: the gamete pool

All tree nodes are collected as initial “gametes”. If fewer than the budget N, they are topped up by batch generation; the pool is then truncated/sampled to N. Every gamete is scored by the LLM.

4.3 Sperm-competition evolution

Each generation repeats: sort by score; retain elites E = max(2, ⌊0.1·N⌋); produce parents by tournament selection (k=3); uniform crossover mixing the two parents’ feature vectors; mutation perturbing features with probability pm and marking the text; then re-score the whole generation with the real LLM. Elitism corresponds to “sperm storage”, and the final argmax to “fertilization”.

Algorithm 1  Sperm-competition evolution
Input: prompt, budget N, generations G, pc, pm
1  tree   = buildTree(prompt, b=4, depth=2)     // expand, Sigma b^d nodes
2  P      = treeNodes U topUpTo(N)             // gamete pool
3  P      = scoreLLM(P)                         // batched LLM scoring
4  for g = 1..G:
5      E  = top max(2, floor(0.1*|P|)) by score // elites = sperm storage
6      for each slot in |P|-|E|:
7          p1, p2 = tournament(P, k=3)
8          c      = uniformCrossover(p1, p2, pc)   // recombination
9          c      = mutate(c, pm)                  // mutation
10     P      = E U offspring
11     P      = scoreLLM(P)                     // real LLM re-scoring each gen
12 return argmax score, top10

4.4 Fitness: four weighted dimensions + LLM judge

Fitness is a weighted sum of four semantic dimensions with fixed weights:

DimensionMeaningWeight
noveltyOriginality0.25
feasibilityPracticality0.25
relevanceFit to the task0.30
eleganceElegance0.20

Scoring is done by the LLM in batches (16 per batch, temperature 0.2, strictly returning JSON). When a call or parse fails, the system falls back to heuristic scoring (based on text length, character overlap with the prompt, keywords, etc.) so that evolution never halts.

5. System Implementation: Super IDE

TTT is implemented as a pure front-end module inside Super IDE (calling the model through the Electron main-process channel ai-direct:send-message). Its entry point returns {best, top10, stats, trace}. The engineering focus is stability under rate limiting.

5.1 Batching and rate limiting

5.2 Graceful degradation

No stage can abort the pipeline: generation degrades to per-item generation and then to placeholder text; scoring degrades to the heuristic. This guarantees “always return a result”, at the cost of lower quality when degraded (flagged explicitly via the realLLM flag in the logs).

5.3 Default configuration

ParameterLLM version (default)Early local version
branching46
depth23
population40200
generations55
mutation rate pm0.150.15
crossover rate pc0.40.4

Reducing the population from 200 to 40 is an engineering trade-off: under single-concurrency + batching rate limits, a smaller population cuts call volume substantially while preserving adequate diversity.

5.4 LLM call budget (derived, not measured)

Under the defaults and the “one call covers a whole batch” logic, the per-run call count can be derived:

StageNotesCalls (approx.)
Tree generationroot / level 1 / level 2, one call each3
Top-up generationone batch asking for 19 items1
Initial scoring21 nodes, 16 per batch2
Top-up scoring19 items, 16 per batch2
Per-generation re-scoring × 540 items/generation, 16 per batch15
Totalexcluding retries and degradation≈ 23
The table above is an arithmetic derivation from the batching parameters in the code. It is not a measured call count; real values depend on retries, model behavior and degradation paths.

6. Discussion: Why the Mapping Works

Sperm competition is a good fit as a selection operator for LLM search because it addresses three problems at once:

The key difference from ToT is that ToT is a “generate–evaluate–prune” tree search, whereas TTT layers a population-level evolutionary loop on top of it, using the biological metaphor to make the design constraints — overproduction, filtering, a single winner — explicit.

The value of a metaphor is not fidelity to biological detail, but that it highlights three knobs of search: the yield of candidates, the number of filtering stages, and the singularity of the final extraction.

7. Limitations and Threats to Validity

We consider it more important to state the following honestly than to present flattering numbers.

7.1 Missing semantic crossover (most critical)

In the current implementation, crossover only mixes the feature vector, and mutation only perturbs features numerically while appending a marker to the text. Offspring text is therefore essentially identical to the parent text, and evolution effectively searches a “score space” rather than an “idea space”. Because LLM scores for identical text are highly correlated, this mechanism struggles to yield genuinely new ideas and can cause premature convergence: elites survive every generation while their features are nudged until saturation.

7.2 Judge bias and stochasticity

Fitness depends entirely on an LLM judge, which carries position, length and self-consistency biases; batched scoring may let candidates in the same batch influence one another; the heuristic fallback injects non-semantic noise.

7.3 No ablation or statistical testing

branching / depth / population / generations / weights have not been systematically ablated. This report contains no controlled comparisons, confidence intervals or significance tests; any claim of “better” is therefore unsupported.

7.4 Limits of the metaphor

Biological selection occurs in an open physical–biochemical environment where selection pressure arises naturally, whereas here the pressure is proxied by an LLM — manipulable and drift-prone. Equating “sperm competition” directly with an algorithmic advantage is over-claiming.

8. Future Work

9. Conclusion

We presented TTT, which abstracts sperm competition into the operators overproduction → multi-stage filtering → recombination and mutation → single winner, layered on top of tree-of-thought search to mitigate diversity collapse in LLM idea generation. We gave a formal description, an engineering implementation inside Super IDE (batching, rate limiting, degradation), a default configuration and a derived call-budget analysis. We also stated clearly that the current implementation suffers from a fundamental lack of semantic crossover, and outlined a path forward centered on semantic recombination, quality–diversity archives and controlled evaluation.

Reproducibility: The core logic lives in Super IDE's ttt-engine-llm.js; default parameters appear in Section 5.3. All values in this report are parameters or derivations from them, with no performance claims. Ablations and benchmark experiments are welcomed on this basis.

References

  1. Parker, G. A. (1970). Sperm competition and its evolutionary consequences in the insects. Biological Reviews.
  2. Birkhead, T. R., & Møller, A. P. (1998). Sperm Competition and Sexual Selection. Academic Press.
  3. Wei, J., et al. (2022). Chain-of-Thought Prompting Elicits Reasoning in Large Language Models. NeurIPS.
  4. Yao, S., et al. (2023). Tree of Thoughts: Deliberate Problem Solving with Large Language Models. NeurIPS.
  5. Besta, M., et al. (2024). Graph of Thoughts: Solving Elaborate Problems with Large Language Models. AAAI.
  6. Wang, X., et al. (2023). Self-Consistency Improves Chain of Thought Reasoning in Language Models. ICLR.
  7. Zheng, L., et al. (2023). Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena. NeurIPS.
  8. Romera-Paredes, B., et al. (2024). Mathematical discoveries from program search with large language models (FunSearch). Nature.
  9. Novikov, A., et al. (2025). AlphaEvolve: A coding agent for scientific and algorithmic discovery.
  10. Guo, Q., et al. (2024). Connecting Large Language Models with Evolutionary Algorithms Yields Prompt Optimization (EvoPrompt). ICLR.
  11. Yang, C., et al. (2024). Large Language Models as Optimizers (OPRO). ICLR.
  12. Lehman, J., & Stanley, K. O. (2011). Abandoning Objectives: Evolution Through the Search for Novelty Alone. Evolutionary Computation.
  13. Mouret, J.-B., & Clune, J. (2015). Illuminating search spaces by mapping elites (MAP-Elites).
  14. Deb, K., et al. (2002). A fast and elitist multiobjective genetic algorithm: NSGA-II. IEEE TEC.
  15. Holland, J. H. (1975). Adaptation in Natural and Artificial Systems.
  16. Koza, J. R. (1992). Genetic Programming. MIT Press.