When your AI starts fighting itself: the curious problem of competing eCommerce optimisation
TL;DR
Difficulty: Intermediate
- When rival shops run identical optimisers on the same search terms, each one rationally bids up until a click costs almost what it is worth. A prisoner's dilemma, and the auction keeps the difference.
- Real differences (delivery, margins, who converts where) break the tie, as long as each shop is optimised on its own data.
- A platform that holds rivals' bids down, shares their data or divides customers between them is in cartel territory, whatever the maths says.
- Before you trust any optimiser, ask what happens when your competitors use the same system.
While building GrowCentric.ai I hit a proper head scratcher: what if three rival shops selling the same product all use the same optimising algorithm? In this article I work through what happens, from the bidding war and the Nash equilibrium to learning agents that chase a moving target, and show where a clever optimiser crosses the competition law line.
The problem: one algorithm, three rival shops
While building GrowCentric.ai, I stumbled across a proper head scratcher. The platform uses machine learning to optimise eCommerce marketing. It analyses a shop's catalogue and finds the products with the best profit potential. It looks at shipping costs and speeds, because free next day delivery is gold dust. It adjusts ad spend automatically across Google, Meta and wherever else the shop advertises, and it reacts to what competitors are doing. It also finds the hidden gems, products that could be selling far better than they are.
Then something dawned on me. What if three shops sell the same cordless vacuum, all three offer free next day delivery, all three use the same platform, and all three want the same customers? The algorithm's job is to maximise profit and growth for each of them. It would be playing chess against itself, three times over.
That is the multi agent problem: several optimisers, each doing its job well, in one shared market. What happens next is not what most people expect, and part of it is a competition law question. This article walks through the game theory, the learning maths and the legal line, with worked examples. The shops and numbers in the examples are invented so I can show every step. Nobody real, no client.
The prisoner's dilemma explains why sensible bidders hurt each other
The prisoner's dilemma came out of the RAND Corporation around 1950. Merrill Flood and Melvin Dresher built the game, and Albert Tucker gave it the story about prisoners.1 Two suspects are questioned separately. If both stay quiet, each gets a year. If one grasses and the other stays quiet, the grass walks free and the other gets ten years. If both grass, each gets five.
Whatever the other does, grassing is better for each one alone. So both grass and both get five years, when both staying quiet would have cost them one. Individually rational, collectively worse. I build the idea from scratch, with a pricing example, in my article on game theory in pricing.
Advertising is the textbook case. When rivals mostly win customers from each other, every pound one spends forces the other to spend a pound to stand still. The 1970 US ban on cigarette advertising on television is the classic natural experiment. One study of it found that restricting advertising reduced competition between the cigarette firms.2 In other words, a good part of the spending looks like rivals fighting each other for the same smokers, and the law stopped an arms race none of them could stop alone.
Now replace two tobacco boardrooms with three identical algorithms that adjust bids for every auction, all day.
Worked example: two shops and one search term
Two invented online shops sell the same cordless vacuum at £399: Kirkstall Home in Leeds and Ancoats Appliances in Manchester. Both offer free next day delivery. The example rests on three assumptions, stated so you can change them.
- Each sale earns £60 of contribution before advertising.
- Each shop converts 2.5% of its ad clicks into a sale.
- About 1,000 clicks a week are available on the search term they both want.
First, what is one click worth to each shop? The expected value of a click is the conversion rate times the contribution per sale.
Here is the value of one click in pounds, is the conversion rate as a share of clicks and is the contribution per sale before advertising. A click is a bet, and is its average payoff (Foundations: expected value, and for the rate itself Foundations: ratios and rates).
For both shops, . Any click bought below £1.50 makes money on average, any click above it loses money.
Each shop's optimiser can hold its bid down or push it up. Assume these outcomes for a week.
Both hold: each gets 500 clicks at £1.00. Profit for each is .
One pushes, one holds: the pusher gets 850 clicks at £1.10, so . The holder gets 150 clicks at £1.00, so .
Both push: each gets 500 clicks, but each now pays £1.30 because the other's bid is right below it. Profit for each is .
| Ancoats holds | Ancoats pushes | |
|---|---|---|
| Kirkstall holds | £250, £250 | £75, £340 |
| Kirkstall pushes | £340, £75 | £100, £100 |
Kirkstall chooses the row and Ancoats the column, and the first number in each cell is Kirkstall's. Read Kirkstall's options. If Ancoats holds, pushing pays £340 against £250. If Ancoats pushes, pushing pays £100 against £75. Pushing wins either way, the same holds for Ancoats, and both land on £100 a week instead of £250. The auction does well out of it: it sells the same 1,000 clicks for instead of .
How a bidding war runs, step by step
The price rising when both push is not an invention for the example. Google describes the actual cost per click as what is minimally needed to clear the Ad Rank thresholds and beat the Ad Rank of the competitor immediately below you, and if nobody is below you, you pay only the reserve price.3 So a rival's bid right under yours raises your price, and yours raises theirs. I explain the whole auction in auction theory for paid media.
Speed matters too. Google's Smart Bidding strategies set bids in every auction, a feature Google calls auction time bidding.4 Two automated bidders can walk each other up far faster than a person reviewing a weekly report would notice.
The flow reads from the first bid rise down to the point where the escalation stops. The takeaway is the decision box: with identical shops, nothing stops the loop until the price of a click nearly reaches what the click is worth. That is the same logic as a Bertrand price war, which I work through in strategic interaction models.
Worked example: add a third identical shop
Clifton Electricals in Bristol joins with the same vacuum, the same delivery and the same numbers. With three identical optimisers and a click worth £1.50 to each, every shop that is undercut has a reason to bid a little more, as long as the price is below £1.50.
Suppose the escalation settles at £1.45 a click, with the 1,000 clicks split roughly evenly, about 333 each. Each shop earns a week. The auction takes . The shops have handed almost the whole value of the click to the auction, and each optimiser did exactly what it was told.
A Nash equilibrium is stable, which is not the same as good
The point where the war stops has a name. A Nash equilibrium is a set of strategies, one per player, where nobody can do better by changing only their own strategy.5 John Nash proved in 1950 that every finite game has at least one, once players are allowed to mix their moves at random.5
Here is the payoff of player (for a shop, its profit), is player 's equilibrium strategy, is the equilibrium strategies of everyone else, and is any other strategy player could pick. The inequality says: holding everyone else fixed, no alternative pays player more. A payoff table is a grid of these numbers (Foundations: matrices).
Worked example: testing the four cells
Take the two shop table. Test each cell by asking each shop: if I switched and the other did not, would I earn more?
Both hold (£250, £250): Kirkstall would switch to push and earn £340. Not stable.
Kirkstall pushes, Ancoats holds (£340, £75): Ancoats would switch to push and earn £100 instead of £75. Not stable.
Kirkstall holds, Ancoats pushes (£75, £340): Kirkstall would switch and earn £100. Not stable.
Both push (£100, £100): if Kirkstall switched to hold it would earn £75, and the same for Ancoats. Nobody gains by moving alone. This is the Nash equilibrium.
So the equilibrium is the worst cell for the two shops together, £200 a week between them.
Pareto efficiency asks whether anyone could be better off
Economists judge outcomes by Pareto efficiency. One outcome is Pareto superior to another when at least one player is better off and nobody is worse off. Staying in a Pareto inferior outcome wastes something.6
Here is the outcome being judged, is any other possible outcome, is the payoff player gets in , and is a player who would be strictly better off. If such a exists, wastes value. The payoffs are the cells of the same grid (Foundations: matrices).
The gap between the two ideas is the whole problem, and it is the heart of my game theory article. Nash tells you where self interest settles. Pareto tells you whether that place is any good.
Worked example: is both push efficient?
Compare both push (£100, £100) with both hold (£250, £250). In both hold, Kirkstall gets more () and Ancoats gets more (). So both hold is Pareto superior, and the equilibrium is Pareto inefficient. Between them the shops lose a week, and the auction gains . The money did not vanish. It moved.
The tempting conclusion is that the platform should simply put both shops in the both hold cell. That is exactly where the law comes in.
Small differences break the tie
Total uniformity is rare. One shop has better supplier terms, another a warehouse nearer some postcodes, a third a loyal customer base. Every difference changes the value of a click, and so changes what each optimiser rationally does.
Worked example: Kirkstall charges for delivery
Kirkstall now charges £3.50 for delivery while the other two stay free. Assume its conversion rate falls to 2.0% and it keeps the £3.50, so its contribution per sale rises to £63.50.
Its value per click is .
At a contested price of £1.30, Kirkstall loses on every click. At £1.00 it makes . Its own optimiser, reasoning only from its own numbers, stops pushing on this product and moves budget to products where it is stronger. The fight on the vacuum is now two way, Ancoats against Clifton, instead of three way.
Worked example: each shop wins its own segment
The algorithm learns patterns over time. Say Kirkstall converts 3.0% of clicks on mobile and 2.0% on desktop, and Ancoats is the reverse, 2.0% on mobile and 3.0% on desktop. Contribution is £60 per sale for both.
Kirkstall values a mobile click at and a desktop click at . Ancoats values a mobile click at £1.20 and a desktop click at £1.80.
Each optimiser, using only its own shop's data, bids up to its own value. On mobile, Ancoats stops below £1.20 and Kirkstall can afford more, so Kirkstall wins most mobile clicks and pays roughly what it takes to beat Ancoats, say £1.15, keeping a click. On desktop the same happens the other way round. Nobody agreed anything. Each shop followed its own strength, and both do far better than in the head to head war.
This is the healthy version of differentiation: optimise each shop for its own position, not each product for a generic shop. Questions like who converts where are the bread and butter of data science for growth.
The overlap never disappears entirely. If both shops want the same 10,000 people for the same product, there is a war in that overlap zone, however distinct the rest of their customers are. Differentiation shrinks the battlefield. It does not abolish it.
Learning agents chase a target that keeps moving
The technical field for many learning optimisers in one market is multi agent reinforcement learning. Its central difficulty is that from each agent's point of view the world is nonstationary: when the other agents adapt their strategies, the learning target moves.7 When Ancoats changes strategy, the market Kirkstall's optimiser learned from no longer exists.
Researchers handle this in roughly three ways.
- Independent learning. Each agent learns as if the others were part of the scenery. Simple, and it is the case where the moving target problem bites hardest. Standard Q learning is, in the words of one paper, challenged by this inherent nonstationarity.8
- Centralised training with decentralised execution. The agents are trained together, taking each other's policies into account, and then act on their own.8 It is promising, and for rival businesses it is also the alarm bell: training together means the trainer sees everyone's data.
- Mean field methods. With many agents, each one responds to the average effect of the population rather than to every rival individually.9 Useful when there are dozens of competitors and none matters much alone.
Worked example: two optimisers that keep overreacting
Take the two shop table and give each optimiser a naive rule: each week, copy whatever would have been best against the rival's move last week.
Week one, both hold. Each sees that pushing would have paid more against a holder (£340 against £250), so in week two both push.
Week two, both push. Each sees that against a pusher, pushing was still best (£100 against £75), so both push again in week three, and every week after.
The naive learners walk straight into the equilibrium and stay there. A smarter learner that remembers the past can do something else, and that is the next problem.
The elephant in the room: algorithms can collude
If the optimisers learn that everyone does better when bids and prices stay calm, is that collusion? Competition authorities take the question seriously. In July 2024 the UK Competition and Markets Authority (CMA), the European Commission, the US Department of Justice and the US Federal Trade Commission signed a joint statement on AI. It names the risk that algorithms can allow competitors to share competitively sensitive information, fix prices, or collude on other terms or business strategies.10
The CMA's own paper on algorithms describes three ways it can happen.11
- Algorithms that enforce an explicit agreement between firms.
- Hub and spoke: several firms use the same algorithmic system, the same software or a common intermediary to set prices, which can facilitate information exchange.
- Autonomous tacit collusion: pricing algorithms learn to collude without any other information sharing.
The third is not science fiction. In a simulated market, AI pricing agents based on Q learning consistently learned to charge prices above competitive levels without communicating, held up by strategies that punished a price cut for a while and then gradually returned to cooperation.12
The first already has a British case. In 2016 the CMA fined an online seller over £160,000 for agreeing with a competitor not to undercut each other on Amazon's UK site, an agreement they ran through automated repricing software. Both were small businesses, and the guidance is plain that fines can reach 10% of turnover, with personal fines, director disqualification and even jail for individuals.13
Hub and spoke is the one that matters for a platform like mine, and for any shop running algorithmic pricing software. The US case against RealPage is the cautionary tale. The Department of Justice and several states sued RealPage and large landlords in 2024, alleging that its rent pricing software used nonpublic, competitively sensitive data from competing landlords. Under a proposed settlement of 24 November 2025, awaiting court approval when it was reported, RealPage may base its live rent recommendations only on a landlord's own data and publicly available information, and nonpublic data may train its models only once it is at least 12 months old.14
Worked example: the cell the platform must not pick
Go back to the two shop table. A platform that serves both shops could see that both hold earns them £500 a week together against £200 in the equilibrium. It could quietly hold both bids down.
Ask what that is. Two competitors' bids are being set together, by one party that sees both sets of data, so that neither competes as hard as it would alone. The UK rules on cartels cover price fixing, bid rigging, sharing markets or customers, and sharing commercially sensitive information, including through a third party.15 A common optimiser holding rivals' bids down for their joint benefit is uncomfortably close to all four. The £300 a week is not worth it.
Where the line sits
The rough distinction is this.
Probably fine: each shop's optimiser reacts to what is publicly visible, its own auction prices and its own results. If the price of a click rises, it can see that from its own account and back off.
Not fine: confidential data from one client feeding decisions for a competing client, or a common algorithm setting rivals' prices or bids together.
Market sharing deserves a special mention, because it is the trap a well meaning optimiser falls into. In the segment example above, Kirkstall won mobile and Ancoats won desktop because each followed its own numbers. If the platform instead decided "you take mobile, you take desktop" from both shops' data, that is two competitors' customers being divided by a common intermediary. GOV.UK lists agreeing not to compete for customers, for example in specific locations, as market sharing.15 The outcome can look identical. The route is what the law looks at.
Two ideas that sound sensible fail that test: steering one client to swap emphasis with a rival on a schedule, and offering premium clients exclusive zones of customers. Both are a platform allocating customers between competitors. If you are building something similar, I would not ship either without a competition lawyer.
What a responsible multi client optimiser does
I built GrowCentric.ai with this problem in mind, with systems designed to detect, measure and mitigate competitive conflict between clients. Building that kind of multi agent awareness takes deliberate choices from the start. A pure learner that only sees its own client's data will simply see costs fluctuate and keep adapting. The approaches that survive both the maths and the law are these.
- Embrace natural differentiation. Optimise for the shop, not the product. The question is never "what is the best strategy for this vacuum" but "given this shop's margins, delivery, customers and strengths, what is its best strategy".
- Find the underserved opportunities. The hidden gem products differ between shops, because suppliers and stock differ. A shop with a stream of fresh opportunities has less reason to fight over the established ones.
- Read the competition from the shop's own signals. Rising costs per click, falling impression share and falling conversion are visible in each shop's own account. "This segment has become expensive, and here are three where your numbers are better" can be said to a client from its own data alone.
- Keep each client's data in its own lane. Confidential data from one client never feeds another client's decisions. Overlap between clients can be measured inside the platform as a risk to manage, never used to steer rivals apart.
- Never coordinate prices or bids. The optimiser should never recommend a price or a bid based on what other clients charge or bid. That is a one way ticket to antitrust trouble.
Worked example: the warning that stays inside the lines
Clifton Electricals' cost per click on the vacuum has risen from £1.00 to £1.45 in a month, from its own account data. Its value per click is £1.50, so it now keeps 5p a click on about 333 clicks a week, roughly £17.
Its own catalogue data shows a steam mop with £45 contribution, a 4% conversion rate and an average cost per click of £0.90. That click is worth and keeps . Moving budget from the vacuum to the mop is a recommendation built entirely from Clifton's own numbers and public auction prices. No rival's data was touched, and Clifton decides.
Mechanism design: building the incentives in
Should a platform optimise for each client alone, or for all its clients together? The sum of all clients' profits is the social welfare of the client base.
Here is the total profit of all clients, is the number of clients, is the profit of client , and adds them up from client 1 to client (Foundations: the mean introduces the summation sign).
Here is the trap. Maximising across competing shops is exactly what a cartel does. For competitors, the platform's job is to maximise each on its own, from that client's data and public information.
What a platform can design is its own business model. That is mechanism design, the field started by Leonid Hurwicz and developed by Eric Maskin and Roger Myerson, which studies how to build institutions so that self interested players with private information still produce good outcomes.16 Two ideas fit there, because they change the price of the service rather than any client's bids.
- Pricing the service by overlap. If a client's target segments overlap heavily with other clients', the optimisation costs more, which rewards differentiation.
- Success sharing. If the client base as a whole does well, every client benefits through lower platform fees or extra features, which ties the platform's success to its clients'.
Worked example: the sum for the three shop market
In the three way war, each shop earns about £17 a week, so . With Kirkstall moved off the vacuum by its delivery charge and Clifton moved to the steam mop by its own numbers, each shop competes where it is strongest. Assume each now earns £250 a week. Then . The total rose, but nobody maximised it. Each shop was optimised on its own, and differentiation did the rest.
The questions to ask any optimisation platform
The key insight is that "optimising" is not one thing when several agents share a market. Before trusting a platform with your bids or prices, ask four questions.
- What is it optimising for: your profit, the platform's profit, or something across clients?
- What information does each agent see: your data only, aggregates, or competitors' data?
- What constraints does it respect: legal, ethical, practical?
- How are the incentives aligned: does the platform earn more when you do, or when the auction does?
And one more, the simplest: what happens when my competitors use the same system? If the platform cannot give you a good answer, that tells you something important.