arXiv:2105.00325v1 [cs.GT] 1 May 2021
A Game Theo retic Algorithm for Elite Customer Identification in Online
Fashion E-Commerce
Chandramouli K
Gopinath A
Girish Satyanarayana
Ravindra babu Tallamraju
§
Abstract
Myntra is an online fashion e-commerce company based in
India. At Myntra, a market leader in fashion e-commerce
in India, customer experience is paramount and a significant
portion of our resources are dedicated to it. Here we describe
an algorithm that identifies eligible customers to enable
preferential product return processing for them by Myntra.
We declare the group of aforementioned eligible customers
on the platform as elite customers. Our algorithm t o identify
eligible/elite customers is based on sound principles of game
theory. It is simple, easy to implement and scalable.
Keywords Game Theory, Nash Equilibrium, E-
Commerce, Customer Experience, Product return
1 Introduction
Game theory is a method of studying strategic inter-
actions. It has it’s origins in the works of John von
Neumann and O skar Morgenstern [9]. Later works by
prominent mathematicians and economists like John
Nash, Reinhard Selten, Eric Maskin, Roger Myerson
etc., established the field of game theory with applica-
tions to a diverse range of areas like computer science,
social science, biolog y, logic etc.
Scientific study of customer interaction is an im-
portant problem in e-commerce. For e.g. [4] identifies
factors that play a role in customer loyalty towards e-
commerce. [7] focuses on the value of e-commerce to a
customer. [6] de scribes interface design for better cus-
tomer interaction with the e-commerce platform. [2]
empirically investigates the impact of soc ial media on
customer engagement in e-commerce.
One way to mathematically model and investigate
customer interaction with an e-commerce platform is via
game theory. For e.g. [1] analyses customer behaviour
as a function of reputation of the seller in e-co mmerce
systems utilizing game theory methodologies. [5] pro-
poses tools based on game theory for better customer
satisfaction in e-commerce. [8] models customer’s af-
ter service interaction as a game and analyses it and
Myntra Designs Pvt. Ltd.
Myntra Designs Pvt. Ltd.
Myntra Designs Pvt. Ltd.
§
Myntra Designs Pvt. Ltd.
suggests promotion strategies.
Here in our work in fashion e-commerce, we apply
equilibrium concepts developed by Nash and Selten and
design a novel classifica tion algorithm fo r elite customer
identification. In particular we model the customer-
Myntra relationship as a repeated game and identify
equilibrium strategy vectors. Based on this analy sis, we
then design a classification algorithm that identifies el-
igible/elite customers to enable preferential return pro-
cessing for them. Similar type o f work is present in
economics literature. For e.g .[3] mo de ls interaction be-
tween two anonymous economies as a repeated game
and analys e s equilibrium strategies. However our nov-
elty is in the application of similar techniques in fash-
ion e-commerce and in particular modeling customer-
Myntra interaction. Our key contributions are summa-
rized below.
Our contributions:
We model the problem of elite customer identifica-
tion at Myntra as a repeated game.
We solve the game for an equilibrium strategy.
With the equilibrium strateg y as a guide we design
an algorithm that identifies elite customers.
We compare and evaluate the algorithm on real
world da ta available at Myntra.
2 Background
In this section we present essential backgro und [10]
for our solution of the problem discussed. To start a
strategic form game Γ is a tuple (N, (A
i
)
iN
, (u
i
)
iN
).
Here
N = {1, 2, · · · , n} denotes a finite set of players.
A
1
, A
2
, · · · , A
n
are the strategy/a c tion sets of the
players.
u
i
: A
1
× A
2
× · · · A
n
R, i N , denote utility
functions of the players.
Let A
:
= A
1
× A
2
× · · · A
n
denote the set of strategy
vectors. A typical strategy vector is (a
1
, a
2
, · · · , a
n
)
Copyright © 2021 by SIAM
Unauthorized reproduction of this article is prohibited
where a
i
denotes the strategy of player i. Also denote
by A
i
, the Ca rtesian product A
1
× · · · × A
i1
×
A
i+1
× · · · A
n
. Therefore A
i
is the set of strategy
vectors that cons ists of strategies of a ll players other
than i and a typical strategy vector is of the form
(a
1
, a
2
, · · · , a
i1
, a
i+1
, · · · , a
n
). Moreover (a
i
, a
i
) is a
complete strategy vector for the game.
Given a strategic form game Γ =
(N, (A
i
)
iN
, (u
i
)
iN
) and a strategy vector a
i
A
i
,
we call a
i
arg max
a
i
A
i
u
i
(a
i
, s
i
), a best response
strategy of player i given a
i
. In simple terms, a
i
is
a strategy that maximizes player i’s utility given the
strategies of all other players in the game.
Given a strategic form game Γ =
(N, (A
i
)
iN
, (u
i
)
iN
), a strategy vector a
=
(a
1
, a
2
, · · · , a
n
) is called a pure strategy Nash equilib-
rium of Γ if
u
i
(a
i
) = max
a
i
A
i
u
i
(a
i
, a
i
) i N.
In simple terms, in a strategy vector that is a Nash
equilibrium every player has best response s trategy
given strategy vector of all other players.
It is impor tant to note that Nash equilibrium is
self-enforcing i.e., on the condition that every player
other than player i chooses his/her strategy in Nash
equilibrium then player i is better off with the strategy
in Nash equilibrium. In other words Nash equilibrium
secures cooperation among players.
In summary unilateral deviations from Nash equi-
librium ensure detrimental payoff for the deviate. In
a two-player game since there are only unilateral devi-
ations of Na sh eq uilibrium it is ideal that the second
player play Nash equilibrium strategy on the condition
that the first player plays Nash equilibrium strategy.
3 Problem Statement
At Myntra, a c ustomer’s product re turn request is
processed in the following manner. Once a customer
places a product return request, a doorstep pickup agent
arrives and receives the product. After a quality check
of the retur ne d item at a designated location refund to
the customer is initiated.
For a better customer experience we wish to identify
elite customers and do away with this quality check
process fo r these elite customers. To identify these elite
customers, we model the interaction between Myntra
and a generic customer a s a game.
We have two players in our game i.e. N =
{Myntra, customer}. Myntra has two actions i.e.
A
Myntra
= {immediate refund, no immediate refund}.
Similarly customer has two actions i.e. A
customer
=
{comply with return requirements,
Customer
Comply Don’t Comply
Myntra
Immediate
Refund (1, 1) (1, 2)
No Immediate
Refund (2, 1) (0, 0)
Table 1: Utility matrix of our game
don’t comply with return requirements}. Here in the
context of Myntra the strategy/action immediate re-
fund” refers to the removal of quality check process.
We de signed the utility matrix given in Table 1
for this game. Our rationality be hind this particular
choice for the utility matrix is as follows. For Myntra,
with u
Myntra
(No Immediate Refund, Don’t Comply) =
0 as baseline, u
Myntra
(Immediate Refund, Comply) =
1, u
Myntra
(No Immediate Refund, Comply) = 2 and
u
Myntra
(Immediate Refund, Don’t Comply) = 1 re-
flect the satisfaction levels of Myntra in the customer-
Myntra relationship. We assume the same for the cus-
tomer and obtain the utility matrix shown in Table 1.
4 Solution
Observe that (No Immediate Refund, Don’t Comply)
is a pure strategy Nash equilibrium for this game and
No Immediate Refund is the corr esponding strategy for
Myntra. However we note that the relatio n b etween
Myntra and the customer is an ongoing rela tion. Hence
a repeated game that repe ats with probability δ is a
more appropriate model for Myntra-customer relation-
ship. In this context the set of strategy vectors is given
by S = (A
Myntra
× A
customer
)
N
, set of sequences with
values in A
Myntra
× A
customer
. Here N denotes the set of
Natural numbers. The utility function v
Myntra
: S R
is given by v
Myntra
(s) =
P
k0
δ
k
u
Myntra
(s
k+1
) where
s = (s
1
, s
2
, · · · ) with s
k
A
Myntra
× A
customer
, k N
and u
Myntra
is given by Table 1. Similarly the utility
function v
customer
: S R is given by v
customer
(s) =
P
k0
δ
k
u
customer
(s
k
) where s = (s
1
, s
2
, · · · ) with s
k
A
Myntra
× A
customer
, k N and u
customer
is given by Ta-
ble 1.
Observe that in this setup the strat-
egy vector s
= (s
i
)
iN
with s
i
=
(no immediate refund, don’t comply) is a n equilib-
rium strategy vector with (v
Myntra
, v
customer
) = (0 , 0) as
any unilateral deviation in any repetition of the game
by a player diminishes the utility of the player. More-
over the equilibrium strategy “no immediate refund” is
currently employed by Myntra. This strategy however
is customer independent and treats all customers alike
Copyright © 2021 by SIAM
Unauthorized reproduction of this article is prohibited
and does not enable identification of elite customers
as well as preferential returns processing for elite
customers.
Consider the following strategy s
= (s
1
, s
2
, · · · )
with s
1
=(immediate refund, comply) and s
k
= s
(k1)
if s
(k1)
=(immediate refund, comply) else (no imme-
diate refund, don’t comply), that is cooperate to start
with and don’t cooperate once non-cooperation is ob-
served. We note that for this strategy the utility ob-
tained is given by
(v
Myntra
, v
customer
)
=
X
k0
δ
k
u
Myntra
(s
k
),
X
k0
δ
k
u
customer
(s
k
)
=
X
k0
δ
k
1
k
,
X
k0
δ
k
1
k
=
1
1 δ
,
1
1 δ
Now for any unilateral deviation by a player, at
any ga me repetitio n s tage k, the utility v
i
=
P
0lk1
δ
l
1
l
+ 2δ
k
, i N . For this s
to be an equi-
librium, from the definition, we require
X
0lk1
δ
l
1
l
+ 2δ
k
1
1 δ
=
1 δ
k
1 δ
+ 2δ
k
1
1 δ
= δ
1
2
Hence our strategy s
is a pure strategy Nash equilib-
rium if the proba bility of repetition of the game is at
least 0.5.
On a separate note, a relevant equilibrium concept
for the case of repeated games is subgame perfect Nash
equilibrium [10]. We als o note that s
can be shown to
be a subgame perfect Nash equilibrium.
We note here an important observation. Our
model of Myntra-customer relationship as a repeated
game a part from explaining current Myntra s trategy a s
an equilibrium strategy-there by validating the choice
of utlity matrix- suggests an alternative equilibrium
strategy vector given by s
.
We als o note here that there are other equilibrium
strategies as well. For e.g. s = (s
1
, s
2
, · · · ) with
s
1
=(immediate re fund, comply) and s
k
=(immediate
refund, comply) if s
k1
=(immediate re fund, comply)
or (no immediate refund, does not comply) else s
k
=(no
immediate refund, don’t comply) is an equilibrium
strategy pr ovided δ = 1 and each such equilibrium
strategy gives an algorithm to identify elite customers.
Here we chose a strategy that is most c autious from the
point of view of Myntra.
With this analysis in place we design the following
algorithm that enables us to identify elite customers
5 Algorithm
Algorithm 1 Identify Elite Customers
Input:
Historic return request compliance status of the customers
and purchase sequence of the customers on Myntra
Threshold τ = 0.5
Output:
Eliteness of the customer
1: procedure CLASSIFY CUSTOMERS:
2: for each customer do
3: Etimate the probability of repetition δ of the
game from historic purchase sequence data.
4: if δ < τ then customer is not elite
5: else
6: if customer c omplied in all returns then
customer is elite
7: else customer is not elite
8: return Eliteness fo r customers
Our algorithm given the sequence of purchases of
a cus tomer in 9 months into the past on the platform
estimates the probability of repetition δ. We say that
the game is repeated on the condition that the time gap
between consecutive purchases of the customer is less
than or equal to 90 days. We count the number of times
the game is repeated utilizing the purchase sequence of
the customer and estimate the probability of re petition
δ. The choices -9 months, 90 days- for time periods to
estimate δ are motivated by business requirements.
We collect the historical product return compliance
status of the customer. With these quantities at its dis-
posal the algorithm compares the repetition probability
estimate with the threshold τ and assigns eliteness to
the customer. We note that with our utility matrix we
get that τ = 0.5.
We no te that our algor ithm is very intuitive. In
summary it classifies a customer as elite if his freq ue nc y
of purchases is more than 0.5 and has perfect returns
compliance history. We also note that our algorithm
is dynamic. As the 9 month window is dynamic the
elite group of customers changes with time and a given
customer is required to be a freq uent purchaser from
Myntra to be cons istently elite.
6 Experiments
We evaluated our algorithm on historical real world e-
commerce data available at Myntra. We note two types
of err or in our classification. We classify a customer
as elite and the cus tomer doesn’t comply, we call them
as false -positives (fp). We call as false-negatives (fn) all
those customers that are not elite but c omply. Similarly
Copyright © 2021 by SIAM
Unauthorized reproduction of this article is prohibited
we define true-positives (tp) and true-negatives (tn) in
an analogous manner. With these definitions in place we
compute precision and re call and evaluate our algorithm
We choose the day October 2, 2020 to evaluate our
algorithm. We obtained for each customer that placed
a return request on the Myntra platform on this day the
repetition probability estimate and also product return
compliance status of the customer in the past 9 months.
We classified the customer accor ding to Algorithm 1
Our emphas is is on false -positives as it impacts re-
turned product resale value. Hence we aim to maximize
precision with a satisfactory recall. We note here that
precision is given by
tp
tp+fp
and recall is given by
tp
tp+fn
.
We compare d our algorithm aga inst classification
algorithms like logistic reg ression and random forests.
For these algorithms s ome of the important features are
summarised in Table 3. We note that our algo rithm
has better recall compared to logistic regression and
random forests and all algorithms report c lose to perfect
precision. We summarise the comparison in Table 2
We note that our algorithm is similar to a deci-
sion tree. Here, unlike splitting of a node in a classical
decision tr ee, we split the node based on eq uilibrium
strategy given by the game. Hence it may be possible
to fine tune hyper parameters of ensemble classific ation
algorithms, for e.g., of random forests to achieve better
performance. However unlike these classification algo-
rithms our algorithm is easily explainable - it is easy to
see the conditions under which a customer is elite, a de-
sirable feature for businesses in the context of customer
experience. In summary, the classific ation algorithm
based o n game theory methodologies achieves desired
precision with a satisfactory recall and has the addi-
tional advantage of explainability.
Our Logistic Random
Algorithm Regression Forests
Precisio n 99.7% 99.7% 99.6%
Recall 59.0% 48.4% 57.8%
Table 2: Comparis on of our classification algorithm
7 Conclusion
We modeled the pro ble m of identification of elite cus-
tomers and preferential returns processing for them as
a two-player repeated game and solved for its equilib-
rium strategy. We designed an algorithm based on this
analysis a nd evaluated the algorithm on real-world data
available at Myntra. We note that our algorithm is scal-
able, easy to implement and has performance compara-
ble to classification algorithms like logistic regression
and random forests. Moreover it has the advantage of
Features Description
#Q2 No. of complia nce failures
in last 9 months by customer
#Q1 No. of complia nce s uccesses
in last 9 months by customer
nserves No. of times the
returned product is served by Myntra
δ Estimated probability of
repetition of the game
l status Compliance state of
last return r equest by customer
Table 3: Important features o f the classifica tion algo-
rithms
explainability.
References
[1] Roberto Aringhieri, Davide Duma, and Vito Fragnelli.
Modeling the rational behavior of individuals on an e-
commerce system. Operations Research Perspectives,
5:22–31, 2018.
[2] Abd elsalam H Busalim, Fahad Ghabban, et al. Cus-
tomer engagement behaviour on social commerce plat-
forms: an empirical study. Technology in Society,
64:101437, 2021.
[3] Gabriele Camera, Marco Casari, and Maria Bigoni.
Cooperative strategies in anonymous economies: an ex-
periment. Games and Economic Behavior, 75(2):570
586, 2012.
[4] David Gefen. Customer loyalty in e-commerce. Jour-
nal of the association for information systems, 3(1):2,
2002.
[5] Robert H Guttman an d Pattie Maes. Cooperative
vs. competitive multi-agent negotiations in retail elec-
tronic commerce. In International Workshop on Coop-
erative Information Agents, pages 135–147. Springer,
1998.
[6] Martin G Helander and Halimahtun M Khalid. Mod-
eling the customer in electronic commerce. Applied er-
gonomics, 31(6):609–619, 2000.
[7] Ralph L Keeney. The value of internet commerce to the
customer. Management science, 45(4):533–542, 1999.
[8] Hongzhen L ei, Di Lu, and Hon gHong Zhang. Research
on promotion of consumers’ ap plication of after ser-
vice in online shopping based on evolutionary game
theory–introduction of smart contract. In E3S Web of
Conferences, volume 233. EDP Sciences, 2021.
[9] Oskar Morgenstern and John Von Neumann. Theory
of games and economic behavior. Princeton university
press, 1953.
[10] Yadati Narahari. Game theory and mechanism design,
volume 4. World Scientific, 2014.
Copyright © 2021 by SIAM
Unauthorized reproduction of this article is prohibited