Chapter 7
Visualizing interactive search
An interactive session is short, noisy and shaped by a person, so its course is worth seeing: what was shown, what was chosen, where the population went, how fast it improved and at what cost. This chapter presents the views of easyiec.viz grouped by the question they answer — what the evaluator saw, how the population moved, how fast and at what effort the search progressed, and what the strategy and the evaluator did — and the reports and animations that summarize a session.
7.1 What the evaluator saw
plot_gallery draws a list of candidates with optional labels and frames for chosen and kept ones; plot_history stacks selected galleries of a session into a film strip (fig. 1.2), and animate_session writes all galleries into an animated GIF. These are the views to show a person who did not attend the session, and the first to check when a curve looks odd: a gallery full of near-copies explains a stalled search better than any statistic.
7.2 How the population moved
Genealogy and lineage. Every individual records its parents and its origin — initial, crossover, mutation, recombination, edit, immigrant — so a session is a directed acyclic graph. plot_genealogy places the shown individuals by generation and draws the parent links; chosen individuals are filled and the line of descent of the best individual is drawn thick (fig. 7.1). plot_lineage shows the phenotypes along that line, from the initial population to the final best.
Maps. plot_embedding projects the shown genomes — or their phenotype features — into the plane by principal component analysis, classical multidimensional scaling [63] or t-SNE [64], coloured by generation or by true utility, with the chosen individuals circled and the best lineage drawn as a path. The map shows whether the search converged, wandered or jumped between regions.
Gene trajectories and diversity. plot_gene_trajectories plots the normalized genes of the chosen individuals over the queries (fig. 7.2): genes that settle early are those the evaluator cares about; genes that keep wandering are irrelevant to the evaluator — or decided last. plot_diversity plots the mean normalized distance between the shown candidates per query; a fast drop warns of premature convergence (fig. 3.1).
7.3 How fast, and at what effort
The anytime curve (plot_anytime) plots the best true utility of the shown candidates against an effort measure, with the utilities of all shown and chosen candidates as dots (fig. 1.3); plot_convergence averages the curves of many runs on a common effort grid, with bootstrap confidence bands. The choice of the effort axis matters. Items shown is the classical IEC measure; queries count interruptions; elementary decisions count judgements and make galleries, duels and sliders comparable (fig. 7.4); human answers and dollars count what a hybrid evaluator spends. plot_utility_by_step shows the distribution of the true utilities in each gallery, with the chosen ones marked: it reveals whether the evaluator chose the best candidates, and whether a surrogate filled the gallery with good ones (fig. 7.3).
7.4 What the strategy and the evaluator did
plot_strategy_state draws the internal state of a strategy: the principal axes of the CMA-ES search distribution, the swarm of the PSO with its velocities, the step sizes of an evolution strategy, the archive of MAP-Elites (fig. 3.3). plot_preference_landscape draws a two-dimensional slice of a learned utility with the observed points (fig. 4.2); plot_pareto the objective space of a multi-objective problem (fig. 3.5). The evaluator has its own views, used throughout chapters 5 and 6: agreement heatmaps, psychometric curves, position-bias bars, judge-audit dashboards, escalation timelines with the threshold and the human share, calibration diagrams, panel vote shares and critical-difference diagrams.
7.5 Reports
session_report writes a self-contained HTML file: the settings of the session, a summary table (queries, items, decisions, human answers, cost, best true utility), the film strip, the anytime curve, the genealogy, the map, the gene trajectories and, for AI and hybrid evaluators, the escalation timeline and the position-bias diagnostic. A report is the natural attachment of an experiment log or of a design decision made with IEC.
ei.viz.session_report(result, "cppn_report.html", evaluator=user, title="CPPN art with a simulated user") ei.viz.animate_session(result.log, problem, "cppn_session.gif", max_items=9, tile=96) print(burden(result.log))
In a nutshell: Visualizing interactive search
- Galleries, film strips and animations show what the evaluator saw.
- Genealogies, lineages, maps, gene trajectories and diversity curves show how the population moved.
- Anytime and convergence curves against items, queries, decisions, human answers or dollars show progress at a stated effort.
- Strategy states, preference landscapes, Pareto plots and evaluator diagnostics show what happened inside; HTML reports collect it all.