Implemented evolution algorithm