liveBook · Manning

Convex hull

As explained in Optimization Algorithms: AI techniques for design, planning, and control problems

The convex hull problem is the computational problem of finding the smallest convex boundary containing a given set of points.

A convex hull is the smallest convex polygon that encloses a set of points. Imagine stretching a rubber band around the outermost points: when released, it forms the boundary, while interior points remain inside. section 11.3.3

The hull is an ordered sequence of selected input points, and it may contain fewer points than the original set. A valid result encloses every point and uses the minimized outer boundary rather than cutting across the set or taking unnecessary detours. section 11.3.3

When treated as a sequential machine-learning problem:

  • An encoder RNN converts the input coordinates into a representation. section 11.9
  • A decoder applies content-based attention over the input points. section 11.9
  • A softmax distribution assigns probabilities to input positions, allowing the model to point to the next hull vertex. section 11.9

A learned hull for 50 points

A ConvexNet model predicts an ordered list of hull indices from a generated 50-point sample. In one displayed case, the predicted and true index sequences match exactly, producing 100% hull overlap; SciPy's ConvexHull provides the comparison.

How Optimization Algorithms: AI techniques for design, planning, and control problems covers it

How deep it goes
Explains geometric validity and a pointer-network implementation, including training and evaluation, but does not derive a classical geometric algorithm.
Examples
Uses rubber-band intuition, random two-dimensional datasets, index sequences, SciPy comparisons, and predicted-versus-true hull visualizations.
What it assumes
Assumes familiarity with sequences and neural networks while introducing the geometric hull intuition and pointer-based output selection.
What you can do after
Apply it via PyTorch and SciPy by training, testing, visualizing, and measuring a pointer-network hull predictor.
How it connects
Connects convex hulls to pointer networks, sequence-to-sequence models, recurrent neural networks, attention mechanisms, and combinatorial optimization.

Also explained in

Compare how 4 books explain convex hull →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Optimization Algorithms: AI techniques for design, planning, and control problems. The section links point to the parts of the book it draws on.