Every Warehouse Is a Slot Machine
A big-box retailer like Costco runs something close to 600 US warehouses. Each one is a controlled box: roughly the same square footage, the same core SKUs, a membership base that shops it on repeat. When merchandising picks where the rotisserie chicken goes, how the seasonal "treasure hunt" center aisles are laid out, or which endcap gets the impulse buy, they are making a bet.
Today that bet is usually made once, centrally, and rolled out to every warehouse at once. That is the most expensive way to be wrong. If the new layout underperforms, you've lost margin across all 600 locations for a full season before the sell-through report tells you.
But look at the structure again. Hundreds of near-identical locations, each producing a clean, high-volume reward signal every single day (sales, units per square foot, average cart value). That is the exact shape of a multi-armed bandit problem — and it's the argument for why algorithmic optimization belongs in physical retail, not just on websites.
Note
The figures in this article are illustrative. Costco is used as a familiar mental model for "a chain with many comparable locations and a strong reward signal" — the numbers are hypothetical, chosen to show how each method behaves, not to report real results.
The Vocabulary Translation
Everything Bandit does for a website maps cleanly onto a warehouse floor. The only thing that changes is what an "impression" and a "conversion" are.
On a website
- Arm = a page variant
- Impression = a visitor
- Reward = a conversion / revenue
- Traffic = users per day
In a warehouse
- Arm = a floorplan / placement variant
- Impression = a member visit
- Reward = cart value / units per sq ft
- Traffic = warehouses × daily footfall
An "arm" is any decision you want to optimize: the placement of a seasonal category, the adjacency of two departments, the width of the main power aisle, the position of the food court relative to the exit. A "reward" is whatever you're trying to grow — for most of this article, average cart value per visit, because it's directly tied to margin and it's measured at every register.
Try It Yourself: Costco Manager Simulator
Before we get to the algorithms, play the manager. You've inherited a store laid out by a central corporate rollout, and it's leaving money on the floor. Drag inventory out of the warehouse and onto the plan — you decide what to stock (there's more inventory than floor space, so some products stay in the back) and where it goes. There's a catch that makes this exactly like real merchandising: every change you ship takes a full quarter to read. You restock, you wait three months for the sell-through report, you restock again.
It's not just where — it's what. Front areas pull more traffic, some spots fit certain products, and neighboring areas share shoppers, so the best store is a joint call about selection and placement. See how many months it takes you to build the perfect store, then compare it to how fast a bandit gets there.
🛒 Costco Manager Simulator
Q0 · 0 mo elapsedYou run the whole store. Drag inventory from the warehouse onto the floor — you decide both what to stock (there's more inventory than floor space) and where it goes. Front areas get more traffic, some spots fit certain products, and neighbors share shoppers. Every change takes one quarter (3 months) to read.
Areas that touch on the plan share shoppers — placement next to the right neighbor pays off.
🏬 Warehouse — 2 not on the floor · drag onto the plan to stock (or drop a product here to pull it)
Feel how slow sequential search is? That's the whole point. You could only test one layout per quarter, because a single store can only be arranged one way at a time. The rest of this article is about what changes when you stop searching one layout at a time.
Approach 1: What a Classic A/B Test Gets You
Start with the tool most retailers already understand. Split the fleet: 300 warehouses keep the current layout (control), 300 get the new one (treatment). Run it for a full quarter so seasonality doesn't distort the read. Then compare average cart value.
This works. It produces a clean, defensible number with a confidence interval — exactly what you want when you're deciding whether to commit capital to a permanent remodel. But notice what it costs.
For an entire quarter, half of your warehouses are knowingly running whichever layout turns out to be worse — you just don't know which half yet. If the treatment wins by 4% on cart value, those 300 control warehouses left that 4% on the table for 90 days. If the control wins, the treatment warehouses did. Either way you paid for the losing side at full scale.
A/B testing also answers only one question at a time. You wanted to test three endcap strategies and two food-court positions? That's a multi-quarter roadmap of sequential tests, and the world will have changed by the time you finish.
Tip
A/B testing isn't wrong — it's the right tool when you need a precise, one-time, capital-grade decision ("do we spend $40M remodeling every warehouse?"). It's the wrong tool for continuous merchandising decisions you revisit every season.
Approach 2: A Multi-Armed Bandit Stops Paying for Losers
A bandit changes one thing: instead of holding the 50/50 split for the whole quarter, it continuously shifts more warehouses onto whichever variant is pulling ahead. Early on it explores — it keeps enough warehouses on each layout to learn. As the cart-value data accumulates, it exploits — moving the fleet toward the winner while still hedging against being wrong too early.
The simulation below runs a bandit against an A/B test on the same underlying variants. Watch the traffic-allocation and cumulative-reward panels.
A/B Test vs Bandit
Traditional A/B Test
Bandit (Thompson Sampling)
The gap between the two curves is regret — the reward you gave up by sending "traffic" (here, warehouse-days) to a variant that turned out to be worse. An A/B test's regret grows in a straight line, because it keeps half the fleet on the loser for the whole test. A bandit's regret bends and flattens as it converges.
For a fleet this size, that shaded area between the curves is real money. Every warehouse-day the bandit doesn't spend on the losing layout is cart value that lands in the register instead of in a slide deck three months from now.
And because a bandit doesn't need a clean two-way split, it handles many variants at once. Testing five endcap strategies isn't five sequential quarters — it's one experiment where the weak arms quietly starve and the strong ones get the fleet.
Warning
A bandit optimizes for reward earned, not measurement precision. If a regulator, a board, or a landlord needs a p-value on a specific comparison, run an A/B test for that decision. Use bandits where the goal is to keep making money while you learn.
Approach 3: The Funnel Algorithm — Optimizing the Whole Trip
Cart value isn't produced by any single endcap. It's produced by the whole trip: the member enters, gets pulled through produce, wanders the treasure-hunt center aisles, hits the essentials at the back, and passes the impulse zone before the registers. Each stage is a decision, and — this is the important part — decisions upstream change behavior downstream.
A more aggressive seasonal display at the entrance might spike engagement there but blow the member's budget before they reach the higher-margin center. Optimizing that one display in isolation would look like a win and quietly cost you money at the register. This is exactly the trap funnel experiments are built to avoid.
Funnel Optimizer
Landing Page
Sign Up
Headline Copy Test
Activation
Onboarding Flow Test
Purchase
Pricing Page Test
Bandit's funnel algorithm treats the store as a linked sequence. Each stage runs its own bandit over its own variants, but the reward signal comes from the end of the trip, not the middle.
Entrance / Seasonal
layout variants
Produce & Fresh
adjacency variants
Center 'Treasure Hunt'
rotation variants
Checkout / Cart Value
reward source
The reward signal: deviation from that store's own average
Here's the design choice that makes this work for a physical chain. You can't compare a warehouse in suburban Dallas to one in urban Seattle on raw cart value — their baskets, incomes, and product mixes differ. So the reward isn't the absolute number. It's the positive (or negative) deviation from that store's own trailing average cart value.
- A layout variant that pushes a warehouse's average cart value above its own baseline earns a positive reward — the algorithm leans into it.
- A variant that drags cart value below baseline earns a penalty — the algorithm pulls the fleet off it.
Naive reward (raw cart value)
- Rich stores always 'win'
- Poor stores always 'lose'
- Confounds location with layout
- Optimizes for demographics, not merchandising
Deviation-from-baseline reward
- Each store graded on its own curve
- Isolates the layout's true effect
- Fair across the whole fleet
- Optimizes for the decision you control
Because every warehouse is scored against itself, all 600 become directly comparable contributors to the same experiment — even though no two are alike. A layout only rises to the top if it beats baseline in Dallas and Seattle and Miami. That's a far stronger signal than any single-store pilot could ever produce.
Where This Really Pays Off: Seasonality, Handled Automatically
The single biggest reason to prefer a bandit over a fixed test in retail is that retail is never stationary. Patio furniture in June is a different business than patio furniture in November. Back-to-school, Thanksgiving, the January health reset — the "best" layout is a moving target.
A one-shot A/B test gives you the winner for the window you tested. By the time it rolls out, the season has moved and you're optimizing for the past.
A bandit never stops updating. When demand shifts, the reward signal shifts with it, and the algorithm re-allocates the fleet on its own — no new test to design, no analyst to convene.
You can push this one step further with a contextual bandit. Instead of learning one global winner, it learns which layout wins in which context — feeding season, region, weather, and local calendar in as features. Now the algorithm can run the outdoor layout in Phoenix while the same week runs the gifting layout in Minneapolis, because it has learned the interaction, not just the average.
That wide amber curve is the mechanism behind automatic seasonal adaptation: a freshly introduced layout carries high uncertainty, so the algorithm deliberately gives it more warehouses to learn from — then narrows in as the reward data comes back.
Why Physical Retail Is Almost the Perfect Bandit Environment
Websites often struggle with bandits because they don't have enough traffic to learn quickly. A large warehouse chain has the opposite problem — it has abundant, clean signal:
Massive parallel sample
600 warehouses × daily footfall = signal a website would take months to gather.
Comparable units
Near-identical box size and core SKUs make cross-location comparison valid.
A hard reward at the register
Cart value is measured exactly, every transaction, no attribution guesswork.
Repeat, identified members
Membership means you can track trips over time, not just anonymous visits.
Physical changeover cost
Moving fixtures isn't free — favor bandits that don't thrash between variants.
Slower feedback loop
A trip takes an hour, not a click — reward arrives in days, so let it converge.
The physical constraints are real — you can't re-plan a warehouse every night, and shifting fixtures costs labor. But that argues for how you tune the algorithm (favor smoother allocation, longer evaluation windows), not whether to use one. The fundamentals — many comparable arms, a clean reward, more signal than any single test could use — are exactly what bandits are built for.
Putting It Together
The progression tells the whole story of why algorithmic optimization beats static testing:
- A/B testing gives you one trustworthy answer per quarter — and makes half your fleet run the losing layout while you wait for it.
- A multi-armed bandit stops paying for losers: it shifts warehouses toward the winner as it learns, compares many layouts at once, and slashes the margin you leave on the table.
- The funnel algorithm optimizes the entire trip instead of one endcap, using each store's deviation from its own average cart value as a fair, location-neutral reward.
- Seasonality is handled for free, because a live algorithm re-weights the fleet the moment demand shifts — and a contextual bandit can even learn which layout wins in which region and season.
None of this requires a new kind of data. It requires treating every location as a live experiment and every register as a reward signal — which is precisely what a warehouse chain already is. The only question is whether that signal drives the layout automatically, or sits in a report that's already out of date.
That's the whole value proposition of Bandit: turn the reward you're already measuring into the decisions you're already making — continuously, at the scale of your entire fleet.
Ready to try algorithmic testing?
Stop wasting traffic on losing variants. Bandit's multi-armed bandit algorithms automatically shift traffic to your best-performing treatments in real time.
Start free