OpenAlpha_Evolve  by shyamsaktawat

Open-source Python framework for AI-driven code evolution

created 2 months ago
860 stars

Top 42.6% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

OpenAlpha_Evolve is an open-source Python framework for autonomous coding agents that iteratively write, test, and improve code using LLMs. It's designed for researchers, developers, and enthusiasts interested in AI-driven algorithmic innovation and automated problem-solving. The system aims to discover and refine solutions autonomously through an evolutionary process.

How It Works

The framework employs a modular, agent-based architecture. A PromptDesignerAgent crafts prompts for LLMs to generate initial code, mutate existing code (using diffs), or fix bugs. A CodeGeneratorAgent uses an LLM (configured via LiteLLM) to produce Python code. An EvaluatorAgent tests the code for syntax correctness and functional accuracy against user-defined input/output examples within Dockerized sandboxes. A SelectionControllerAgent applies evolutionary principles to choose parents and survivors, while a TaskManagerAgent orchestrates the entire iterative loop.

Quick Start & Requirements

  • Install: pip install -r requirements.txt
  • Prerequisites: Python 3.10+, pip, git, Docker.
  • Setup: Clone the repository, set up a virtual environment, install dependencies, and configure API keys in a .env file (copy from .env.example).
  • Run: python -m main to start an evolutionary run.
  • Web UI: python app.py to launch a Gradio interface for interactive task definition.
  • Docs: Project Repository

Highlighted Details

  • Leverages LiteLLM for flexible LLM provider integration (OpenAI, Anthropic, Google, etc.).
  • Implements diff-based mutations and bug-fixing for targeted code modifications.
  • Utilizes Docker for sandboxed code execution, enhancing security and dependency management.
  • Supports defining custom algorithmic quests with detailed descriptions and input/output examples.
  • Offers comprehensive logging and configuration management via settings.py and .env.

Maintenance & Community

The project is open for contributions, encouraging bug reports, feature suggestions, and pull requests. Community interaction is facilitated through GitHub issues.

Licensing & Compatibility

Licensed under the MIT License. This permissive license allows for commercial use and integration with closed-source projects.

Limitations & Caveats

This is an experimental project; generated code may not always be optimal, correct, or secure. Thorough review and testing are recommended before production use. The effectiveness of the system is highly dependent on the quality and comprehensiveness of the task descriptions and input/output examples provided by the user.

Health Check
Last commit

2 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
866 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.