All labs
Interactive companion · Every algorithm family in the book

The Treasure-Hunting Mission

Searching for an optimal solution is like hunting for pirate treasure on an island. You and your friends are the search agents, and every part of the book gives you a different way to search. Pick a hunting strategy, press Run, and watch it work on the same island.

Based on Alaa Khamis, Optimization Algorithms: AI techniques for design, planning, and control problems, Manning, 2024.

Ready
Island: feasible search space, shaded by elevation (the objective) Active volcano: infeasible region X: the treasure (global optimum) ▲ Lower hills: local optima

Expedition log

Every finished attempt is logged here, so you can compare strategies on the same island. "Spots checked" counts objective evaluations: how many places a hunter had to inspect.

#StrategyPartOutcomeSpots checkedBest elevation

The metaphor, decoded

On the islandIn optimization
The whole island except the active volcanoFeasible search space
The active volcano (and the sea)Infeasible region: violates a constraint
The treasure, marked XThe optimal solution (global optimum)
Elevation, because pirates hid treasure on high spotsThe objective function to maximize
Lower hills such as Parrot HillLocal optima that can trap a search
You and your friendsSearch agents
Strength of the metal detector signalReward signal for learning-based methods
Records of earlier treasure huntsHistorical data to train a predictive model

Fire Mountain is the highest point on the island, but it is an active volcano, so it can never be the answer. This is why constraints matter: the best feasible solution is not always the highest point overall.