Solving the Issue of Discriminant Roughness of Heterogeneous Surfaces Using Elements of Artificial Intelligence