An evolutionary coding agent that autonomously generates and improves Python code using LLMs.
Inspired by AlphaEvolve.
- Python (via
uv) - Ollama installed and running.
- Pull the model:
ollama pull gemma3:4b
- Pull the model:
uv syncRun the Sorting task example:
uv run main.py run sortingThis will:
- Generate an initial population of sorting functions.
- Evaluate them against test cases.
- Evolve and improve the code over generations.
- Save the best solution to
results/.
# Custom Generatons
uv run main.py run sorting --generations 5
# Custom Model
uv run main.py run sorting --model ollama/llama3