A unimodal problem has an objective-function landscape with one clear global optimum: one lowest valley for minimization or highest peak for maximization. Convex and concave functions are examples. section 2.1.2
Classify the landscape separately from the number of objectives:
- Multimodal problems contain multiple optima, so local search can encounter competing basins. section 2.1.2
- Deceptive functions combine a narrow global optimum with a strong, wide local basin that can mislead search. section 2.1.2
- Mono-objective optimization specifies one objective; unimodality instead describes the shape of that objective’s landscape. section 2.1.2
A bowl-shaped objective
The function x² + y² produces a simple unimodal surface: values rise away from the single optimum at the center. Plotting it beside multimodal and deceptive functions makes the landscape differences visible. section 2.1.2
Listing 2.1 Examples of objective functions
import numpy as np
import math
import matplotlib.pyplot as plt
def objective_unimodal(x, y): #1
return x**2.0 + y**2.0
def objective_multimodal(x, y): #2
return np.sin(x) * np.cos(y)
def objective_deceptive(x, y): #3
return (1-(abs((np.sin(math.pi*(x-2))*np.sin(math.pi*(y-2)))/
(math.pi*math.pi*(x-2)*(y-2))))**5)*(2+(x-7)**2+2*(y-7)**2)
fig = plt.figure(figsize = (25,25))
ax = fig.add_subplot(1,3,1, projection='3d')
x = np.arange(-3, 3, 0.01)
y = np.arange(-3, 3, 0.01)
X, Y = np.meshgrid(x, y)
Z = objective_unimodal(X, Y)
surf = ax.plot_surface(X, Y, Z, cmap=plt.cm.cividis)
ax.set_xlabel('x', fontsize=15)
ax.set_ylabel('y', fontsize=15)
ax.set_zlabel('Z', fontsize=15)
ax.set_title("Unimodal/Convex function", fontsize=18)
ax = fig.add_subplot(1,3,2, projection='3d')
Z = objective_multimodal(X, Y)
surf = ax.plot_surface(X, Y, Z, cmap=plt.cm.cividis)
ax.set_xlabel('x', fontsize=15)
ax.set_ylabel('y', fontsize=15)
ax.set_zlabel('Z', fontsize=15)
ax.set_title("Multimodal function", fontsize=18)
X, Y = np.meshgrid(x, y)
Z = objective_unimodal(X, Y)
ax = fig.add_subplot(1,3,3, projection='3d')
Z = objective_deceptive(X, Y)
surf = ax.plot_surface(X, Y, Z, cmap=plt.cm.cividis, antialiased=False)
ax.set_xlabel('x', fontsize=15)
ax.set_ylabel('y', fontsize=15)
ax.set_zlabel('Z', fontsize=15)
ax.set_title("Deceptive function", fontsize=18)
plt.show()
#1 Unimodal function
#2 Multimodal function
#3 Deceptive function
Inspect the Python listing to compare unimodal, multimodal, and deceptive objective-function surfaces. section 2.1.2
