MSC 93A30
DOI: 10.14529/ m m p 150204
SIMULATION OF CONCURRENT GAMES
A.N. Ivutin, Tula State University, Tula, Russian Federation, [email protected],
E. V. Larkin, Tula State University, Tula, Russian Federation, [email protected]
Concurrent games, in which participants run some distance in real physical time, are investigated. Petri-Markov models of paired and multiple competitions are formed. For paired competition formula for density function of time of waiting by winner the moment of completion of distance by loser is obtained. A concept of distributed forfeit, which amount is defined as a share of sum, which the winner gets from the loser in current moment of time is introduced. With use of concepts of distributed forfeit and waiting time the formula for common forfeit, which winner gets from loser, is obtained. The result, received for a paired competition, was spread out onto multiple concurrent games. Evaluation of common wins and loses in multiple concurrent game is presented as a recursive procedure, in which participants complete the distance one after another, and winners, who had finished the distance get forfeits from participants, who still did not finish it. The formula for evaluation of common winning in concurrent game with given composition of participants is obtained. The result is illustrated with numerical example.
Keywords: competition; concurrent game; Petri-Markov net; distance; distributed forfeit; waiting time; common winning; paired competition, multiple competition.
Introduction
At present time the game theory is widely used in economics, industry, military, parallel computing and in other spheres of human activity. Traditionally the game theory was developed as a methodology of forming of strategies in struggle for some resource, and the dynamics of game was interpreted as a correction of strategy during the game without link activity of participants to real physical time [1]. As a matter of fact any competition is developed in real physical space/time. The space aspect lies in necessity of conversion of any resource (material, energetic, informational, etc.) of pre-specified volume by participants. This resource below will be symbolically called "the distance". The space aspect lies in the fact, that a concurrent participant can overcome the distance not instantly, but in finite time. Time of overcoming of distance by a participant is random and individual for every participant.
Time aspects of concurrent game evolution are investigated insufficiently. In particular the problem of evaluation of forfeits, when forfeits are linked to a time factor is not solved.
In this article there were accepted the following restrictions:
1. Concurrent game consists in passing the equal distance by participants, in real physical time: all participants start passing the distance at the same time;
2. The time of passing the distance by any of participant is random and is defined for each participant individually with precision to density of distribution;
3. Winning or losing in competition is understood as finishing the distance and being the first or the second;
4. The winner doesn't get the forfeit, value of which is distributed in time, until the loser finishes the distance.
Passing the distance by participants may be presented as a parallel random process. For its investigation a mathematical apparatus of Pciri Markov nets [2], which is a development of formalism of Petri nets (both classic and time-extended) [3-6] may be used. The usage the formalism of Pciri Markov nets allows to define a time factor, which stipulates a forfeit from loser to winner, and to evaluate cost parameters of a concurrent game.
1. Waiting Time at Paired Competition
Competition of two participants is represented by a Pciri Markov net [2]:
^2 =(n2,M2) , (1)
where n2 = {A2, Z2, R2AZ, R2ZA} is a structure of the Petri net; M2 = [q2, f2 (t), L2] is a semi-Markov process; A2 = {a\, a2} is a set of places; Z2 = {z1,z2} is a set of transitions;
R2AZ = ^ 0 j ^ is an adjacency mktrix, wCich represents transitions of set of places
A2 to set of transactions Z2\ R2ZA = ^ 0 0 ^ is an adjacency matrix, which represents
transitions of set Z2 to set of places A2\ q2 is a vector, which determines probabilities
"0 fi (t) " • . • , is a matrix ot
Z2 f2 (t) =
0 f2 (t)
time densities of stay of semi-Markov process stay in places of set A2\ L2 = ^ 0 0 J is a
Z2
The following restrictions are imposed on time densities: f1>2 (t) = 0, when t < 0 and
oo
J fi,2 (t) dt = 1.
0
Consider the situation, when the first participant finished the distance at a moment t and waits, while the second participant finishes. In this case using a Pciri Markov net (1) there can be formed a semi-Markov process, see fig. 1.
State a0 simulates the start of semi-Markov process. State a1 is the absorbing one and simulates finishing of the distance by the second participant, if the first participant hadn't finished it. State a2 is the absorbing one and simulates the end of waiting by the first participant for finishing of the distance by the second participant. The subset of states 3 simulates the process of completion of the distance by the second participant in the case when the first participant had finished it.
Time counting in semi-Markov process, shown on fig. ¿.begins when the first participant gets the finish of the distance. Probability of the fact that the first participant completes his distance exactly at time t is equal to f1(T)dT. Probability of the fact that second participant does not finish the distance at this time is equal to 1 — F2 (t), where F2 (t) is the distribution function corresponding to time density f2 (t). Events of
3
oo oo
paoi3 = J [1 — F2 (t)] f1 (t) dT = f F1 (t) f2 (t) dt. Weighted density of waiting time may
00
be received by means of cutting off from correlation integral the meanings with negative
oo
argument, h1^2 (t) = n (t) J f1 (r) f2 (t + r) dr, where n(t) is a Heaviside function.
0
Therefore, the density of waiting time, when the first participant finishes his distance first, is the following
oo
n (t)I fl (T) f2 (t + r) dr f 1^2 (t) =-0-• (2)
J Fl (t) dF2 (t) 0
It is necessary to say, that operation (2) is not the commutative one, and in general
o
n (t)I f2 (T) fl (t + r) dr f2^1 (t) = -0- = fl^2 (t) • (3)
J F2 (t) dFi (t) 0
As an example of waiting time definition consider some significant practical cases. Case 1. Time density f1(t) = 8(t — T1) is a shifted Dirac ¿-function, f2(t) is an arbitrary density function with expectation T2 and T2min < arg f2 (t) < T2max. Expression (2) for this case takes the form
f,2(t) = fTr «
Depending on location of functions f1 (t) and f2(t) on time axis, the following situations are possible:
A) T1 < T2 min
In this situation denominator of (4) is equal to 1 and expression (4) transforms to f1^2(t) = f2(t+T1). The set of nonzero values of function f1^2(t) is defined by T2min — T1 <
arg [f2(t + T1)] < T2 max — T1
T2 min < T1 < T2 max
In this situation waiting time density is defined as (4), and the set of nonzero values of function f^2(t) is defined by 0 < arg [f2(t + Tl)] < T2max — Tl.
C) Ti > T2 maxIn this situation expression (4) is impossible due to the fact, that difference of time intervals completely shifts into area of negative values of argument (the loser cannot wait the winner).
Case 2. Time density is represented by shifted Dirac ^-function, i.e. f2(t) = 8(t — T2), fl(t) is an arbitrary time density with expectation Tl and Tlmin < arg fl (t) < Tlmax. Expression (2) for this case takes the form
fl-«) = fr1 ™
Depending on location of functions f^t) and f2(t) on time axis, the following situations are possible:
A)T2 < Tl minIn this situation expression (5) is impossible.
B) Tlmin < T2 < Tlmax-
In this situation waiting time density is equal to (5), and the domain of nonzero values of function f^2(t) is defined by to 0 < arg [f]_^2 (t)] < T2 — Tlmin.
T2 > Tl max •
In this situation fl^(t) = flT — t) and T2 — Tlmax < arg [fl^2 (t)] < T2 — Tlmin-
Case 3. Time density f2 (t) is represented by an exponential law f2 (t) = X exp (—Xt), fl (t)
Expression (2) for this case takes the form:
00
V (t) I fl (t) X exp [—X (t + t)] dr
fl^2 (t) = -- = X eXP ( — Xt) ■
1 — J [1 — exp(—Xt)] dFl (t)
t=0
It is obvious, that the case under consideration reflects the property of absence of after-effect in pure Markov processes with continual time. Absence of after-effect can be formulated as follows: if time density between two events is distributed by an exponential law, then for external observer time until the next event is distributed by the same law
fl (t)
simulates an external observer, who is involved into "competition" with Markov process. Independently of events before observation, new time counting begins at the moment of starting of observation.
2. Evaluation of Effectiveness of a Paired Competition
One of the most important factors of competition simulation is evaluation of its effectiveness. The natural model of evaluation of effectiveness is a model, in which the participant, who had finished, received the forfeit from a loser. Owing to the fact that competition in a considered case is developing in time and there is a valuation of waiting time (2), the forfeit is defined as a distributed payment s\2 (t), received by the winner
(participant 1) from the loser (participant 2) in time t. In total the first participant gets from the second participant forfeit which is defined by integral
S+2 = (t) • S12 (t) dt. (6)
J 0
If the second participant wins, the first participant pays the forfeit
/><x
s+ = /2^1 (t) • S21 (t) dt, (7)
0
S21 (t)
(participant 1) in time t.
Generally s 12 (t) = S21 (t), /1^2 (t) = /2^1 (t), so s+2 = s+i-
3. Individual Competition of J Participants
Competition is defined with Petri-Markov net
= (nj, Mj), (8)
Ш ^ [ai, ..., aj, ..., aj} , [zi,Z2]
0 1 0 1 01
1 0
1 0
1 0
(9)
M j =
(1,0)
0 fi (t) 0 fj (t) 0 fj (t)
1 0
1 0
1 0
(10)
where {a1, ..., aj, ..., aJ} is a set of places; {z1, z2} is a set of transitions; /j (t) is the time density of distance completion by participant j, 1 < j < J.
If all J participants start the distance simultaneously, then the probability that the j-th participant wins is determined as
/тс J
fj (t) • П [1 - Fk (t)] dt. k =1
(И)
k = j
Time density function of finishing by j-th participant-winner is determined as
fwj (t)
fj (t) ^П k =1 [1 - Fk (t)]
k = J_
Pwj
(12)
In a specific case, when fj (t) = Xj exp [-Xjt] , 1 < j < J, we get
jj
Pwj ^ JJ X ; fwj(t) = Xj • exP -t •Yl XA • ' j=l \ j=l '
Let us note, that (11), (12) describe conditional time density of winning of participant j, when all other participants lose competition. Therefore the conditional time densities of achievement of transition z2 for all J participants are equal, and the probabilities are quite different for different participants.
Time density function and probability of taking the last place in competition is determined as
fj (t) • UJk = 1 Fk (t) k = j
fj (t) =-^-; (13)
pwj (a)
/œ J
fj (t) • n Fk (t) dt. (14)
k =1 k = j
Consider the case, when the fact of completion by any 1 < K < J participants from J is important. Let us construct the set NJ of J-digit binary natural codes and assign the j-th binary digit Oj to the j-th participant. Digit Oj may take two values:
!
0, when participant j finish the distance; , ,
1, when participant j does not finish the distance.
Let us select from the set Nj the subset Nf C Nj of binary J-digit codes, which have K units and J — K zeros
Nf = {m, ..., njf), nc(j,K)} , (16)
where C [J, K] = KlJl__Ky is quantity of J-digit codes with K units, which is equal to K-th binomial coefficient; C (J, K) is the ordinal number of a code in set (16);
/ c(J,K) c(J,K) c( J,K) \ /.„x
nr(jK) = a/ aj ). (17)
lc(J,K) = , Oj , °J J .
Define a function $ fj ,oC(j' K which takes two values:
to (f c(j,k)) i fj(t), when jk) = 1
$ f [1 - f3 (t)], whenof'k) = 0. ^
Taking into account (18) we get the dependence for time distribution of completion of competition by any K participants from J:
C(J,K) J
fK (t)= £ n$ {fj jJK0 • (19)
c(J,K) = l j=l
The first derivative of (19) the considered gives time density
С(J,K) nJ ф (f c(J,K)\
fK(t) =dEJ)=iUj=t f'>. m
It is obvious, that (20) is the time density (but not weighed density) due to the fact, that after finishing the distance by К participants, the number of participants, who finishes the distance should only increase. Since multiple participation in the competition is impossible.
4. Evaluation of Effectiveness of Individual Competition
In this case it is natural to determine forfeits as a payment matrix of size J x J:
S (t) = [Sij (t)]. (21)
where Sj (t) is the distribution of forfeit, which in time t the winner (participant i) receives from the loser (participant j).
Generally Sj (t) = Sji (t), therefore matrix (21) is asymmetrical. Due to the fact, that winner can't forfeit himself, Sii (t) = 0.
In waiting time participant i wins from participant j a forfeit with total value equal
to
S+ = fi^j (t) • Sij (t) dt, (22)
J 0
where fi^j (t) is evaluated by expression (2).
Total forfeit, which the participant can get in the competition, depends on the sequence of completion of distance with use of recursive procedure.
Without loss of generality, we consider the situation when the places in competition are aligned increasing order of indices j. In accordance with accepted order on the first step the first participant leaves the competition as a winner. He gets from every participant, who stays on the distance, the forfeit with value equal to
/•œ
S^iiji = fii ji (t) • Sij (t) dt, 2 < ji < J, (23)
0
where ji is an index, corresponding to the first step of recursion.
The total prize of the first participant as a winner after first step is equal to the sum of forfeits obtained from participants with numbers from the second to J-th:
J
SÎs =£ S+iji. (24)
ji=2
After the first participant completed the competition participants from the second to the J-th stay in a concurrent game. Time densities of completion of distance by the rest [J(a) — 1] participants are defined by
j (t) = fiij (t), 2 < ji < J. (25)
In general the z-th participant i(a) wins from participants with number from (i + 1)-th to J-th, forfeits with values equal to
sj = fiij (t) • Sij (t) dt,i + 1 < j < J. (26)
10
Total value of winning of the ¿-th participant after the ¿-th stage is equal to the sum of forfeits, obtained from participants with numbers from the (i + 1)-th to the J-th:
+ = E sj. (27)
ji=i+1
Time densities of completion of competition by the rest J — i — 1 participants are defined by
fM+1 (t) = fHj (t) ,i + 1 < ji < J. (28)
(J — 1)
obtained from the J-th participant is equal to
s+J-i)j_1Jj= s+J-i)j= f(J-i)j_1^Jj-1 (t) • s(J-i)J (t) dt- (29)
0
J
fjj (t) = fij-1)j_i^jj_i (t). (30)
In addition to winning forfeits from participants, that stay in competition, participants lose forfeits to those, who completed competition earlier. Total losses of the j-th participant
j — 1
j-i
i=1
= Y1 s+ji ■ (31)
In such a way, effectiveness of competition for the j-th participant is equal to
sjz = sj+ — sjs ■ (32)
It is necessary to say, that probability of announced above order of completion of distance (increment of indexes j) is equal to
j —1 ntt j
P (j = 1, 2, ■■■, J) = n / fi (t) n [1 — Fjn (t)] dt. (33)
i=iJ° jn=(i+l)n
Let us evaluate effectiveness of the participant with number one taking part in competition with given composition of participants. The mentioned participant can take any place from the first till the J-th. If the first participant takes the k-th place (1 < k < J), then quantity of commutations of participants with numbers 1 < j < J,j = k, is equal to M (j = k) = (J — 1)!. Designate the number of commutation by
oo
m(j = k), 1(j = k) < m(j = k) < M(j = k). Then the average winning of the first participant is equal to
J M (j=k)
(34)
j=1 m(j=k)
where j is the ordinal number of the place, hypothetically taken by the first participant; m(j = k) is the ordinal number of the commutation of indexes of participants with numbers from 2 to J s1m(j=k)Y, is the total winning of the first participant, who takes the j-th place, if places of other participants are distributed in accordance with m (j = k)-th commutation; P1, m(j=k)s is the probability of emergen ce of the m (j = k)-th commutation. It is obvious that all cases of commutations of places in competition form complete
J M(j=k)
group of incompatible events, thus P1,m(j=k)z = 1.
j=1 m(j=k)
5. Numerical Example
As an example let us consider the case of paired competition, which is described by a Petri-Markov net (1). Time densities f1 (t) and f2 (t) are equal to (fig. 5a):
( 0, when 0 < t< 0,5; h (t) = ^ ei, when 0,5 < t <1,5; f2 (t) = в\ exp (-e2 • t) 0, when t > 1,5.
(35)
prob, time
and pro
time
respectively.
b.
where parameters ei and e2 have the dimensions
It is obvious that fi (t) and f2 (t) have dimension
densities are quite equal, i.e. Ti = T2 = 1 [time]. Distribution functions, corresponding to time densities fi (t) and f2 (t), and having dimension [prob.] are as follows (fig. 5b):
time
. Expectations of time
0, 0 < t < 0, 5; F1 (t)= \ t - 0, 6, when 0,5 < t < 1,5;
1, when t > 1, 5.
[pro b.]
F2 (t) = 1 - exp (-t) [prob.]. (36)
In spite of equality of expectations of f1 (t) and f2 (t), the probabilities of winning of participants are quite different: pw1 = 0, 3834 [prob.]; pw2 = 0,6166 [prob.]. Waiting time densities are equal to (fig. 5c):
fi^2 (t) = ei exp (-e2 • t)
prob. time
f2^i (t) =
1
{
0,3834
If densities of forfeit are equal to
0, 3834 • exp (e2 • t) при 0 < t < 0, 5; 1 - 0, 2231 • exp (e2 • t) при 0, 5 <t < 1, 5.
prob. time
«12 (t) = S2i (t) = N • exp (-ct)
0 0,5 1,0 1,5
Fig. 2. Time densities and time distributions
where C the sum o:
doll.
time-prob. _
is a coefficient; c
i
time
is the rate of diminution of forfeit, then
forfeit received by the first participant from the second one with probability 0,6166, is equal to
= Q • ei exp [- (e2 + q) • t] dt
Q • ei
e2 + q
[doll.].
The sum of forfeit, received by the second participant from the first one with probability 0,3834, is equal to
4 = -Q- [1 + 1, 5819 • exp 0, 5 (e2 - q) - 0, 5819 • exp 1, 5 (e2 - q)] +
+ 2'6082Q (exp 0, 5q - expl, 5q)
In spite of equality of expectations fi(t) and f2(t), and equality of forfeit densities, sums, that participants can potentially win and probabilities of winning are quite different, and this obstacles should be taken into account when planning concurrent games.
Conclusion
We have presented a concurrent game as a process of passing the distance by participants in accidental time, which is defined with accuracy to distribution density. Use of mathematical apparatus of Petri Markov nets allows to determine winner's waiting for other participants time. It also allows to evaluate total forfeits, which losers pay to winner in the case when forfeit density is assigned. Moreover waiting time allows to analyze multiple competition and to evaluate a total participant's winning for known composition of participants.
Time and stochastic characteristics were obtained in a general form. They are essential for planning the strategy and tactics of concurrent game if strategy/tactics change time densities of distance passed by participants. Next researches in this area may be directed to working out of the apparatus, which links a proposed method of competition simulation with traditional game theory. Moreover the method may be useful for solving the problem of game optimization since it permits to generate a criterion function or restrictions for this problem. Development of this method may be directed to working out of a simple engineering method of effectiveness calculation with use of only numerical characteristics of time distributions.
References
1. Von Neumann J., Morgenstern O. Theory of Games and Economic Behavior. Princeton, N.Y., Princeton University Press, 2007.
2. Ivutin A.N., Larkin E.V., Lutskov Y.I., Novikov A.S. Simulation of Concurrent Process with Petri-Markov Nets. Life Sci J., 2014, vol. 11, pp. 506-511.
3. Petri C.A. Nets, Time and Space. Theor. Cornput. Sci., 1996, vol. 153, no. 1-2, pp. 3-48. DOI: 10.1016/0304-3975(95)00116-6
4. Reisig W. Petri Nets and Algebraic Specifications. Theor. Cornput. Sci., 1991, vol. 80, no. 1, pp. 1-34. DOI: 10.1016/0304-3975(91)90203-E
5. Jensen K. Coloured Petri Nets: Basic Concepts, Analysis Methods and Practical Use: Vol. 1. London, Springer-Verlag, 1996. DOI: 10.1007/978-3-662-03241-1
6. Ramaswamy S., Valavanis K.P. Hierarchical Time-Extended Petri Nets (H- EPN) Based Error Identification and Recovery for Hierarchical System. IEEE Trans, on Systems, Man, and Cybernetics- PartB: Cybernetics, 1996, vol. 26, no. 1, pp. 164-175. DOI: 10.1109/3477.484450
Received February 11, 2015
УДК 519.83 DOI: 10.14529/mmpl50204
МАТЕМАТИЧЕСКОЕ МОДЕЛИРОВАНИЕ СОРЕВНОВАТЕЛЬНЫХ ИГР
А.Н. Ивутин, Е.В. Ларкин
Исследуются соревновательные игры, заключающиеся в прохождении партнерами некоторой дистанции в реальном физическом времени. Сформированы Петри-Марковские модели парных и множественных соревнований. Для парного соревнования получено выражение для плотности распределения времени ожидания победителем завершения дистанции проигравшим участником. Введено понятие распределенного штрафа, величина которого определяется как доля суммы, которую в текущий
момент времени получает победитель от побежденного. С использованием понятий распределенного штрафа и времени ожидания получено выражение для суммарного штрафа, который победитель получает от побежденного. Результат, полученный для парных «соревнований», распространен на множественные соревновательные игры. Оценка суммарного выигрыша и проигрыша в множественных соревнованиях представлена в виде рекурсивной процедуры, в которой участники заканчивают дистанцию один за другим, и победители, уже закончившие дистанцию, получают штрафы от участников, еще не закончивших ее. Получено выражение для оценки суммы выигрыша в соревновательной игре с определенным составом участников. Результаты иллюстрируются численным примером.
Ключевые слова: соревнование; соревновательная игра; сеть Петри-Маркова; дистанция; распределенный штраф; время ожидания; суммарным выигрыш; парное соревнование; множественное соревнование.
Алексей Николаевич Ивутин, к&ндидсХт технических Нс1ук. доцент, кафедра «Вычислительная техника:», Тульский государственный университет (г. Тула, Российская Федерация), [email protected].
гьвгении Васильевич Ларкин, доктор технических наук, профессор, кафедра «Ро-
»
тет (г. Тула, Российская Федерация), [email protected].
Поступила в редакцию И февраля 2015 г.