Skip to content

Tutorials

Welcome to the EvoToolkit tutorials! These step-by-step guides will help you master evolutionary optimization with LLMs.


Getting Started

New to EvoToolkit? Start here:

  1. Installation - Set up your environment
  2. Getting Started - Run your first optimization in 5 minutes
  3. Scientific Regression Tutorial - Deep dive into a complete example

Tutorial Categories

Built-in Tasks

Learn how to use EvoToolkit's pre-built optimization tasks:

Customization

Extend EvoToolkit for your specific needs:

Advanced

Master the low-level APIs:


Tutorial Overview

Tutorial Level Time Topics Covered
Scientific Regression Beginner 20 min High-level API, real datasets, equation evolution
Prompt Engineering Beginner-Intermediate 20 min LLM prompt optimization, task performance
Adversarial Attack Intermediate 25 min Evolving adversarial examples, attack algorithms
CUDA Tasks Advanced 30 min GPU optimization, CUDA kernels, performance
Custom Tasks Intermediate 20 min Creating tasks, evaluation, custom fitness
Customizing Evolution Intermediate-Advanced 30 min Prompt engineering, custom algorithms, Interface development
Advanced Usage Advanced 25 min Low-level API, custom configs, debugging

Quick Reference

Common Workflow Patterns

Pattern 1: Basic Optimization

import evotoolkit
from evotoolkit.task.python_task import EvoEngineerPythonInterface

interface = EvoEngineerPythonInterface(task)
result = evotoolkit.solve(interface, './results', llm_api)

Pattern 2: Algorithm Comparison

algorithms = [
    ('EoH', EoHPythonInterface(task)),
    ('EvoEngineer', EvoEngineerPythonInterface(task)),
    ('FunSearch', FunSearchPythonInterface(task))
]

for name, interface in algorithms:
    result = evotoolkit.solve(interface, f'./results/{name}', llm_api)

Pattern 3: Custom Configuration

from evotoolkit.evo_method.evoengineer import EvoEngineer, EvoEngineerConfig

config = EvoEngineerConfig(
    interface=interface,
    output_path='./results',
    running_llm=llm_api,
    max_generations=20,
    pop_size=10
)

algorithm = EvoEngineer(config)
algorithm.run()

Downloadable Examples

All tutorial code is available as standalone Python scripts in the examples/ directory:

  • examples/scientific_regression/ - Scientific equation discovery
  • examples/custom_task/my_custom_task.py - Custom task implementation
  • examples/cuda_task/kernel_optimization.py - CUDA kernel optimization
  • examples/advanced/low_level_api.py - Low-level API usage

Clone the repository to get started:

git clone https://github.com/pgg3/evotoolkitkit.git
cd evotool/examples

Need Help?

Documentation & Resources

Community Support

Direct Contact

  • Email: pguo6680@gmail.com

Video Tutorials

Coming soon! Subscribe to our YouTube channel for video tutorials.