Kauffman NK Fitness Landscape

N genes each depending on K others — random boolean epistasis. Higher K = more rugged landscape.


Parameters

How it works

Each of N genes has a binary state (0/1).
Gene i's fitness depends on itself + K others, sampled from a random boolean lookup table.
Total fitness = average over all gene contributions.

K=0: smooth single peak.
K=N-1: fully random, many local optima.