Skip to content

EVOSEAL User Manual

Welcome to the EVOSEAL User Manual. This document provides comprehensive information about using EVOSEAL effectively.

Table of Contents

Installation

Prerequisites

  • Python 3.10 or higher
  • pip (Python package manager)
  • Git

Installation Steps

  1. Clone the Repository

    git clone https://github.com/SHA888/EVOSEAL.git
    cd EVOSEAL
    

  2. Set Up Virtual Environment

    python -m venv venv
    source .venv/bin/activate  # On Windows: venv\Scripts\activate
    

  3. Install Dependencies

    pip install -r requirements.txt
    

  4. Install in Development Mode

    pip install -e .
    

Project Structure

EVOSEAL follows a modular structure:

evoseal/
├── core/               # Core framework components
├── integration/        # Integration modules (DGM, OpenEvolve, SEAL (Self-Adapting Language Models))
├── models/            # Data models
├── providers/         # AI/ML model providers
├── storage/           # Data persistence
├── utils/             # Utility functions
└── examples/          # Example scripts and templates
    ├── basic/        # Basic usage examples
    ├── workflows/    # Workflow examples
    └── templates/   # Project templates

Basic Usage

Running Examples

EVOSEAL provides several example scripts to help you get started:

  1. Quickstart Example

    python -m evoseal.examples.basic.quickstart
    

  2. Logging Example

    python -m evoseal.examples.basic.logging_example
    

  3. Basic Usage Example

    python -m evoseal.examples.basic.basic_usage
    

Using Project Templates

Start a new project using our template:

# Copy the template to a new directory
cp -r evoseal/examples/templates/basic my_project
cd my_project

# Install dependencies
pip install -r requirements.txt

Configuration

Create a .env file in your project root with the following variables:

# Required
OPENAI_API_KEY=your_openai_api_key
ANTHROPIC_API_KEY=your_anthropic_api_key

# Optional
LOG_LEVEL=INFO
CACHE_DIR=./.cache

Configuration Files

EVOSEAL supports multiple configuration files for different environments: - config/development.json - Development settings - config/testing.json - Testing settings - config/production.json - Production settings

Basic Usage

Initialization

from evoseal import EVOSEAL

# Initialize with default settings
evoseal = EVOSEAL()

Running Evolution

# Define your task
task = "Create a Python function that implements quicksort"

# Run evolution
result = evoseal.evolve(
    task=task,
    max_iterations=50,
    population_size=10
)

# Access results
print(f"Best solution: {result.best_solution}")
print(f"Fitness score: {result.fitness}")
print(f"Iterations completed: {result.iterations}")

Advanced Features

Custom Fitness Functions

def custom_fitness(solution):
    """Evaluate a solution based on specific criteria."""
    score = 0

    # Example: Reward shorter solutions
    score += max(0, 10 - len(solution) / 100)

    # Add your custom evaluation logic here

    return score

# Initialize with custom fitness
custom_evoseal = EVOSEAL(fitness_function=custom_fitness)

Model Selection

from evoseal.models import OpenAIModel, AnthropicModel

# Use specific models
gpt4 = OpenAIModel(model="gpt-4")
claude = AnthropicModel(model="claude-3-opus")

# Initialize with custom model
evoseal = EVOSEAL(model=gpt4)

Checkpointing

# Save checkpoint
evoseal.save_checkpoint("checkpoint.pkl")

# Load checkpoint
evoseal.load_checkpoint("checkpoint.pkl")

Troubleshooting

Common Issues

  1. API Key Errors
  2. Ensure your API keys are set in the .env file
  3. Verify the keys have the correct permissions

  4. Installation Issues

  5. Make sure you're using Python 3.10 or higher
  6. Try recreating your virtual environment

  7. Performance Problems

  8. Reduce population size or number of iterations
  9. Use smaller models for faster iteration

Frequently Asked Questions

How do I improve evolution results?

  • Provide clear, specific tasks
  • Experiment with different population sizes
  • Adjust the number of iterations
  • Fine-tune the fitness function

Can I use my own models?

Yes! EVOSEAL supports custom model implementations. See the API reference for details.

How do I contribute?

Please see our Contribution Guidelines.

Support

For additional help, please open an issue on GitHub.


Last update: 2025-07-20
Created: 2025-06-17