Multi-Agent Parking Problem with Sequential Allocation
Aniello Murano, Silvia Stranieri and Munyque Mittelmann
University of Naples Federico II, Naples, Italy
Keywords:
Autonomous systems, Resource Allocation, Multi-Agent Systems, Nash Equilibrium, Smart Parking.
Abstract:
In this paper, we study the multi-agent parking problem with time constraints adopting a game-theoretic per-
spective. Precisely, cars are modeled as agents interacting among themselves in a multi-player game setting,
each of which aims to find a free parking slot that satisfies their constraints. We provide an algorithm for
assigning parking slots based on a sequential allocation with priorities. We show that the algorithm always
finds a Nash equilibrium solution and we prove its complexity is in quadratic time. The usefulness of our ap-
proach is demonstrated by considering its application to the parking area of the Federico II Hospital Company
in Naples. Finally, we provide experimental results comparing our algorithm with a greedy allocation and
evaluating its performance in the application scenario.
1 INTRODUCTION
With the fast development of economy and the im-
provement of city modernization, traffic congestion
and parking have become serious social problems.
Studies conducted in big cities report that daily, on
average, drivers take more than eight minutes to park,
causing the 30% of traffic (Ayala et al., 2011; Shoup,
2005). Such statistics raise several side effects,
among which a high fuel consumption, high CO
2
emissions, but also a stressful lifestyle for drivers.
The growth of Artificial Intelligence applications to
automotive is constantly increasing the request for
smart solutions to parking. This research field is
well identified as smart parking (Lin et al., 2017).
The competitive nature of the parking process, dur-
ing which the drivers compete in order to get an
available parking slot for their cars, is the inspira-
tion for this work. Indeed, by exploiting basic set-
tings of strategic reasoning for multi-agent systems,
we model the parking process as a competitive multi-
player game in which each car is an interacting agent
with the ultimate goal of getting an available slot that
satisfies its own constraints. In the parking prob-
lem, we aim at parking as many cars as possible,
while satisfying their requirements. This situation can
be viewed as a non-cooperative Multi-Agent System
(MAS) (Wooldridge, 2009), in which each individual
tries to maximize their own objective (getting a park-
ing slot within their time restriction), independently
from others’ objectives and preferences.
We address the parking problem by means of an
approach based on Game Theory and Strategic Rea-
soning. Specifically, we model this problem as a
multi-agent game where cars are competitive agents,
acting concurrently and under perfect information. In
our setting, each agent has a time constraint denoting
the maximum time he can use to park. Also, for each
slot, we have a time needed to be reached from each
entrance. Then, for an agent, the choices for a slot are
strategies whose payoff reflects the time he consumes
to park his own car (or the fact that he cannot park at
all). Solving the parking problem corresponds to find-
ing a solution, that is a strategy profile, that is an equi-
librium among the agents. We provide an algorithm
that finds such a strategy profile and we show that its
solution is a Nash equilibrium. We analyze the algo-
rithm’s complexity and compare its performance with
a greedy approach for parking selection. Finally, we
illustrate our approach and show its effectiveness by
considering a real application scenario, specifically,
the parking area from the Federico II Hospital Com-
pany.
Our Contribution. The contribution of this work is
twofold. From one side, we come up with a game-
theoretic formalization for the multi-agent parking
problem. The main advantage is to provide grounds
for analyzing solutions based on strategic reasoning,
which we illustrate by considering Nash equilibrium.
On the other side, we propose a quadratic time al-
484
Murano, A., Stranieri, S. and Mittelmann, M.
Multi-Agent Parking Problem with Sequential Allocation.
DOI: 10.5220/0011689800003393
In Proceedings of the 15th International Conference on Agents and Artificial Intelligence (ICAART 2023) - Volume 3, pages 484-492
ISBN: 978-989-758-623-1; ISSN: 2184-433X
Copyright
c
2023 by SCITEPRESS Science and Technology Publications, Lda. Under CC license (CC BY-NC-ND 4.0)
gorithm (and its implementation
1
) that finds a Nash
equilibrium for the allocation of the parking slots. In
our experimental results, the allocation of slots in-
duced by our solution was more efficient than the
greedy approach, in terms of the number of cars that
successfully find a parking slot. Indeed, consider a
scenario in which there are three vehicles, V
1
, V
2
, and
V
3
, looking for a parking, and three slots available A,
B, and C. Assume now that V
1
, V
2
, and V
3
have up
to 7, 5, and 3 minutes to accomplish the parking, re-
spectively. Also, assume that slots A, B, and C re-
quire 2, 3, and 5 minutes to be reached, respectively.
Assume now that V
1
picks A and V
2
picks B; then,
V
3
would not have enough time to reach the remain-
ing slot C. Contrarily, a solution that allows parking
all vehicles by accommodating their requirements is
to assign V
1
, V
2
, and V
3
to C, B, and A, respectively.
This is exactly what our algorithm would return as a
solution. This positive experimental and complexity
results show our solution provides a valuable com-
promise with respect to an optimal, but exponential,
brute-force approach that would check all possible
distributions of cars over available slots.
Note that the multi-agent game model we set up
can also admit more than one Nash equilibrium. In
game theory, in general, this is problematic as the
players do not know which one to choose. In our set-
ting, however, this is not a problem as it is the alloca-
tion sequence will induce a unique strategy profile.
Outline. The paper is organized as follows: We
start by presenting the related works in Section 2.
Then, in Section 3 we introduce the model and the
parking problem at the Federico II Hospital Company
as a case study. In Section 4, we propose an algorithm
for prioritized multi-agent parking selection and ana-
lyze it in terms of complexity and a game theoretic
solution concept. In Section 5 we present experimen-
tal results in order to (i) compare the performance of
the proposed solution in relation to a greedy approach
and (ii) benchmark the algorithm in the case study.
Finally, Section 6 concludes the paper.
2 RELATED WORK
Smart Parking. Smart parking solutions literature
is very reach and diversified. In (Lin et al., 2017),
the authors provide a large survey on smart parking
modeling, solutions, and technologies as well as iden-
1
The source code is available at https://drive.google.
com/file/d/1C-TUntxn3fDJwEbgrgT2fuWb49qjui2A/
view?usp=sharing.
tify challenges and open issues. Algorithmic solu-
tions have been also proposed in the VANET research
field, see for example (Senapati and Khilar, 2020; Rad
et al., 2017; Safi et al., 2018; Balzano and Stranieri,
2019; Balzano et al., 2016, 2017). Less common is
the use of game-theoretic approaches to address the
parking problem. An exception is (Kokolaki et al.,
2013), which is probably the closest to us, indeed the
authors also propose a parking solution based on the
Nash equilibrium. However, differently from us, they
provide a numerical solution (rather than an algorithm
or a tool), and, more importantly, they consider a sce-
nario with both private and public parking slots, and
the drivers’ payoffs strongly rely on such a topology.
Smart parking mechanisms based on a multi-agent
game setting have been also proposed in the literature.
In (Małecki, 2018), drivers’ behavior is simulated by
modeling the environment on the basis of cellular au-
tomata. In (Belkhala et al., 2019) the model is based
on the interaction between the user (driver) and the
administrator, but focusing more on the architecture
rather than the model setting and the strategic reason-
ing. Similarly, (Jioudi et al., 2019) provides an E-
parking system, based on multi-agent systems aimed
to optimize several users’ preferences. In (Okoso
et al., 2019), the authors manage the parking problem
with a cooperative multi-agent system, by relying on
a priority mechanism. In (Pereda et al., 2020), the
authors also focus on an equilibrium notion, but they
study the Rosenthal equilibrium rather than the Nash
one, which describes a probabilistic choice model. Fi-
nally, (Lu et al., 2021) also considers the concept of
Nash equilibrium applied to cars, but it is used to talk
about traffic rather than parking.
Allocation Problems. Our work is also related to
the literature on multi-agent resource allocation and
sequential mechanisms. Allocation problems are a
central matter in MAS in which resources need to
be distributed amongst several agents, who may also
influence the choice of allocation (Chevaleyre et al.,
2006). One setting of this problem is the case of indi-
visible items (such as allocating parking slots) (Brams
et al., 2003). The sequential allocation mechanism
is a solution widely studied in the literature (Aziz
et al., 2015, 2016; Bouveret and Lang, 2011; Kali-
nowski et al., 2013a,b; Levine and Stange, 2012) and
has been considered in several real-life applications
(for instance, to organize draft systems (Brams and
Straffin Jr, 1979) and to allocate courses to students
(Budish and Cantillon, 2007)). According to a pre-
defined sequence of the agents, this mechanism con-
sists of allowing each agent one by one to pick one
item among the remaining ones. Aziz et al. (2015)
Multi-Agent Parking Problem with Sequential Allocation
485
investigates sequential allocation mechanisms where
the policy for the picking sequence has not been fixed
or has been fixed but not announced. Supposing ad-
ditive utilities and independence between the agents,
Kalinowski et al. (2013a) proved that the expected
utilitarian social welfare is maximized by the alternat-
ing policy in which two agents pick items in a fixed
order. The relation between social welfare and choice
of policy in this type of mechanism has also been con-
sidered (Aziz et al., 2016). The authors explore the
case in which a (benevolent) central authority chooses
a policy to improve social welfare. In the same setting
assuming a benevolent central authority, Bouveret and
Lang (2011) showed that the choice of an optimality
criterion depends on three parameters: how utilities
of objects are related to their ranking in an agent’s
preference relation; how the preferences of different
agents are correlated; and how social welfare is de-
fined from the agents’ utilities.
The main advantage of the sequential allocation
is its simplicity, both in relation to the protocol and
the information requested from agents (i.e., agents do
not have to submit cardinal utilities) (Flammini and
Gilbert, 2020). Unfortunately, it is well-known that
sequential allocation is not strategyproof. This means
that agents may try to manipulate the mechanism by
reporting untruthful preferences (Aziz et al., 2017a).
As a consequence, the strategic dimension needs to be
addressed, and the study of Nash Equilibrium (NE)
for this problem received particular attention. Aziz
et al. (2017b) modeled the problem as a one-shot
game and designed a linear-time algorithm to com-
pute a pure NE. For the case of two players, (Levine
and Stange, 2012) showed how agents arrive at the
equilibrium by figuring out their opponent’s last move
first and reasoning backward. When the problem is
modeled as a finite repeated game and perfect infor-
mation, Kalinowski et al. (2013b) showed that the
unique subgame perfect NE can be computed in linear
time for two players. However, they show that com-
puting one of the possibly exponentially many equi-
libria is PSPACE-hard one considering more agents.
In this paper, we propose a solution for the park-
ing problem based on the sequential allocation mech-
anism. We take advantage of the particularities of the
setting (e.g. the time constraints and the agents’ prior-
ities) to provide an algorithm that finds a Nash equi-
librium on quadratic time.
3 PARKING PROBLEM
In this section, we start by introducing the Parking
Game Structure model, (PGS, for short), which is the
basis for defining and analyzing our proposed algo-
rithm for addressing the parking problem.
3.1 Model
The PGS model describes the agents (or players),
which represent the cars, as well as their needs and
constraints. Also, the PGS takes into account all the
specifications of the slots, in particular their location,
their availability, the time they require to be reached
from each entrance, and so on.
Formally the Parking Game Structure is defined
as follows:
Definition 1 (Parking Game Structure). The Parking
Game Structure (PGS) is a tuple:
G = (Agt, S, G, g, F, T, R)
where:
Agt = {a
1
, ..., a
n
} is a set of agents, i.e., the cars,
S = {s
1
, ..., s
m
} is a set of parking slots,
F = { f
1
, ..., f
n
| f
i
[0, 1], f
i
6= f
j
for i 6= j and 1
i, j n} is a set of resilience values, representing
how long the agents can wait for parking,
G = {g
1
, ..., g
l
} is a set of gates,
g : Agt G is a function associating agents to
gates,
AT = {t
1
, ...,t
n
} is a set of agent-time values,
where t
i
is the time limit the car a
i
has for parking,
RT = {r
(1,1)
, ..., r
(m,l)
} is a set of reaching-time
values, where r
(i, j)
is the time needed to reach the
parking slot s
i
from gate g
j
.
Regarding the set of resilience indexes F, note that
each f
i
is associated with agent a
i
and it has a twofold
use: first, it imposes an order among agents; second, it
affects the final pre-emption order. This will be more
clear below. For simplicity, we assume that all the
resilience indexes are different, i.e., f
i
6= f
j
for every
1 i < j n. The indexes in F can be set manually
as input, however, we report that, for the case study
we have introduced in Section 3.2, the values have
been obtained automatically by processing the infor-
mation coming from the Employers Data Center and
the Online Booking Center of the hospital; in partic-
ular, for the patients, the resilience index represents
their movement ability, therefore, the lower the rate,
the more favored the patient.
A strategy for an agent a
i
consists of choosing a
slot s
j
S. Formally it is a function Str : Agt S.
A strategy profile is an n-uple s = (s
1
, ..., s
n
) of strate-
gies, one for each player. Formally, in s, for each i, we
have Str(a
i
) = s
i
. It is worth noting that it may hap-
pen that two or more players choose the same strategy.
ICAART 2023 - 15th International Conference on Agents and Artificial Intelligence
486
Next we define the costs associated to s as a tuple of
costs c(s) = (c
1
(s), ..., c
n
(s)). Then, a payoff π of a
strategy profile s is defined as a sum of all such c
i
(s),
i.e., π(s) =
i
c
i
(s), and by π
i
we denote the ith cost
value of that tuple. We denote o for a tuple (o
1
, ..., o
n
)
of size n. For an agent a
i
Agt, we let o
i
be agent a
i
s
component in o and o
i
= (o
j
)
j6=i
.
Definition 2. Let a
i
Agt be an agent, h = g(a
i
) and
s = (s
1
, ..., s
n
) be a strategy profile, with s
i
= Str(a
i
).
We define the costs associated to s as the tuple c =
(c
1
(s), ..., c
n
(s)) where each c
i
(s) is defined as fol-
lows:
c
i
(s) =
f
i
· (t
i
r
(s
j
,h)
) if (i) (t
i
r
(s
j
,h)
) 0, and
(ii) there is no a
k6=i
s. t.
f
k
< f
i
, s
k
= s
i
, and
(t
k
r
(s
j
,p)
) 0,
with g(a
k
) = p
otherwise
In words, the value c
i
(s) is a finite value if the
agent a
i
has enough time to reach the parking slot
s
j
and such a slot has not been taken from any other
agent a
k
with a lower resilience (i. e., f
k
< f
i
). Then,
the value, when it is finite, reflects how much time
it is left to the agent after he has reached the assigned
slot (with respect the total time he has at his disposal).
Conversely, the infinity value corresponds to the worst
possible outcome for the agent a
i
, which reflects the
fact that he cannot park at slot s
j
.
Nash Equilibrium. Solution concepts are at the
core of strategic reasoning and Game Theory because
they are used to reason about the collective behav-
ior of the agents. A well-conceived solution con-
cept that ensures a robust form of satisfaction among
players is Nash equilibrium (NE). This concept was
deeply investigated and well formalized by John Nash
in the fifties, both under pure and mixed strategies
(see Van Damme (1991) for more details). In the basic
definition, we say that in a multiplayer game, all play-
ers, moving concurrently, reach a Nash equilibrium if
none of them has the incentive to unilaterally devi-
ate from that equilibrium. Formally, a strategy profile
s = (s
1
, ..., s
n
) is a NE if, for each agent a
i
Agt and
each alternative strategy s
0
i
Str(a
i
) we have
c
i
(s) c
i
(s
0
i
, s
i
)
At this point, it should be intuitive that the prob-
lem of looking for an optimal strategy profile s can
be reduced to the problem of minimizing
2
the cor-
2
Note that the minimization guarantees that the best
slots are kept for future use, so to focus on the continue
allocation process rather than the single stage.
responding vector of associated costs c(s). Unfortu-
nately, this is in general not an easy task. In particular,
a brute-force algorithm checking all the possible strat-
egy profiles is unfeasible as it requires exponential
time. Conversely, we suggest adopting a solution that
provides, by definition, a satisfactory solution and,
along with our setting, it just requires quadratic time.
In the sequel, we aim to present the intuition of our
proposed solution. We introduce our application sce-
nario, the parking of a large hospital. By means of a
toy example in this scenario, we describe how we pick
the solution that is a Nash equilibrium. We also illus-
trate how this solution over-performs the greedy be-
havior of the players, in which each car takes the first
available parking slot that satisfies their constraints.
3.2 Application Scenario
As a case study, we have focused on the parking
area of the Federico II Hospital Company in Naples,
one of the biggest and most specialized hospitals in
the South of Italy, whose construction goes back to
the early Sixties. The hospital is made of 21 build-
ing blocks, distributed over 440000m
2
. The parking
space, having 2684 slots in total, consists of 21 inde-
pendent areas, and is mainly used by patients and, in
turn, by the 3400 employees (doctors, nurses, tech-
nicians, administrators, etc.). The hospital has four
guarded gates, one of which is for pedestrians. The
car gates are preceded by a road where cars line up
for the necessary checks. On average, it is estimated
that there are 4600 car accesses per day. There is no
policy about the allocation of parking places and, ex-
cept for a few reserved ones, each driver chooses their
own slot. This disorganized solution produces huge
traffic congestion, bottlenecks at the entrance, and an
unbalanced distribution of cars over the parking area.
More importantly, it does not take into account the
specific constraints and some physical limitations of
the users, such as walking issues or urgency. In the
most crowded hours, on average, the drivers spend
more than 20 minutes to find a parking slot or, even
worst, they leave the parking area by missing avail-
able slots.
In order to efficiently apply our tool, we assume
that the list of available slots in every area of the hos-
pital is known at run-time. Also, we make use of
all information the car passengers have to communi-
cate to the hospital before entering, and in particular
their logistics. Finally, we assume that the drivers will
be followed while driving inside the parking area, by
means of tracking devices (GPS, smartphone, video
cameras, etc.).
Having all this information at its disposal, the im-
Multi-Agent Parking Problem with Sequential Allocation
487
plemented tool works as follows: it takes all cars in
the queue on the roads in front of the car gates, as
well as all the specific needs and constraints of their
occupants. Then, it processes the data, and following
the algorithm described in the sequel, it opportunely
associates the available slots to the cars. In partic-
ular, the tool will access both the Employers Data
Center and the Online Booking Center of the hospi-
tal and, thanks to the latter, the tool will know which
kind of services the patients need, the date and time of
their appointments, possible walking limitations, and
handicaps, etc. Note that the tool operates in stages,
processing one bunch of cars at a time, as they are in
the queue. Someone may criticize this solution and
propose an offline allocation instead. We decide not
to follow this solution for two main reasons: first, the
hospital is highly dynamic in slot requests and, more
importantly, slots are very limited in numbers, so it is
better to allocate slots only when cars show up.
3.2.1 Running Example
In this section, we first provide a toy example, then
we introduce the Parking Slot Selection Game (PSSG,
for short) and propose a solution by means of a Nash
equilibrium calculation. We also comment on the
greedy approach and compare it with our solution.
For a matter of presentation, we will recall the notion
of Nash equilibrium.
Before proceeding, it is worth noting that at each
instance of the game we consider, each car can en-
ter the parking space through just one entrance. This
means that we can get rid of g and G when deal-
ing with a PGS, as well as the second index of the
reaching-time values in RT. This also allows us using
a simplified version of the definition of costs associ-
ated with strategy profiles. In other words, while the
set RT provides m · l possible reaching values in gen-
eral as stated in Definition 1 (with m the number of
slots and l the number of gates), each instance of the
game just requires dealing with RT as a vector of m
values, i.e., RT = {r
1
, ..., r
m
}, where each r
i
repre-
sents the time needed to reach the parking slot s
i
from
the physical gate through which the car is entering.
When providing our solution to PSSG in Algorithm 1,
we strongly rely on this observation, which leads to a
natural reformulation of the model right after the ve-
hicles are associated to the gates. Notably, we prefer
to keep our PSG model as general as possible in order
to accommodate other questions that require dealing
with not a priori fixed entrances associated to cars.
For example, it may be useful when devising an algo-
rithm that also suggests in advance to a driver the gate
to take. This, however, is not the target of this paper.
Example 1 (3x3-parking problem). Let us consider a
parking place with 3 slots available and 3 cars aim-
ing at parking. Let us suppose that the first, the sec-
5 minutes
2 minutes
4 minutes
2 minutes
3 minutes
4 minutes
Figure 1: 3x3-Parking problem.
ond, and the third car have respectively 5, 2, and 4
minutes available to park and that, as associated re-
silience they have 0.5, 0.1, and 0.009, respectively.
Also, suppose that the first, the second, and the third
slot require 2, 3, and 4 minutes to be reached, respec-
tively. We call such a game the 3x3-parking problem
and it is reported in Figure 1.
4 PRIORITY-BASED PARKING
SELECTION
Following the model definition given in Definition 1
and the observations made above, we formally intro-
duce the Parking Slot Selection Game as follows:
Definition 3 (Parking Slot Selection Game). The
Parking Slot Selection Game (PSSG) has an input and
an output defined as follows:
Input: a PGS G, as given in Definition 1.
Output: a strategic profile (s
1
, ..., s
n
) such that it
is a Nash equilibrium for G.
In words, the PSSG looks for a strategy profile in
which, with respect to the associated costs, no player
has an incentive to unilaterally change his choice.
Similarly to the PSGG, one can define the Greedy
Parking Game (GPG, for short). To give some details,
first assume that in an GPG players are ordered, then
the strategy profile (s
1
, ..., s
n
) is such that for each
agent a
i
, it holds that s
i
is the best choice (in terms
of minutes to reach it) over S \ {s
1
, ..., s
i1
}.
4.1 Algorithm
In this section, we introduce the algorithm for the so-
lution to the problem described in Definition 1. We
first provide the pseudo-code in Algorithm 1, then we
describe how it works and study its time complexity.
With the first iteration, the car with the lowest re-
silience index, actualCar, is selected from the queue,
ICAART 2023 - 15th International Conference on Agents and Artificial Intelligence
488
Algorithm 1: Algorithm for the solution of the Parking
Game Structure.
1: repeat
2: actualCar priorityCar(carQueue).
3: outcome .
4: for slot setAvailableSlots do
5: po c(actualCar, slot).
6: if po 0 and po < outcome then
7: outcome po.
8: strategy assignSlot(actualCar,slot)
9: setNotAvailable(slot).
10: end if
11: end for
12: until carQueue 6= null
13: return strategy
through the function priorityCar(·), which takes as in-
put the set of cars and returns the one with the lowest
resilience index respect to the others. The condition
po 0 capture the fact that the slot assignment must
meet the cars’ time restriction. The variable cost out-
come is associated with an infinity value, the worst
possible one. In the second iteration, the algorithm
computes the costs resulting from the function c(·),
which takes as input a car and a slot. The value of
the outcome is updated with the value of the best cost
computed. Among the available slots, the one with
the best result is assigned to the actualCar. Once as-
signed, the slot is remove from the set of the available
ones, with the function setNotAvailable(·).
4.1.1 Solution to the Running Example
Let us consider again the 3x3-parking problem de-
scribed in Section 1. We now show a solution based
on the satisfaction of a Nash equilibrium. As we will
see in a while, such a solution allows accommodating
all cars, while satisfying all their constraints, contrary
to what we have seen with the greedy solution. Later,
we will show that this is true in general and not just
for the case of our specific example. Let us formally
describe the 3-players-3-slots example by means of a
PGS G
3
whose components are defined as follows:
Agt = {car
1
, car
2
, car
3
} is the set of cars,
S = {slot
1
, slot
2
, slot
3
} is the set of parking slots,
AT = {5, 2, 4} is the set of time-values car
1
, car
2
,
and car
3
have at their disposal, respectively,
RT = {2, 3, 4} is the set of times needed to reach
the slots slot
1
, slot
2
, and slot
3
, respectively,
F = {0.5, 0.1, 0.009} is the set of resilient values,
The cost function is reported in Table 1, in the last
three rows. For instance, the triple (, , 0.018)
represents the case in which all cars decide to park
in the same slot slot
1
; so, car
3
, which has the low-
est resilience value, gets it at a cost of 0.018 (i.e.,
(4 2)· 0.009), while the other cars leave the pro-
cess incomplete, as they get .
By a matter of calculation, one can check that
there exists only one Nash equilibrium, which corre-
sponds to s = (slot
2
, slot
1
, slot
3
), with c = (1, 0, 0) (in
bold in Table 1), and π(s) = 1.
4.2 Game Theoretic Analysis
We now analyze our algorithm to show that it returns
a strategic profile (parking slot assignment) in which
no player wants to change his slot unless some other
players want to change theirs.
Despite a pure Nash Equilibrium might not exist
for any game, there are some special cases in which it
does. Precisely, in Rosenthal (1973) it is shown that
a pure Nash Equilibrium always exists when the pay-
offs are a non-decreasing function for each player. In
our PSSG, the payoff associated with each player in
a given slot remains constant when the other players
change their strategies. Hence, we can use the results
of Rosenthal (1973) to conclude that our game always
admits a Nash Equilibrium. Furthermore, the pro-
posed solution finds a strategy profile that is a Nash
equilibrium for the parking problem.
Theorem 1. The strategy profile returned Algorithm
1 is a Nash Equilibrium in PSSG.
Proof (Sketch). Assume by contradiction that s =
(s
1
, ..., s
n
) is the solution provided from our algorithm
and it is not a Nash equilibrium. Then, by definition
of Nash equilibrium, there must exist an agent, let us
say agent a
i
, whose strategy s
j
is not the best, while
fixed the strategies for the other players. Hence, there
exists another strategy s
0
j
for the agent a
i
, such that
the payoff of s
0
j
is better than the one for s
j
(given
the same strategies for the other players). But if such
a strategy s
0
j
exists, then it would be found at row 6
of our algorithm, and it would be chosen as the fi-
nal strategy for agent a
i
. But this clearly contradicts
the hypothesis that s = (s
1
, .., s
n
) is the solution pro-
vided.
4.3 Complexity Analysis
We now analyze the complexity of Algorithm 1.
Theorem 2. The complexity of Algorithm 1 is
quadratic with respect to the number of agents in-
volved in the game, in the worst case.
Multi-Agent Parking Problem with Sequential Allocation
489
Table 1: Cost function values for 3-drivers-3-slots instance of the game. The table is read as follows: let T denote Table 1
and let the indexes i, j, and k be the strategy played by car
1
(in blue), car
2
(in red), and car
3
(in green), respectively. The
position T [i, j, k] = a, b, c represents the situation in which car
1
, car
2
, and car
3
are assigned to the slots indexed by i, j, and k
respectively, with costs a, b, and c.
car
3
slot
1
slot
2
slot
3
car
2
car
2
car
2
slot
1
slot
2
slot
3
slot
1
slot
2
slot
3
slot
1
slot
2
slot
3
car
1
slot
1
, , 0.018 , , 0.018 , , 0.018 , 0, 0.009 1.5,, 0.009 1.5, , 0.009 , 0, 0 1.5, , 0 1.5, , 0
slot
2
1, , 0.018 1, , 0.018 1, , 0.018 , 0, 0.009 , , 0.009 , , 0.009 1,0,0 1, , 0 1, , 0
slot
3
0.5, , 0.018 0.5, , 0.018 0.5, , 0.018 0.5, 0, 0.009 0.5, , 0.009 0.5, , 0.009 , 0, 0 , , 0 ,, 0
Proof. Consider the worst possible scenario, i.e., no
vehicle obtains a parking slot. Then, let us compute
C (PSSG) as the complexity of the Parking Slot Selec-
tion Game. The proof proceeds by analyzing the com-
plexity of the most expensive operations, from the in-
ner ones to the outer ones. We use the notation C (r)
to indicate the complexity of the code from the r-th
row of the Algorithm 1.
The function assignSlot(Car, slot) performs sim-
ple assignments, with complexity C(7) = O(1).
The inner loop does not perform any slot assign-
ment, in the considered worst case, since none of them
satisfies the constraints of the cars to be allocated.
Hence, the inner loop is repeated |S| times, where S is
the set of slots, according to Definition 1. Assuming
that |S| = m, we can deduce that C (3) =
m
i=1
C (7) =
m
i=1
O(1) = O(m).
The outer loop is performed as many times as the
number of cars, i.e, the agents. As |Agt| = n (Defi-
nition 1), we have C (1) =
n
j=1
C (3) =
n
j=1
O(k) =
O(nm).
Assuming that, in the worst case, n and m are of
the same order, we can conclude that the total com-
plexity is C(PSSG) = O(n
2
).
5 EXPERIMENTAL RESULTS
In this section, we provide an experimental evaluation
of the proposed algorithm.
5.1 Priority-Based vs Greedy Selection
We start by comparing the performances between ex-
ecuting a greedy solution to solve GPGs and Algo-
rithm 1 to solve PSGGs. We first describe the greedy
algorithm used in this benchmark.
Na
¨
ıve Solution with Greedy Selection. When a car
is approaching to the parking, a greedy solution is to
occupy the first slot it can get. This approach leaves
to the car a free will to park in the slot that best fits its
constraints, without paying attention to the other cars
requirements. This easy-to-design solution may lead
to a non-optimal vehicles allocation, as it may leave
out some cars (not able to park), as the remaining slots
may not satisfy their requirements.
To give an example, let us consider again the sce-
nario described in Section 1. Assuming the agents use
greedy selection in this situation, the first car would
choose the closest slot (the one that requires 2 min-
utes to be reached). Then, the second car would not
be able to park, because all the remaining free slots
are too expensive in terms of time.
We have considered 10 instances of problems
which are with a growing number of cars and slots.
For each experiment, the sets of values in the model
(i.e., resilience values, agent-time, and reaching-time)
were generated randomly.Results have been collected
in Table 2. Each column represents a different execu-
tion of the two approaches with the corresponding in-
put parameters, while the rows keep track of the two
analyzed solutions. Each entry contains the number
of cars that have been able to park successfully, over
the total number of cars involved. As one can observe,
the Algorithm 1 is never worse than the greedy one.
Moreover, by extending the experiment over 100 and
200 executions, our approach is strictly better than the
greedy one in the 89% and 93% of the cases respec-
tively, and it allocates the same number of vehicles in
the remaining ones.
Since, by construction, a greater number of exe-
cutions determines a greater number of cars, these ex-
periments also prove the scalability of our algorithm,
which seems to behave well with high numbers.
5.2 Benchmark in the Application
Scenario
We have analyzed the behavior of Algorithm 1 in
the management of a growing number of cars wait-
ing for a parking slot, with respect to a fixed num-
ber of parking slots. All experiments have been exe-
cuted on an Intel®Core™i5-7300HQ CPU processor
of 2.50 GHz, with 8 Gb RAM capacity. We have con-
sidered two scenarios and reported the corresponding
ICAART 2023 - 15th International Conference on Agents and Artificial Intelligence
490
Table 2: Resulting vehicle allocations over 10 different simulations applying two solutions to the parking game: the Nash
equilibrium based one, and the greedy one.
3 slots 4 slots 5 slots 6 slots 7 slots 8 slots 9 slots 10 slots 11 slots 12 slots
3 cars 4 cars 5 cars 6 cars 7 cars 8 cars 9 cars 10 cars 11 cars 12 cars
PSSG 3/3 3/4 5/5 6/6 7/7 8/8 7/9 8/10 9/11 12/12
GPG 2/3 3/4 5/5 5/6 6/7 6/8 6/9 7/10 8/11 10/12
Table 3: Execution time (in seconds) of Algorithm 1 varying the number of slots and cars.
200
cars
400
cars
800
cars
1600
cars
3200
cars
6400
cars
12800
cars
25600
cars
51200
cars
4600 slots 0.001 0.002 0.004 0.009 0.027 0.402 1,389 3.415 10.165
20000 slots 0.003 0.006 0.013 0.026 0.060 0.150 0.430 5.687 23.597
benchmarks in Table 3. The first one considers 4600
slots. Such a number is not picked at random, but it
refers to the number of slots available inside the struc-
ture of our case study, including some private parking
slots close by. The second one considers 20000 slots.
This number was chosen because it corresponds to the
number of available slots in the biggest parking space
of the world (West Edmonton Mall in Canada).
To show the scalability of our algorithm, we have
considered a very large set of cars. The benchmarks
show that our tool can be also used in other fields,
with much higher numbers. For example, it can be
used to accommodate people in a stadium, or, dis-
tribute people over hospitals.
6 CONCLUSIONS
The parking problem is one of the most challenging
questions in the automotive research field. Inspired
by the intrinsic competitive nature of the problem,
in which drivers compete among themselves in or-
der to get a suitable parking slot, in this paper, we
explored a game-theoretic perspective. Precisely, fol-
lowing a real case study, we have formally introduced
a multi-player game structure model and an algorithm
based on sequential allocation adjusted to the parking
problem. The game model includes time constraints,
which denote how much time each car has available
to park and how long it takes to park in a specific slot
from its initial position at the gate. The solution found
by the algorithm is a Nash equilibrium, which allows
focusing not just on the best choice for a single car,
but rather on one that guarantees no agent can im-
prove their utility by a unilateral change of strategy.
The proposed algorithm works in quadratic time.
As an application scenario, we consider the park-
ing space of the Federico II Hospital in Naples, one
of the biggest hospitals in the South of Italy. The
construction of the hospital and the annexed parking
space goes the back to early Sixties. Since there, no
parking policy has been ever adopted: except for a
few reserved slots, a car entering the area can park
in any slot. This reflects in serious traffic congestion
and inefficient use of the slots every day. Conversely,
our approach provides, for the first time, a valid and
promising solution. In order to put it into practice,
we are currently working on a mobile client appli-
cation to help drivers to park, from the assignment
of the slot while approaching the gate, up to the mo-
ment they leave the car. Our work sets the stage for
future improvements not only in health care services
offered by the hospital under consideration but also
in facilities from different contexts with similar prob-
lems. Experimental results show that (i) our solution
improved the number of slots assigned with respect to
greedy parking behavior, (ii) the algorithm is scalable
and can handle a large number of slots and cars.
A recent line of work investigates the applica-
tion of formal methods and strategic reasoning for
the automated synthesis and verification of allocation
mechanisms Mittelmann et al. (2022); Maubert et al.
(2021). An interesting direction for future work is
to apply such techniques to evaluate the solutions to
parking slot allocation with strategic agents. Yet an-
other direction is to formalize the parking problem as
a linear program. A similar approach has been re-
cently applied to allocation problems, such as online
task assignment Dickerson et al. (2018).
ACKNOWLEDGMENTS
This research is supported by the PRIN project
RIPER (No. 20203FFYLK), the JPMorgan AI Fac-
ulty Research Award “Resilience-based Generalized
Planning and Strategic Reasoning”, and the EU ICT-
48 2020 project TAILOR (No. 952215). We thank
Giuseppe Calise for his help with the experiments and
the earlier versions of this paper.
Multi-Agent Parking Problem with Sequential Allocation
491
REFERENCES
Ayala, D., Wolfson, O., Xu, B., Dasgupta, B., and Lin, J.
(2011). Parking slot assignment games. In ACM-GIS,
pages 299–308.
Aziz, H., Bouveret, S., Lang, J., and Mackenzie, S. (2017a).
Complexity of manipulating sequential allocation. In
AAAI, pages 328–334.
Aziz, H., Goldberg, P., and Walsh, T. (2017b). Equilibria in
sequential allocation. In Proc. of ADT 2017.
Aziz, H., Kalinowski, T., Walsh, T., and Xia, L. (2016).
Welfare of sequential allocation mechanisms for indi-
visible goods. In Proc. of ECAI 2016, pages 787–794.
Aziz, H., Walsh, T., and Xia, L. (2015). Possible and nec-
essary allocations via sequential mechanisms. In Pro-
ceedings of IJCAI 2015, pages 468–474.
Balzano, W., Murano, A., and Stranieri, S. (2017). Logic-
based clustering approach for management and im-
provement of vanets. J. High Speed Networks,
23(3):225–236.
Balzano, W., Murano, A., and Vitale, F. (2016). V2V-EN -
vehicle-2-vehicle elastic network. volume 98 of Pro-
cedia Computer Science, pages 497–502. Elsevier.
Balzano, W. and Stranieri, S. (2019). Acop: an algorithm
based on ant colony optimization for parking slot de-
tection. In WAINA, pages 833–840.
Belkhala, S., Benhadou, S., Boukhdir, K., and Medromi,
H. (2019). Smart parking architecture based on multi
agent system. IJACSA, 10:378–382.
Bouveret, S. and Lang, J. (2011). A general elicitation-free
protocol for allocating indivisible goods. In Proc. of
IJCAI 2011, pages 73–78.
Brams, S. J., Edelman, P. H., and Fishburn, P. C. (2003).
Fair division of indivisible items. Theory and Deci-
sion, 55(2):147–180.
Brams, S. J. and Straffin Jr, P. D. (1979). Prisoners’
dilemma and professional sports drafts. The Ameri-
can Mathematical Monthly, 86(2):80–88.
Budish, E. and Cantillon, E. (2007). Strategic behavior in
multi-unit assignment problems: Theory and evidence
from course allocations.
Chevaleyre, Y., Dunne, P. E., Endriss, U., Lang, J.,
Lema
ˆ
ıtre, M., Maudet, N., Padget, J. A., Phelps, S.,
Rodr
´
ıguez-Aguilar, J. A., and Sousa, P. (2006). Issues
in multiagent resource allocation. Informatica (Slove-
nia), 30(1):3–31.
Dickerson, J. P., Sankararaman, K. A., Srinivasan, A., and
Xu, P. (2018). Assigning tasks to workers based on
historical data: Online task assignment with two-sided
arrivals. In Proc. of the 17th Int. Conf. on Autonomous
Agents and MultiAgent Systems, AAMAS 2018, pages
318–326.
Flammini, M. and Gilbert, H. (2020). Parameterized com-
plexity of manipulating sequential allocation. In Proc.
of ECAI, volume 325, pages 99–106.
Jioudi, B., Amari, A., Moutaouakkil, F., and Medromi, H.
(2019). e-parking: Multi-agent smart parking plat-
form for dynamic pricing and reservation sharing ser-
vice. IJACSA, 10(11).
Kalinowski, T., Narodytska, N., and Walsh, T. (2013a).
A social welfare optimal sequential allocation proce-
dure. In IJCAI 2013, Proceedings of the 23rd Interna-
tional Joint Conference on Artificial Intelligence, Bei-
jing, China, August 3-9, 2013, pages 227–233.
Kalinowski, T., Narodytska, N., Walsh, T., and Xia, L.
(2013b). Strategic behavior when allocating indivis-
ible goods sequentially. In Proc. of AAAI 2013.
Kokolaki, E., Karaliopoulos, M., and Stavrakakis, I. (2013).
On the efficiency of information-assisted search for
parking space: A game-theoretic approach. In IWSOS.
Levine, L. and Stange, K. E. (2012). How to make the most
of a shared meal: Plan the last bite first. The American
Mathematical Monthly, 119(7):550–565.
Lin, T., Rivano, H., and Le Mou
¨
el, F. (2017). A survey of
smart parking solutions. IEEE Transactions on ITS,
18(12):3229–3253.
Lu, X.-S., Guo, R.-Y., Huang, H.-J., Xu, X., and Chen, J.
(2021). Equilibrium analysis of parking for integrated
daily commuting. Res. in Transportation Economics.
Małecki, K. (2018). A computer simulation of traffic flow
with on-street parking and drivers’ behaviour based
on cellular automata and a multi-agent system. JCS,
28:32–42.
Maubert, B., Mittelmann, M., Murano, A., and Perrussel, L.
(2021). Strategic reasoning in automated mechanism
design. In KR, pages 487–496.
Mittelmann, M., Maubert, B., Murano, A., and Perrussel,
L. (2022). Automated synthesis of mechanisms. In
IJCAI, pages 426–432. ijcai.org.
Okoso, A., Otaki, K., and Nishi, T. (2019). Multi-agent
path finding with priority for cooperative automated
valet parking. In ITSC, pages 2135–2140.
Pereda, M., Ozaita, J., Stavrakakis, I., and Sanchez, A.
(2020). Competing for congestible goods: experi-
mental evidence on parking choice. Scientific reports,
10(1):1–10.
Rad, F., Pazhokhzadeh, H., and Parvin, H. (2017). A smart
hybrid system for parking space reservation in vanet.
JACET.
Rosenthal, R. W. (1973). A class of games possessing
pure-strategy nash equilibria. International Journal
of Game Theory, 2(1):65–67.
Safi, Q. G. K., Luo, S., Pan, L., Liu, W., Hussain, R., and
Bouk, S. H. (2018). Svps: Cloud-based smart vehi-
cle parking system over ubiquitous vanets. Computer
Networks, 138:18–30.
Senapati, B. R. and Khilar, P. M. (2020). Automatic parking
service through vanet: A convenience application. In
ICCAN, pages 151–159.
Shoup, D. (2005). The high cost of free parking.
Van Damme, E. (1991). Stability and perfection of Nash
equilibria, volume 339.
Wooldridge, M. (2009). An introduction to multiagent sys-
tems. John wiley & sons.
ICAART 2023 - 15th International Conference on Agents and Artificial Intelligence
492