Back to projects

Live demo

FamilyFitness

Why it’s useful

For roughly twenty years I have wanted to experiment with an evolutionary selection model of my own, but I kept getting stuck before I could turn the idea into working code. This project is proof that AI-assisted coding can help someone with a clear model in mind, but not enough current coding fluency to implement it quickly. It implements my FamilyFitness selection idea, creates a framework for comparing it with standard selection methods, and provides a small browser demo so the behavior can be inspected.

What it does

  • Runs genetic algorithm experiments with multiple selection methods.
  • Compares classic baselines with my custom-designed FamilyFitness lifecycle model.
  • Provides command-line and dashboard tools for repeatable comparison runs.
  • Provides a browser demo where compiled C++ genetic algorithm code runs through WebAssembly.

Current status / Next steps

Current status

  • Live browser demo at genetics.gavinnesom.com.
  • The public demo runs compiled C++ genetic algorithm code through WebAssembly.
  • The deeper project includes command-line experiments, CSV output, and Python/Streamlit dashboard analysis for larger comparison runs.

Next steps

  • Improve the comparison dashboard.
  • Add clearer charts to the web demo.
  • Make more problems selectable from the browser.
  • Investigate the behavior of the FamilyFitness selection method and tune GA hyperparameters.
  • Continue refactoring toward a more generic evolutionary-computation framework.

Build / Deployment

C++ · WebAssembly · JavaScript · Evolutionary algorithms · Vercel

FamilyFitness is both an experiment framework and a public browser demo. The deeper project includes a C++ genetic algorithm core, command-line experiments, dashboard analysis, and a WebAssembly-powered web demo.

Core engine

C++ code handles population setup, evaluation, selection, reproduction, mutation, and lifecycle behavior.

Web demo

The browser version runs compiled C++ through WebAssembly for the public demo.

Experiment tools

Command-line runs and a Python/Streamlit dashboard support visualization of results.

Architecture / How it works

C++ core

The project is intentionally split into layers. The central C++ code handles population setup, evaluation, selection, reproduction, mutation, aging, death, and generation-by-generation experiment flow.

Selection models

The framework supports classic fixed-size genetic algorithm baselines such as tournament and rank selection. FamilyFitness adds a lifecycle model with age, sex, family and lineage ideas, and population dynamics.

Framework direction

The framework is moving toward a cleaner structure where a problem, genome representation, decoder, selection method, and lifecycle model can be combined more flexibly.

Command-line runs

The command-line version is used for repeatable experiments. It can run configured experiments, set seeds, generate CSV outputs, and support larger comparison runs.

Dashboard

The Python / Streamlit dashboard inspects outputs from experiment runs and helps compare fitness curves, population behavior, and run outcomes.

Web demo

The web demo is intentionally smaller and more visual. It presents an interactive text-matching genetic algorithm so a visitor can type something in, press run, and immediately see evolutionary search happening.

Separate modes

The command-line tool is for serious experiment runs and batch output. The web demo is for explanation, portfolio value, and immediate visual feedback. Both should remain possible.

Design Principles

Fair comparison

  • Selection methods only mean something when they are tested against the same problems, settings, and run conditions.
  • GA hyperparameters such as population size, mutation rate, selection settings, and lifecycle rules can change behavior as much as the algorithm itself.

Measure, don’t just watch

  • A single successful run is not enough; repeated runs and telemetry make patterns easier to inspect.
  • Fitness curves, population behavior, and run outcomes matter more than a final score alone.

Two useful surfaces

  • The command-line tools are for repeatable experiments and larger comparison runs.
  • The browser demo is for making the core idea visible quickly, without exposing every experimental control.

Links