Interviewing for Didi/Uber Algorithm Positions: Beyond dispatch logic, how to address the "driver-passenger supply-demand balance" challenge from a "Game Theory" perspective?

Jimmy Lauren

Jimmy Lauren

Updated onJan 5, 2026
Read time15 min read

Share

Ace your next interview with real-time, on-screen guidance from GankInterview.

Try GankInterview
Interviewing for Didi/Uber Algorithm Positions: Beyond dispatch logic, how to address the "driver-passenger supply-demand balance" challenge from a "Game Theory" perspective?

In algorithm interviews at giants like Didi or Uber, when faced with the classic "peak-hour supply-demand imbalance" problem, most candidates merely recite basic economic supply and demand principles—raising prices to suppress demand and stimulate supply. However, such purely macro-qualitative answers are often the root cause of mediocre ratings or failure. In volatile two-sided markets, interviewers seek candidates who can transcend linear thinking and deconstruct this complex dynamic system using the advanced perspectives of Game Theory and Mechanism Design. This article analyzes why an algorithm engineer's core mission is not merely "prediction," but designing precise micro-rules: As a market maker with global information, the platform must reconstruct the payoff matrix via dynamic pricing. Amidst information asymmetry and short time windows, it must guide thousands of self-interested drivers and passengers to spontaneously converge to the system-optimal Nash Equilibrium within a non-cooperative game. Drawing on Nobel laureate Tirole's platform economics, we explore using algorithms to achieve incentive compatibility and resolve spatiotemporal matching deadlocks, helping you evolve from a mere "model tuner" into an algorithm architect with global strategic thinking to stand out in fierce competition.

Why Do Interviewers Ask About "Game Theory"? Beyond Simple Supply and Demand Curves

In algorithm role interviews at Didi or Uber, when an interviewer poses the question "how to solve supply-demand imbalance," the immediate reaction of many candidates is often to cite basic economic principles: "Raise prices when demand exceeds supply to suppress demand and stimulate supply."

While logically sound, in an algorithm interview, this answer is merely a passing macro description, not an excellent micro strategy. Interviewers test "Game Theory" because they are not just interested in the result that "the market will eventually balance," but are more concerned with how to design rules via algorithms that guide thousands of self-interested individuals (drivers and passengers) to spontaneously achieve this balance.

From "Macro Results" to "Micro Decisions"

Simple supply and demand curves describe macro phenomena after the market reaches a steady state, whereas Game Theory investigates the micro-decision processes driving these phenomena. In ride-hailing scenarios, drivers and passengers are not perfectly rational "Homo economicus," but rather players in a game within an environment of information asymmetry.

  • Junior Answer:
    • Logic: As long as the price rises, the quantity demanded decreases along the demand curve, and the quantity supplied increases along the supply curve, until the two intersect.
    • Flaw: It ignores real-world constraints such as extremely short time windows (passengers need a car within minutes) and significant spatial fluctuations (vehicles must be within a few kilometers). This resembles a Product Manager's business intuition rather than an Algorithm Engineer's modeling mindset.
  • Senior/Algo Answer:
    • Logic: Treat dispatching and pricing as a Non-Cooperative Game. Beyond price elasticity, analyze strategic interactions: If a rainstorm causes a surge in demand, does an individual driver choose to accept an order immediately or drive empty to a high-price zone (chasing the heat map)? Does a passenger choose to pay a premium and wait, or switch to public transport?
    • Core: The goal of the algorithm is not simply to "draw lines," but to predict and intervene in these micro-decisions.

Core Interview Topic: Mechanism Design

In algorithm interviews, what interviewers really want to assess is whether you possess the mindset of Mechanism Design. In Game Theory, this is known as "Reverse Game Theory":

Core Definition: Dynamic Pricing in ride-hailing is essentially a mechanism design problem. As the rule maker (Market Maker), the platform designs a set of incentive mechanisms (such as surge multipliers and completion bonuses) so that when drivers and passengers pursue the maximization of their own self-interest, the Nash Equilibrium aligns precisely with the "market clearing" point desired by the platform.

As pointed out in MarkHub24's analysis of Uber's algorithm strategy, dynamic pricing is not merely about adjusting prices; it involves applying traditional market clearing mechanisms to a digital platform environment. Using algorithmic means, the platform must solve complex matching problems within extremely short time windows.

Why Does This Determine the Offer?

By testing Game Theory, interviewers are actually evaluating your ability to handle uncertainty in complex systems:

  1. Quantitative Trade-offs: Can you realize that while excessive price incentives may balance supply and demand in the short term, they can lead to long-term user churn (undermining the reliability of the "utility" attribute)?
  2. Strategic Prediction: Can you anticipate "speculative behaviors" by drivers (e.g., drivers collectively going offline to wait for surge pricing to rise) and design counter-strategies?

Therefore, when answering such questions, do not stop at "raising prices balances supply and demand." Instead, delve into how to design a Payoff Matrix to guide drivers toward "supply-demand dead zones" caused by spatiotemporal misalignment. This is the true value of an Algorithm Engineer in a multi-billion dollar marketplace.

Theoretical Framework: Tirole and Two-Sided Market Mechanism Design

Theoretical Framework: Tirole and Two-Sided Market Mechanism Design

When interviewing for senior algorithm positions at DiDi or Uber, interviewers expect more than just code implementation skills; they look for a profound understanding of the essence of the business. The theoretical cornerstone for answering "supply-demand balance" questions often stems from the research on Two-Sided Markets by 2014 Nobel Laureate in Economics, Jean Tirole.

What are Two-Sided Markets and the "Market Maker" Role?

Unlike traditional one-sided markets (such as Walmart buying goods from suppliers and selling them to consumers), ride-hailing platforms do not own "inventory" (vehicles or drivers' time). Instead, they act as a Market Maker, dedicated to matching two distinct user groups: drivers and passengers.

Tirole's theory points out that the core value of a platform lies in leveraging Cross-side Network Effects: the number of users on one side of the platform (e.g., the number of active drivers) directly determines the utility for users on the other side (e.g., passengers). Within this framework, we can abstract the three key agents in the business and their objective functions as follows:

  • Passengers: Pursue utility maximization. Their main demands are minimizing estimated time of arrival (ETA) and reducing travel costs.
  • Drivers: Pursue profit maximization. As rational economic agents, their goal is to maximize income per unit of time while minimizing idle time.
  • Platform: Pursues system efficiency and liquidity. The goal is usually to maximize GMV (Gross Merchandise Value) or match rate (Liquidity), while ensuring the long-term health of the system (e.g., retention rates).

Mechanism Design: From "Selfish" to "Win-Win"

In the aforementioned three-party game, the thorniest issue lies in the nature of the non-cooperative game: drivers and passengers make independent decisions based on their own interests, and the platform cannot force drivers to accept orders (especially in the Uber model). Therefore, the task of an algorithm engineer is actually Mechanism Design.

The core of mechanism design lies in formulating a set of "game rules" (such as pricing algorithms, dispatch logic, and reward mechanisms) so that while participants are pursuing the maximization of their own interests (Selfish), the results of their decisions happen to achieve the global optimum of the system (Social Optimum). In economics, this is known as "Incentive Compatibility."

Citing research by Tsinghua University on platform anti-monopoly and two-sided market theory, Tirole's foundational contribution lies in revealing the non-neutrality of the platform price structure. This means that simply adjusting the total price level is not enough; the platform must dynamically adjust the ratio of fees charged to both sides (e.g., charging passengers more via Surge Pricing while giving drivers subsidies) to balance the scale of supply and demand on both sides.

In an interview, when you can approach the problem from the angle of "how to design a mechanism to make selfish drivers voluntarily go to hot spots," rather than just talking about "giving drivers money," you demonstrate a leap in thinking from an algorithm engineer to a Policy Maker.

Non-Cooperative Game: Nash Equilibrium in Surge Pricing

When answering questions about "supply and demand balance" in interviews, junior candidates often stop at the common economic knowledge that "rising prices suppress demand and increase supply." However, interviewers for algorithm positions prefer to hear you analyze, from the perspective of a Non-Cooperative Game, how platforms guide players (drivers and passengers) to reach a system-optimal Nash Equilibrium through mechanism design.

Core Conflict: Why Static Pricing Leads to "Market Failure"

In the scenario of Didi or Uber, drivers and passengers are two completely independent decision-making subjects, and their behaviors constitute a typical non-cooperative game:

  • Passenger's Utility Function: Pursues travel certainty and low cost.
  • Driver's Utility Function: Pursues maximization of unit time revenue (Earnings per Hour).

When heavy rain or morning/evening rush hours occur, if the platform maintains static pricing, the market will experience severe supply and demand imbalance. According to Gelonghui's analysis, travel demand has an extremely short time window (customers are lost if they can't get a car within a few minutes), while supply is limited by geographical location (only drivers within a few kilometers can respond). At this time, the driver's optimal strategy might be to "refuse to enter the congested area" or "go offline and go home," because time consumption increases in congestion while revenue remains unchanged, leading to a decrease in actual hourly wages.

The result of each party pursuing the maximization of their own interests is a "lose-lose" Nash Equilibrium: passengers cannot get a car (utility impaired), drivers drive empty or sit idle (revenue impaired), and the platform's transaction volume (GMV) plummets. In game theory, this is referred to as "Coordination Failure."

Surge Pricing: Reconstructing the Payoff Matrix and Incentive Compatibility

Surge Pricing is not simply an act of raising prices, but a form of Mechanism Design aimed at guiding the system to a new, market-clearing Nash Equilibrium point by changing the game's Payoff Matrix.

From an algorithmic perspective, Surge Pricing is actually finding a price coefficient λ\lambda such that at this price:

  1. Passenger Side (Demand Side): Filters out demands with high price sensitivity and low urgency, retaining high-value demands.
  2. Driver Side (Supply Side): Increases the expected revenue of orders to cover the driver's additional costs under severe weather or congested road conditions (such as psychological costs, fuel consumption, and time loss).

Citing UCLA's research on Uber Surge Pricing, when demand exceeds supply, the algorithm automatically raises prices. The key to this mechanism lies in achieving Incentive Compatibility: designing a rule such that "accepting the order" becomes the driver's optimal strategy in the long-term game.

Achieving Equilibrium: From Chaos to Order

In this new game model, dynamic pricing attempts to achieve the following equilibrium state:

  • Supply Response: The price multiplier is sufficient to incentivize the Marginal Driver to go online or drive into hot zones.
  • Demand Convergence: Demand volume contracts to a level matching the currently available capacity.
  • System Efficiency: Maximizing transaction efficiency (Liquidity) under this space-time window, rather than simply pursuing unit price.

As pointed out by relevant algorithmic research, the challenge lies in designing an IC Pricing Mechanism (Incentive Compatible Pricing) to ensure that drivers do not manipulate future prices by strategically refusing orders (e.g., deliberately waiting for a higher Surge multiplier before accepting an order). If the algorithm is designed properly, the system will converge to a stable Nash Equilibrium: all passengers willing to pay the current price can be served within the expected time, and all online drivers can obtain hourly returns that meet their expectations.

The Driver's Positioning Game: Why "Always Going to Hotspots" Is Not the Optimal Solution?

The Driver's Positioning Game: Why "Always Going to Hotspots" Is Not the Optimal Solution?

In interviews, when asked "how drivers should choose pickup locations" or "how platforms guide driver distribution," interviewers are often not just testing geographic dispatch algorithms, but testing your understanding of the application of Game Theory in Multi-Agent Systems.

The most intuitive trap answer is: "Drivers should always go to where there are the most orders." You can refute this intuition by introducing models like the "El Farol Bar Problem" or the "Minority Game", and demonstrate your deep understanding of global system optimality.

1. The "Crowding Effect" of Hotspots and the Minority Game

Imagine a typical scenario: On a Friday night, a concert ends at a downtown stadium, and high surge pricing appears in the area.

  • Individual Intuition: All empty drivers see the deep red on the heat map and flock to the stadium.
  • Game Result: If everyone makes the "optimal" choice (going to the stadium), the result becomes the "worst." The stadium area instantly becomes oversupplied, and surge pricing drops rapidly or vanishes; meanwhile, roads leading to the stadium become congested, drastically increasing drivers' time costs. Conversely, in suburbs or non-hotspot areas, because drivers have been sucked away, a capacity vacuum appears, leading to the loss of potential orders there.

This is a classic embodiment of the "Minority Game": In situations with limited resources (limited high-price orders), returns can only be maximized when your choice differs from the majority (i.e., becoming the minority).

2. Definition of Nash Equilibrium in Capacity Distribution

In your answer, you need to clearly define the Nash Equilibrium state in this scenario.

Nash Equilibrium State: Refers to a state in this capacity distribution network where no single driver can obtain a higher expected return by unilaterally changing their position (assuming other drivers' positions remain unchanged).

In other words, a perfect equilibrium state is not having all drivers in the hotspot, but having capacity distribution perfectly match the demand probability distribution. For example, if the stadium has 80% of the demand, then 80% of the drivers should be there; the remaining 20% should stay in other areas to serve the remaining 20% of demand. Once drivers at the stadium exceed 80%, some drivers leaving for other areas would actually earn more, and the system will automatically regress towards the equilibrium point.

3. Algorithm Perspective: From "Individual Greed" to "Global Optimality"

The interviewer's advanced question is usually: "Since drivers are free, how does the platform intervene in this game to achieve global optimality?"

Here you can cite the concept of Mechanism Design. The platform cannot force assignments (drivers are self-employed), but it can guide them through information asymmetry or incentive strategies:

  • Predictive Dispatching: Algorithms don't just show current "heat," but based on models like Equilibrium Matching and Incentive Strategy for Ride-sourcing Carpooling, predict future supply-demand gaps. The system will show dispatch suggestions for "sub-optimal" locations to some drivers (e.g., a few blocks around the stadium). Although the unit price might be slightly lower, the probability of getting an order is higher, and congestion is avoided.
  • Income Smoothing: Reducing the perceived risk of drivers going to unpopular areas through "guaranteed minimum bonuses" or "order completion bonuses." This is essentially the platform paying "opportunity costs" through subsidies to make drivers willing to fill "capacity black holes" that would form without intervention.

Answer Summary Script:
"Therefore, if I were the algorithm designer, I wouldn't let all drivers see the same 'hotspot.' I would utilize Game Theory models to guide drivers toward a Mixed Strategy Nash Equilibrium state through differentiated recommendations or incentives, avoiding systemic efficiency reductions caused by the herd effect."

Price as a Signal: Breaking the "Prisoner's Dilemma"

Price as a Signal: Breaking the "Prisoner's Dilemma"

When answering questions about "Surge Pricing" in interviews, the most common mistake candidates make is focusing solely on the business aspect of "platforms increasing revenue." From the perspective of algorithms and game theory, surge pricing is essentially an information transmission mechanism used to solve coordination difficulties between supply and demand when communication is impossible, i.e., breaking the typical "Prisoner's Dilemma."

The "Prisoner's Dilemma" During Peak Hours: Why Does the System Fail?

Imagine a rainy evening rush hour scenario. If there is no surge pricing and the price is fixed at a low level, the system will fall into an inefficient Nash equilibrium:

  • Driver's Game (Supply Side): Faced with traffic congestion and bad weather, the efficiency of orders per unit of time drops significantly, and the risk of accidents increases. If there is only a fixed fare, the rational driver's optimal strategy is to go offline and go home, rather than running empty at a loss on the road.
  • Passenger's Game (Demand Side): Due to the low price, all passengers (including low-intent users who could have walked or traveled later) will flood the platform to hail a car.
  • Result (Deadlock): Demand surges while supply plummets, leading to a situation where "there is a price but no market." Passengers who truly need a car cannot get one, and drivers who want to make money are unwilling to drive due to low efficiency. This is a typical market failure where both parties end up in a worse situation.

Price as a Screening and Incentive Signal

After introducing surge pricing, price becomes a signal light for coordinating the game, breaking the deadlock through two-way adjustment. You need to demonstrate your understanding of Incentive Compatibility to the interviewer:

  1. Screening on the Demand Side (Filtering): High prices utilize the price elasticity of demand to screen out users with the most urgent travel needs (such as passengers catching a plane) while filtering out non-rigid demand users (such as passengers who can switch to the subway).
  2. Incentives on the Supply Side (Incentivizing): The premium part directly compensates drivers for the extra costs (psychological costs and time costs) in congested or harsh environments, making "going online to take orders" the dominant strategy for drivers again.

Academic research also supports this view; through reasonable incentive strategy design, the system can be effectively pushed to achieve matching equilibrium and pricing equilibrium. For example, some studies point out that compared to simple random dispatch fees, incentive strategies based on both supply and demand can better promote the matching equilibrium of ride-hailing services, thereby maximizing the overall utility of the system.

Interview Bonus: Efficiency Comparison of No Surge vs. With Surge

To make your answer more logical, you can use the following comparison framework to summarize the improvement in "allocative efficiency" brought by this mechanism:

Dimension

No Surge Pricing (Fixed Price)

With Surge Pricing (Market Equilibrium Price)

Allocation Mechanism

Random Rationing: Entirely based on luck; whoever clicks first gets it.

Value Rationing (Allocative Efficiency): Resources flow to those with the highest willingness to pay (most urgent need).

Supply Response

Negative Feedback: Congestion leads to lower hourly wages, causing driver churn.

Positive Feedback: High prices compensate for congestion costs, causing capacity to return.

System State

Shortage and Queuing: Large amounts of invalid waiting time (Deadweight Loss).

Market Clearing: Supply and demand balance quickly at a new price point, minimizing wait times.

Suggested Answer Script:

"Surge pricing is not merely a revenue management tool, but a game-theoretic mechanism to solve resource mismatch. Through price signals, it transforms a situation that would otherwise lead to a 'lose-lose' scenario (drivers don't work, passengers can't get rides) into a Pareto improvement where 'some passengers with rigid demand receive service, and drivers receive reasonable compensation'."

Cooperative Games: Carpooling and the Shapley Value

Cooperative Games: Carpooling and the Shapley Value

In interviews, most candidates focus on discussing "non-cooperative games" (such as drivers fighting for orders or price competition), but high-level algorithm positions (especially teams involving pricing strategies) often examine Cooperative Games. A typical application scenario for this perspective is Carpooling/Ride-sharing.

When two or more passengers decide to share a car, they effectively form a "Coalition". At this point, the core challenge is no longer "how to defeat the opponent", but "how to fairly distribute the benefits (cost savings) generated by cooperation". If the distribution is uneven, the coalition will collapse—meaning users choose not to carpool, leading to a decline in the platform's overall efficiency.

Core Case: Fair Distribution of Carpooling Costs

To demonstrate your understanding of mechanism design to the interviewer, you can construct a simplified mathematical model to explain the application of the Shapley Value.

Suppose there are two passengers, A and B, with the following cost structure:

  • Passenger A Solo Ride: Cost is $20.
  • Passenger B Solo Ride: Cost is $30.
  • A and B Co-ride: Total distance increases, but only one car is needed; total cost is $40.

Cooperative Surplus:
(20 + 30) - 40 = \10$.
That is, carpooling saves the entire system $10.

1. Why does "Naive Equal Splitting" Fail?

The interviewer might ask: "Why not just let the two split the fare equally?"

  • Proposal: Total cost 40,eachpersonpays40, each person pays20.
  • Result:
    • Passenger B: Original price 3030\rightarrowCurrentpriceCurrent price20 (saves $10). Satisfied.
    • Passenger A: Original price 2020\rightarrowCurrentpriceCurrent price20 (saves $0). Dissatisfied.
  • Game Theory Explanation: For Passenger A, participating in carpooling offers no economic benefit, yet requires bearing the time delay and loss of privacy caused by carpooling. This violates the Individual Rationality constraint. A will choose to withdraw from the coalition (take a solo ride), causing the carpool to fail, and the platform loses the opportunity to optimize capacity.

2. Introducing the Shapley Value

The Shapley Value provides a fair distribution method based on Marginal Contribution. Its core idea is: The payoff a participant receives should equal the expected value of the marginal value they create for the coalition across all possible joining orders.

In an interview, you can derive this using intuitive logic without listing complex factorial formulas:

  • Scenario 1: A arrives first, B joins later
    • A pays $20 first (original price).
    • After B joins, the total cost becomes 40.ThemarginalcostbroughtbyB′sadditionis40. The marginal cost brought by B's addition is20 (40−40 -20).
    • B originally had to pay 30;nowBonlyneedstocoverthemarginalcostof30; now B only needs to cover the marginal cost of20. B saves $10.
  • Scenario 2: B arrives first, A joins later
    • B pays $30 first (original price).
    • After A joins, the total cost becomes 40.ThemarginalcostbroughtbyA′sadditionis40. The marginal cost brought by A's addition is10 (40−40 -30).
    • A originally had to pay 20;nowAonlyneedstocoverthemarginalcostof20; now A only needs to cover the marginal cost of10. A saves $10.

Shapley Value Calculation:
Assuming the probability of the two joining orders is equal (50%), we take the average:

  • A's Payable Fee: (20 + 10) / 2 = \15$.
  • B's Payable Fee: (20 + 30) / 2 = \25$.

Result Verification:

  • A pays 15(saves15 (saves5).
  • B pays 25(saves25 (saves5).
  • Total payment 15+15 +25 = $40.

Through this distribution, both A and B obtain a better price than taking a solo ride, and the proportion of savings reflects their contribution to the coalition. In academia, topics such as Research on Benefit Distribution Mechanism of Rail Transit Network Based on Cooperative Game Theory utilize this type of logic to solve multi-party benefit distribution problems.

Interview Bonus: From Theory to Engineering

After answering the theoretical calculation, be sure to supplement with practical industrial considerations to demonstrate Experience in E-E-A-T:

"In actual engineering, calculating exact Shapley Values (especially when the number of carpoolers N>2) involves exponential computational complexity. Therefore, Uber and Didi usually use approximate algorithms or rule-based heuristics (such as distributing discounts based on mileage proportion) to simulate this fairness. At the same time, algorithms must also consider 'dynamic incentives'; that is, in Ride-hailing Ridesharing Equilibrium Matching, it is necessary not only to distribute costs but also to compensate passengers with longer detour times in real-time through coupons or points to maintain the stability of the coalition."

Repeated Games: Rating Systems and Incentive Compatibility

In interviews, many candidates tend to only talk about "how to use bipartite matching algorithms to maximize GMV," but ignore the crucial time dimension in game theory. Ride-hailing platforms are not a one-time "Prisoner's Dilemma" game, but an infinitely repeated game. You need to show the interviewer how you use Mechanism Design to constrain the behavior of all parties, making them tend towards a cooperative equilibrium in the long run.

Rating Systems: Creating the "Shadow of the Future"

In an unregulated free market, drivers might take detours for short-term gain, and passengers might evade fares or damage vehicles, leading to a "bad money drives out good" Lemon Market effect. The essence of platforms introducing rating systems is to establish a Reputation Mechanism.

  • Game Logic: The rating system introduces the "Shadow of the Future" to the current single transaction. By linking dispatch priority and service scores to long-term earnings, the algorithm forcibly changes the Payoff Matrix.
  • Interview Talking Points: You can mention that in repeated games, the goal of the algorithm is to transform "cooperation" (providing high-quality service) into a Dominant Strategy. For example, for passengers or drivers with significant behavioral differences, the platform builds decision trees and uses backward induction to solve for Nash Equilibrium, ensuring that high-reputation users get faster matching speeds, thereby implementing credible punishment for defecting behaviors (such as cancellation without cause or taking detours).

Incentive Compatibility (IC)

This is the core concept that distinguishes "library callers" from "strategy experts" in algorithm interviews. A mechanism is called "incentive compatible" if the best strategy for participants (drivers/passengers) is to truthfully report their private information (such as real location, true willingness to accept orders), rather than profiting through lying or strategic behavior.

In ride-hailing scenarios, the most typical challenge is strategic waiting in dynamic pricing.

  • Problem Scenario: If drivers predict that prices will surge in the next minute (Surge Pricing), their current optimal strategy might be to "reject orders" or "go offline and wait," which leads to an instantaneous vacuum in current capacity.
  • Mechanism Design: To solve this problem, the algorithm must design a pricing function w(τ)w(\tau) such that in any state, the expected return of accepting the current order is higher than the return of waiting for uncertain future orders. Related research points out that designing incentive-compatible pricing mechanisms in dynamic models is extremely complex because drivers can influence future supply and demand states by rejecting orders.
  • Answering Strategy: In the interview, emphasize that the platform's dispatch logic (such as dispatch radius, surge multipliers) must satisfy IC constraints, i.e., "earnings from honest acceptance ≥\geq earnings from strategic cherry-picking"; otherwise, the algorithm will be "exploited" by the collective intelligence of drivers.

The Deep Logic of Subsidies: Revealing True Elasticity

Beyond incentive compatibility, from a game theory perspective, subsidies are not just a means of customer acquisition, but also an Information Revelation Mechanism.

  • Supply and Demand Elasticity Probing: The platform does not know the drivers' true Reservation Price during specific heavy rain weather. By issuing dynamic subsidies, the platform is effectively paying to purchase the information of the "true slope of the supply curve."
  • Signaling Game: A reasonable subsidy mechanism can distinguish between "price-sensitive" and "service-oriented" capacity, preventing the system from falling into an inefficient equilibrium. The algorithm needs to balance short-term subsidy costs with the increasing marginal returns brought by long-term network effects.

Practical Comparison: Differences in Game Theoretic Mechanisms between Didi and Uber

When answering supply and demand balance questions in interviews, a highly differentiating perspective is the ability to step out of pure mathematical models and analyze the differences in "game rules" under different market environments. Although the underlying technology stacks of Didi and Uber (such as Reinforcement Learning and Operations Research) highly overlap, due to different regulatory environments and business strategies, there are significant differences in the objective functions of their Mechanism Design.

Understanding this difference proves to the interviewer that you not only understand algorithms but also understand the boundary conditions in business scenarios.

1. Uber: Clearing Mechanism Approaching a "Perfect Market"

Uber's early algorithmic philosophy was deeply influenced by free-market economics, tending to use Price as the sole adjustment lever. From a game theory perspective, Uber is more like a market maker seeking Global Equilibrium.

  • Core Mechanism: When supply and demand are unbalanced (Demand > Supply), the algorithm's primary action is to increase prices (Surge Pricing) until some passengers with low willingness to pay exit the market, while high prices attract more drivers to go online or enter hot zones.
  • Game Logic: This is a typical non-cooperative game, assuming rational drivers will only chase the highest returns. The system allows for drastic price fluctuations to ensure "as long as you can afford it, you can definitely get a ride." In economics, this is called "Market Clearing."
  • Pros/Cons: Extremely high efficiency, but prone to generating "sky-high fares" during extreme weather or emergencies, triggering public opinion backlash.

2. Didi: "Global Optimal" in a Restricted Environment

In contrast, Didi faces stricter regulatory constraints in China (such as ride-hailing fare guidance, anti-monopoly compliance, etc.). Therefore, Didi's algorithms often cannot rely solely on price clearing but turn to the optimization of Dispatch Efficiency.

  • Core Mechanism: When prices hit the regulatory or public opinion "ceiling" and cannot continue to rise, the pure price lever fails. At this point, Didi introduces a "queuing system" and "service scores" as supplementary mechanisms. As pointed out by industry analysis, Didi uses queuing systems to replace dynamic pricing during extreme supply-demand imbalances (such as heavy rain), which actually converts "bidding games" into allocation logic based on "First-Come, First-Served" or "Credit Priority."
  • Game Logic: This is a Constrained Optimization problem. The algorithm's goal is no longer just to find the intersection of supply and demand curves, but to maximize Completed Trips or minimize Global Pickup Distance under the premise of restricted prices.
  • Incentive Compatibility: To prevent drivers from cherry-picking orders when prices are restricted, Didi has built a more complex "Service Score/Reputation Value" system (Repeated Game), forcing drivers to accept short-term low-yield orders for long-term dispatch weight.

3. Core Difference Comparison Table

In interviews, it is recommended to use the following framework to compare the game design differences between the two, demonstrating your understanding of "solving under constraints":

Dimension

Uber (Market Oriented)

Didi (Efficiency & Compliance Oriented)

Objective Function

Profit/GMV Maximization: Prioritizes market clearing through price mechanisms, seeking the perfect balance point of supply and demand.

Completion Rate/Experience Maximization: Under price constraints, pursues the shortest global pickup time or lowest queuing churn rate.

Pricing Constraints

Weak Constraints: Allows high price fluctuation coefficients, relying on high premiums to filter high-value demand.

Strong Constraints: Limited by local fare guidance and public pressure, prices have implicit or explicit "circuit breaker lines."

Driver Incentives

Short-term Incentives: Mainly relies on Surge multipliers to directly stimulate driver movement.

Long-term Incentives: Relies on Service Scores (Reputation Value), order completion bonuses, and other long-term mechanisms to constrain driver behavior.

Supply/Demand Adjustment Methods

Mainly Price (letting passengers who find it too expensive leave).

Price + Queuing (letting passengers who are not in a rush wait) + Dispatching (forced assignment).

Interview High-Score Script Summary:

"If Uber's algorithm is solving an unconstrained convex optimization problem, finding the global optimum through the single variable of price; then Didi's algorithm is solving a strongly constrained optimization problem brought about by regulation and price rigidity. Therefore, in terms of mechanism design, Didi must introduce non-price means such as 'Service Scores' and 'Queuing Logic' to solve the resource allocation puzzle when prices fail."

Summary: The "Three-Step" Framework for Interview Responses

In interviews, when asked grand questions like "how to solve supply and demand balance from a game theory perspective," the interviewer is not only assessing your mathematical modeling ability but, more importantly, your logical framework for deconstructing business problems. Simply piling up terms like "Nash Equilibrium" or "Pareto Optimality" can easily lead to empty talk; an excellent answer should abstract complex real-world scenarios into solvable mathematical models while considering implementation constraints.

It is recommended to adopt the following "three-step" framework to organize your response. This demonstrates that you understand Theory, Context, and System Design.

Step 1: Define the Game Environment (Define the Game)

First, clearly define the participants, strategy space, and payoff functions of this "game." Do not jump straight into algorithm details; establish the model background first.

  • Establish Roles (Players): Point out that this is a typical Two-sided Market model. The main participants are drivers (supply side), passengers (demand side), and the platform (rule maker).
  • Introduce Game Structure: You can cite the Stackelberg Game Model to describe this relationship: the platform acts as the "Leader" setting pricing strategies and dispatch rules, while drivers and passengers act as "Followers" reacting based on the principle of maximizing their own utility (accept/reject orders, take a ride/churn).
  • Highlight Core Conflicts: Clearly state that there is a non-cooperative game among drivers (competing for high-value orders), while the platform's goal is global efficiency maximization, which often conflicts with individual local optima.

Step 2: Analyze the Equilibrium Mechanism (Analyze the Equilibrium)

Next, explain how your algorithm guides the system from a "bad equilibrium" to a "good equilibrium." This is the core segment for showcasing technical depth.

  • Break Static Deadlocks: Explain that under fixed pricing, a deadlock of "demand exceeding supply" occurs during peak hours. At this point, the algorithm introduces Dynamic Pricing as a regulatory lever, filtering out passengers with high willingness to pay through price signals while incentivizing more drivers to come online.
  • Mechanism Design: Emphasize that your goal is to achieve Incentive Compatibility. That is, designing a set of rules (such as surge bonuses, chained orders) so that drivers' behavior in pursuit of maximizing their own interests (accepting more orders, going to hot zones) aligns exactly with the platform's global optimal goals (capacity balance, improved answer rates).
  • Not Just Price: Mention that besides price, information transparency is also key to the game. For example, should the destination be shown to the driver? Showing the destination might lead to drivers cherry-picking orders (disrupting global equilibrium), while not showing it might lead to a decline in driver experience (long-term churn). You need to weigh the pros and cons of this information game.

Step 3: Introduce Real-World Constraints (Constraints & Reality)

Finally, demonstrate your Engineering Mindset. Perfect mathematical models always encounter friction in reality; acknowledging and discussing these constraints will earn you bonus points.

  • Regulation and Compliance: Especially when answering questions related to Didi, you must mention policy constraints (such as ride-hailing compliance, price ceilings). This means you cannot rely solely on price to clear the market and must combine Queueing Theory or Capacity Dispatch Optimization to assist in the solution.
  • Repeated Games: Remind the interviewer that supply and demand balance is not a One-shot Game, but a Repeated Game. Achieving a local optimum in the short term through aggressive price discrimination or squeezing capacity may destroy trust (Reputation) and lead to user churn. Therefore, the algorithm's objective function must include long-term metrics such as "user retention" or "driver ecosystem health."
  • Psychological Factors: Algorithms are rational, but humans are boundedly rational. Mention the impact of "fairness" on the game; for example, a driver's perception of dispatch fairness will directly affect their compliance.
Core Script Summary:
"The best algorithms are not just about solving mathematical equations, but about a deep understanding of human nature. My goal is to use mechanism design so that every self-interested individual in the system, while pursuing their own interests, spontaneously derives an efficient and fair global supply and demand balance."

Ace your next interview with real-time, on-screen guidance from GankInterview.

Try GankInterview

Related articles

A fall recruitment timeline explainer for technical R&D and algorithm roles: how to navigate key milestones in online applications, written tests, and interviews
Interview Prep•Jimmy Lauren

A fall recruitment timeline explainer for technical R&D and algorithm roles: how to navigate key milestones in online applications, written tests, and interviews

The article’s core conclusion is clear: for technical R&D and algorithm roles, “fall recruiting” is not a one‑off application that starts in...

Jul 4, 2026
A Comprehensive Guide to Fintech and Bank IT Fall Recruitment: Planning the Pace of Unified Written Exams and Multiple Interview Rounds
Interview Prep•Jimmy Lauren

A Comprehensive Guide to Fintech and Bank IT Fall Recruitment: Planning the Pace of Unified Written Exams and Multiple Interview Rounds

The core takeaway of bank IT and fintech autumn recruitment is clear: this is a highly standardized, long-term campaign centered on unified...

Jul 4, 2026
Stop being a workhorse for nothing: how to refactor your current “shit‑mountain” project into the most useful interview prep before you get “optimized.”
Interview Prep•Jimmy Lauren

Stop being a workhorse for nothing: how to refactor your current “shit‑mountain” project into the most useful interview prep before you get “optimized.”

The article’s core conclusion is straightforward: truly valuable shit‑mountain refactoring is not about making legacy code elegant, but abou...

Jul 1, 2026
Being employed is your greatest privilege: How to launch a “defensive counterattack” in interviews and secure your desired level premium?
Interview Prep•Jimmy Lauren

Being employed is your greatest privilege: How to launch a “defensive counterattack” in interviews and secure your desired level premium?

The real dividend of interviewing while employed is not the mere fact that “I still have a job,” but that you possess choice, time windows,...

Jul 1, 2026
LeetCode Will Eventually Be Flattened by AI, but Mathematics Is Forever the Ultimate Moat: The Endgame of Algorithm Interviews in the Era of Large Models
Interview Prep•Jimmy Lauren

LeetCode Will Eventually Be Flattened by AI, but Mathematics Is Forever the Ultimate Moat: The Endgame of Algorithm Interviews in the Era of Large Models

After large models have fully permeated the hiring process, grinding LeetCode is rapidly losing the differentiation it once had: code can be...

Jun 6, 2026
Great at coding, yet failing the HR interview? How tech professionals can rethink the STAR interview method with a “product marketing” mindset
Interview Prep•Jimmy Lauren

Great at coding, yet failing the HR interview? How tech professionals can rethink the STAR interview method with a “product marketing” mindset

Many technologists write excellent code yet stumble repeatedly in HR and behavioral interviews. The issue is often not their ability, but ch...

Jun 6, 2026