easyiec: interactive evolutionary computation with human, simulated and AI evaluators#

easyiec

easyiec optimizes things whose quality is judged rather than computed — a controller response, a fermentation profile, a photo grading, a fractal, a colour palette, a melody, a slogan. An evolutionary algorithm proposes candidates, an evaluator chooses among them. The package is the Python successor of the EASY-IEC MATLAB toolbox (Madár, Abonyi and Szeifert, 2005) and extends it with a broad set of interactive algorithms, with evaluators that range from people to simulated users and vision–language models, and with the statistics needed to decide whether an AI judge may stand in for people.

Seven ways to answer

Select, rank, rate, pairs, best–worst, slider and direct edits; every answer becomes weighted pairwise preferences.

Seven ways to answer: feedback protocols
Interactive algorithms

GA, the EASY-IEC evolution strategy, CMA-ES, PSO, pairwise DE, MAP-Elites, NSGA-II, preferential BO, sequential line search and gallery, surrogates.

Interactive algorithms
AI judges

Claude, OpenAI-compatible, Gemini and Ollama models judge images and texts with order debiasing, JSON answers, rationales and a disk cache.

An AI judge in the loop: prompts, images and debiasing
Hybrid evaluation

The AI answers, a person decides when the AI is unsure — under a fixed, a rate-controlled or a calibrated risk-control threshold.

Hybrid evaluation: the AI answers, people decide the hard cases
Validating evaluators

Psychometric audits, swap and transitivity tests, the alternative annotator test, prediction-powered inference, judge-substitution studies.

Validation and benchmarking
Simulated users

Thurstonian and BTL choice models with fatigue, lapses, position bias, drift, comments and edits: benchmarks with a known ground truth.

Simulated users: benchmarking with a known ground truth
25 problems

PID and CSTR control, beer fermentation, fuzzy partitions, paths, photo enhancement, segmentation, fractals, CPPNs, design, music, text.

Search spaces and the problem zoo
Notebook galleries

Click through galleries in Jupyter or Colab, with AI suggestions, a gene editor and comments such as “much brighter, slightly less contrast”.

AI judges, people and notebooks
The book

Interactive Evolutionary Computation in Python: methods, algorithms, validation and case studies in one notation (CC BY 4.0).

The book

A first session#

import easyiec as ei
from easyiec.problems import JuliaSet
from easyiec.strategies import InteractiveGA

ei.ui.JupyterGallery(JuliaSet(), InteractiveGA(pop_size=9))      # you choose

user = ei.SimulatedUser(JuliaSet(), target="random", seed=1)     # or a simulated user
result = ei.run(JuliaSet(), InteractiveGA(), user, generations=12, seed=1)
ei.viz.plot_anytime(result)