AnyLearn
All lessons
Businessadvanced

How Pricing Algorithms Actually Work

From revenue management to reinforcement learning: the mechanics of software that sets prices, the distinction between following rules and learning a policy, and why that distinction turns out to be the one that matters.

Updated · AI-authored, review-gated · how lessons are made

Not signed in: your progress and quiz score won't be saved.
Progress1 / 8

Prices that nobody sets

Setting a price used to be a decision a person made and revisited occasionally. For a growing share of commerce, it is now a decision software makes continuously.

The scale is easy to underestimate. Reporting on Amazon has described the average product price changing roughly every ten minutes, adapting to market conditions, with algorithms used for pricing a substantial share of top-selling products as early as the mid-2010s. Airlines and hotels have run algorithmic revenue management for decades. Ride-hailing surge pricing is algorithmic by construction. Retail fuel, groceries, and rental housing have all adopted pricing software.

The term algorithmic pricing covers all of it. Martin Bichler, Julius Durmann, and Matthias Oberlechner of the Technical University of Munich, in "Algorithmic Pricing and Algorithmic Collusion" (2025, accepted in Business & Information Systems Engineering), define it as a practice where software agents automatically determine prices for items for sale, in order to maximize the seller's profits.

That definition is deliberately broad, and this lesson is about the distinctions inside it. They turn out to matter enormously.

Full lesson text

All 8 steps on one page, for reading, reference, and search.

Show

1. Prices that nobody sets

Setting a price used to be a decision a person made and revisited occasionally. For a growing share of commerce, it is now a decision software makes continuously.

The scale is easy to underestimate. Reporting on Amazon has described the average product price changing roughly every ten minutes, adapting to market conditions, with algorithms used for pricing a substantial share of top-selling products as early as the mid-2010s. Airlines and hotels have run algorithmic revenue management for decades. Ride-hailing surge pricing is algorithmic by construction. Retail fuel, groceries, and rental housing have all adopted pricing software.

The term algorithmic pricing covers all of it. Martin Bichler, Julius Durmann, and Matthias Oberlechner of the Technical University of Munich, in "Algorithmic Pricing and Algorithmic Collusion" (2025, accepted in Business & Information Systems Engineering), define it as a practice where software agents automatically determine prices for items for sale, in order to maximize the seller's profits.

That definition is deliberately broad, and this lesson is about the distinctions inside it. They turn out to matter enormously.

2. The oldest form: revenue management

Algorithmic pricing did not begin with machine learning. It began in the airline industry after deregulation, with a problem that has a clean mathematical structure.

A seat on a flight is a perishable asset with fixed capacity. After departure its value is zero, and the plane cannot be made larger. Given a demand forecast, the question is how many seats to protect for the late-booking business traveller who will pay more, versus sell now to the price-sensitive leisure traveller.

This is an optimisation problem, not a learning problem. You forecast demand from historical booking curves, then solve for the allocation that maximises expected revenue. The same structure applies to hotel rooms, concert tickets, and advertising inventory.

Two features matter for what follows. The objective is against your own demand curve, not against a competitor. And the algorithm is doing arithmetic you specified, so if it produces an odd price you can trace exactly which forecast input caused it.

Nothing about this raises the concerns the rest of this path examines.

3. Rule-based repricing

The second family is what most online sellers actually run, and it is simpler than people assume.

A repricer watches competitors and applies a fixed rule. The canonical version is one line of logic:

if competitor_price < my_price:
    my_price = competitor_price - 0.01
    my_price = max(my_price, floor_price)

Undercut the cheapest rival by a penny, never go below a floor that protects margin. Variants match rather than undercut, or position relative to a market average, or only respond to sellers above a ratings threshold.

The defining property is that the rule is written by a human and fixed. It does not adapt, learn, or discover anything. Its behaviour is fully determined by its parameters, which means it is auditable: you can read the rule and know what it will do.

This is also where the first documented enforcement case appears. Bichler and colleagues note a UK investigation that found online poster retailers using simple pricing algorithms to coordinate prices on Amazon, as part of a horizontal cartel among retailers. That was straightforward illegal collusion, with software as the instrument rather than the cause.

4. Learning algorithms change the question

The third family is different in kind, and the difference is the subject of this whole path.

A learning pricing algorithm is not told what price to charge or what rule to follow. It is given an objective, profit, and a set of possible prices, and it discovers a pricing policy by trying prices and observing what happens.

Bichler and colleagues distinguish two classes. Online learning algorithms, such as multi-armed bandit methods including Exp3 and Upper Confidence Bound, operate with bandit feedback: they observe only the outcomes of their own actions. Reinforcement learning algorithms, such as Q-learning and deep RL variants, additionally incorporate state information such as historical prices or demand patterns.

That distinction is load-bearing, and the paper flags it directly: algorithms with bandit feedback, receiving only information on the outcomes of their own actions, are likely to behave differently than those which can access more information about the environment or competitors' actions.

The reason will become clear shortly. Conditioning on what a rival did last period is what makes a strategy of the form "if you cut price, I punish" expressible at all.

5. Q-learning in one page

Because the research literature runs almost entirely on Q-learning, it is worth knowing precisely what it does.

The algorithm maintains a table Q(s,a)Q(s, a) estimating the long-run value of charging price aa when the market is in state ss. In a pricing duopoly the state is typically the prices both firms charged last period.

# one period of Q-learning price setting
if random() < epsilon:
    a = random_choice(prices)          # explore
else:
    a = argmax(Q[s])                   # exploit best known

profit, s_next = market_step(a)        # rival prices simultaneously

Q[s][a] += alpha * (profit + gamma * max(Q[s_next]) - Q[s][a])
s = s_next

Three parameters do the work. Epsilon controls exploration, how often it tries something other than its current best. Alpha is the learning rate. Gamma is the discount factor, how much it weighs future profit against immediate profit.

Gamma is the one to watch. A high gamma makes the algorithm patient, willing to forgo profit now for a better ongoing position. That patience is exactly the precondition economics identifies for sustaining cooperation in a repeated game.

6. Three families, one label

The public conversation uses one term for all three, which is why claims about algorithmic pricing so often talk past each other. Only the third family raises the question of prices nobody chose, because only it can discover a strategy its designer never wrote.

flowchart TD
  A["Algorithmic pricing"] --> B["Revenue management"]
  A --> C["Rule-based repricing"]
  A --> D["Learning algorithms"]
  B --> E["Optimises own demand forecast"]
  C --> F["Fixed human-written rule, auditable"]
  D --> G["Discovers a policy from trial and reward"]
  G --> H["Strategy was never specified by anyone"]

7. Why economists worried

The concern about learning algorithms is not that they price badly. It is a specific prediction from the theory of repeated games.

In a one-shot Bertrand pricing game, competition drives price to marginal cost. Undercutting is profitable and everyone does it. But repeat that game indefinitely and the logic changes. High prices can be sustained as an equilibrium if each firm believes that cutting price triggers retaliation, and if firms weigh future profits heavily enough that the retaliation outweighs the one-period gain from cheating.

This is standard theory and it is why cartels are stable when they are stable. Human cartels need communication to coordinate on which high price to charge and what punishment to expect, and that communication is what antitrust law prohibits and prosecutes.

Now observe what a Q-learning agent has. It is patient, through gamma. It conditions on rivals' past prices, through the state. It updates toward whatever raises long-run profit. Every structural precondition for a reward-punishment strategy is present, and none of it requires communication.

Whether that possibility actually materialises is an empirical question, and it is the subject of the next lesson.

8. Comparing the families

A summary of what separates the three, since the legal and economic questions attach to different rows.

Revenue managementRule-based repricingLearning algorithms
OriginAirline deregulation eraOnline marketplacesRecent research and practice
InputOwn demand forecastCompetitor pricesOwn profit, sometimes rival prices
BehaviourSolves a stated optimisationExecutes a written ruleDiscovers a policy
AuditableYes, trace the inputsYes, read the ruleHard, policy is learned
Adapts to rivalsNoMechanicallyStrategically, in principle
Raises collusion concernNoOnly if humans coordinateThe open question

Two gotchas worth carrying forward. First, most deployed pricing software is not reinforcement learning. Bichler and colleagues make this point pointedly, noting that while most of the experimental literature on algorithmic collusion is based on Q-learning, there is little evidence that this algorithm is particularly important or widespread for algorithmic pricing. The research studies one thing; the market largely runs another.

Second, dynamic prices are not evidence of anything. Prices moving constantly is what responsive software looks like in a competitive market. The question is never whether prices move, but whether they settle above the competitive level and stay there.

Check your understanding

The lesson ends with a 5-question quiz. Take it in the player above to see your score.

  1. What distinguishes revenue management from the other families of pricing algorithms?
    • It optimises against the firm's own demand forecast rather than responding to competitors
    • It uses reinforcement learning to discover pricing policies
    • It requires continuous monitoring of rival prices
    • It was developed specifically for online marketplaces
  2. What defines a rule-based repricer?
    • It learns the optimal undercut margin from experience
    • It applies a fixed human-written rule, making its behaviour fully auditable
    • It coordinates prices with competitors through a shared data feed
    • It maintains a value table over market states
  3. What is the key difference between bandit-feedback algorithms and reinforcement learning algorithms in pricing?
    • Bandit algorithms are always faster to converge
    • Reinforcement learning cannot be used for continuous prices
    • Bandit algorithms observe only their own action outcomes, while RL additionally conditions on state such as historical prices
    • Bandit algorithms require competitor cost data
  4. Which Q-learning parameter most directly relates to the economic conditions for sustaining collusion?
    • The learning rate alpha
    • The exploration rate epsilon
    • The size of the discrete price grid
    • The discount factor gamma, which controls patience about future profit
  5. What caveat do Bichler and colleagues raise about the algorithmic collusion literature?
    • Q-learning dominates the research, yet there is little evidence it is widespread in actual pricing practice
    • Revenue management systems have been shown to collude more than Q-learning
    • The experiments have never been replicated by independent teams
    • Bandit algorithms are excluded from all published studies

Related lessons