Local Search and Genetic Algorithms

In Chapter 2 we said "learning is search." That chapter cheated a little: squared error has a perfectly smooth, bowl-shaped landscape, so calculus jumped straight to the bottom. This chapter covers what to do when the landscape is rough, the gradient is unavailable, or the space is huge and discrete.

Many real problems look like this:

  • Schedule exams for 3,000 students with no clashes (discrete, astronomically many options).
  • Find the layout of a delivery route visiting 30 hostels (travelling salesman).
  • Tune a model's weights when you can only query its error from a server: a black box with no gradient. This is the MDL genetic-algorithm assignment.
  • Choose which of 20 orders Bolt should carry tonight (knapsack).

All of these share one structure: there is a state (a candidate solution), an objective that scores it, and a notion of neighbouring states. We don't care about the path to the answer, only the answer itself. That is what makes a problem a local search (or optimization) problem.

Bolt's problem

Bolt's predictor runs on a microcontroller. The engineers have an overfit 11-weight polynomial (degree 10) and a server that, given any weight vector, returns its training and validation error. There's no gradient and no access to the data, and every query costs time. Can we search the 11-dimensional weight space intelligently enough to find a vector that generalizes?