FoxtrotAI · Research Notes

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.

FoxtrotAI · July 2026 · 8 min read

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

A neat grid Largest ellipse that still fits: 23.6 cm² What the optimizer found Largest ellipse that still fits: 5.77 cm²
Left: fifteen circles in a regular grid. The rows align, so the gaps align, and an ellipse of 23.6 cm² fits in the lane between two rows. Right: the best arrangement our optimizer found. It has no rows and no symmetry. The largest ellipse that fits is a thin tilted sliver of 5.77 cm², roughly four times smaller.

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.

Food for thought

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.

14 circles Largest ellipse: 6.47 cm² 15 circles Largest ellipse: 5.77 cm² 16 circles Largest ellipse: 5.36 cm²
The best arrangements found for 14, 15, and 16 circles in the same 15 cm × 10 cm rectangle. The winning ellipse (orange) moves from a sliver along the top edge, to a steep tilted sliver in the middle left, to a wider diagonal pocket. The circle arrangements reorganize each time. There is no pattern that extends from one problem size to the next.

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.

10 20 30 40 50 1 5 10 15 20 25 30 35 15 circles: 5.77 cm² a three-parameter formula fits every point to within a few percent number of circles placed in the 15 cm × 10 cm box smallest achievable ellipse area (cm²)
Each orange point is the best arrangement found for that number of circles, with the resulting ellipse area in cm². The green line is a simple formula fitted to the points. It tracks them closely across the full range, from a single circle to a nearly full rectangle.

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.

Key takeaways

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.