NK model for multilevel adaptation