NK model generator.