Problem
X5 Digital delivers orders from Pyaterochka and Perekrestok stores. When demand grows, picking queues and courier waits grow, and past critical waiting times a store closes for delivery. Its orders then load neighbouring stores. To shed load, the team worsens delivery terms (minimum basket, delivery fee) in five surge levels. The level came from a hand-made 4×4 matrix of two load indicators, hard to tune and of unknown effectiveness.
Example from the article: when half of the couriers leave a shift at once, courier load jumps briefly, and the matrix sets maximum surge.
Solution in brief
Treat surge choice as an RL problem. Randomize surge around the matrix value on selected stores to get logged data, train a CatBoost regressor to predict a reward that combines turnover and load, and pick the level with the highest prediction. A 4-week pilot on 500 stores cut store closure time without a significant drop in turnover.
Questions this case answers
- How to choose an intervention level per unit when the intervention shifts load onto neighboring units and the reward mixes revenue with operational load
- How to learn the value of each action level from logs with randomized exploration around a fixed rule, then pilot the policy on a subset of units
- How to choose a surge level for delivery terms per store instead of a static load matrix
- How to train a reinforcement-learning-style Q-function model from logged data with randomized actions
Tools and methods
- Q-function regression (CatBoostRegressor, tuned with Optuna) — predicts long-run reward for a store state and a surge level
- Randomized exploration of surge levels — gives data on different levels in similar states
- Online feature store (Redis) and Kafka — deliver store features to the model and the chosen level to the service that sets terms
- Store-level pilot with a control group — checks business metrics before rollout
Google or a one-time email code. No password.
