Why Optimization Requires Automation: The Curious Case of Fifteen Circles in a Rectangle
A small geometry puzzle provides insights into the nature of complex optimization problems.
Maximizing profit in Amazon's marketplace is complex. A geometry problem shows why.
Optimization problems of the kind FoxtrotAI works on, maximizing profit across a catalog where prices and advertising interact, are inherently complex. When such problems are managed manually, it is reasonable to reach for benchmarks: hold ACOS under a threshold, keep TACOS near a target, and adjust every so often. Benchmarks are legible, comparable across accounts, and practical to operate by hand.
The true optimum, however, tends to have a different character. It is irregular rather than uniform. It can change substantially even when conditions change only slightly. And it is difficult to manually find or maintain without computational search. FoxtrotAI's optimization engine works hard to find the optimal strategy for sellers. Even when the headline profit number shifts a little, FoxtrotAI does a lot of work to keep profit where it is. It is hard to properly visualize this in a noisy business setting like Amazon's complex marketplace.
So we studied a deceptively simple geometry problem that, while completely different, gives a sense for what FoxtrotAI does under the hood.
The problem
Take a rectangle, 15 cm by 10 cm. Place 15 circles inside it, each 1 cm in radius, with no two overlapping. Think of them as coins. They may be positioned anywhere.
Once the circles are placed, an adversary draws the largest ellipse (kind of like a pressed penny) that fits inside the rectangle without crossing any circle. Any position, any size, any orientation, any elongation.
Your objective is to place the circles so that the largest ellipse the adversary can draw is as small as possible. The circles block; the ellipse measures whatever they failed to block.
The natural response to a problem like this is to cover the rectangle evenly: rows, or a grid, or a staggered packing. But ellipses are shifty. They may be long and thin. Any straight lane left open, however narrow, admits a sliver of an ellipse running end to end, and such slivers carry more area than one would guess.
A surprising finding
We evaluated circle arrangements a careful person would propose: grids, hexagonal packings, evenly spread layouts, staggered rows. They allow an adversary to place ellipses with areas between 11 and 23 cm².
Take an arrangement where the circles are arranged in a grid for example. The grid fails for a structural reason: regular arrangements create aligned gaps where the adversary can place a very long ellipse.
An optimizer we built specifically for this problem did a more intensive search. The optimizer found an arrangement of circles that at most allows a 5.77 cm² ellipse. It was produced by a search over billions of candidate configurations. The arrangement it found is highly irregular; each circle sits where it does because it closes a lane that would otherwise open for a long skinny ellipse.
A uniform rule such as "hold every product at 30% ACOS" has the character of the grid: one tidy constraint, applied evenly, producing aligned gaps. The profit-optimal configuration of prices and bids across a catalog is more likely to resemble the irregular arrangement. It looks inconsistent from product to product, and that apparent inconsistency is what captures the value a uniform rule cannot.
The optimum is fragile
A natural assumption is that the optimal arrangement for 16 circles is the optimal arrangement for 15 with one circle added in a gap. That is not what we observe.
The best 16-circle arrangement is a different arrangement. The circles shift, the structure reorganizes, and the adversary's best ellipse moves to a different part of the rectangle, at a different angle, with different proportions. The same holds in the other direction at 14.
The optimum, in other words, is fragile: a small change to the problem produces a large change to the solution. Solving a problem once and assuming the optimal solution persists as conditions change is not a winning strategy. In a messy environment like Amazon's marketplace, the optimal strategy is always shifting even with seemingly slight changes.
Fragile solutions, regular values
Behind the fragility there is an interestingly stable pattern. While the specific arrangements are unstable from one problem size to the next, the value of the optimum is remarkably regular.
Plotting the smallest achievable ellipse area against the number of circles produces a curve smooth enough that a three-parameter formula fits all 35 points to within a few percent.
It's important to note that the curve states what is achievable but not how to achieve it. Knowing that 16 circles should hold the ellipse to about 5.36 cm² provides no assistance in actually placing the 16 circles. The value is predictable; the solution must be recovered by search, at every problem size.
This asymmetry describes the problem FoxtrotAI is built around. Each seller's business has its own version of the curve: a level of maximum profit that a well-optimized account, in its particular category, at its cost structure, with its reviews, should be able to reach in different external conditions. FoxtrotAI's aim is to learn where that frontier sits for each seller from their own accumulating data, and then to move the account toward it steadily, one price and one bid decision at a time. Reaching that frontier requires an exhaustive search process that never stops, because the problem does not hold still. Even when it looks like the conditions have shifted a little and profit has moved a little, behind the scenes, FoxtrotAI is working hard to move the account towards optimum profitability.
- A neat grid of 15 circles concedes a 23.6 cm² ellipse. The best arrangement found by search concedes 5.77 cm², about four times less, and it looks random.
- Uniform rules, like one ACOS target for every product, are the grid: tidy, legible, and far from optimal. The optimal configuration looks inconsistent from product to product, and that inconsistency is where the value is.
- Change the problem slightly (14, 15, 16 circles) and the whole optimal arrangement reorganizes. Set-and-forget fails the same way in a marketplace that never holds still.
- The achievable value follows a smooth, predictable curve even though the winning arrangement never does. In seller terms: profit at the frontier looks steady while the prices and bids that hold it there keep changing. That never-ending search is what FoxtrotAI automates.
The puzzle is a min-max problem: place the circles to minimize the area of the largest ellipse that avoids them. A full technical write-up is available on request.