=Paper= {{Paper |id=Vol-3118/p10 |storemode=property |title=First Studies to Apply the Theory of Mind Theory to Green and Smart Mobility by Using Gaussian Area Clustering |pdfUrl=https://ceur-ws.org/Vol-3118/p10.pdf |volume=Vol-3118 |authors=Nicolo’ Brandizzi,Samuele Russo,Rafał Brociek,Agata Wajda |dblpUrl=https://dblp.org/rec/conf/icyrime/BrandizziRBW21 }} ==First Studies to Apply the Theory of Mind Theory to Green and Smart Mobility by Using Gaussian Area Clustering== https://ceur-ws.org/Vol-3118/p10.pdf
First Studies to Apply the Theory of Mind to Green and
Smart Mobility by Using Gaussian Area Clustering
Nicolo’ Brandizzi1 , Samuele Russo2 , Rafał Brociek3 and Agata Wajda3
1
  Department of Computer, Control and Management Engineering, Sapienza University of Rome, Via Ariosto 25, 00135, Rome, Italy
2
  Department of Psychology, Sapienza University of Rome, via dei Marsi 78 Roma 00185, Italy
4
  Department of Mathematics Applications and Methods for Artificial Intelligence, Faculty of Applied Mathematics, Silesian University of
Technology, 44-100 Gliwice, Poland


                                          Abstract
                                          This paper investigates emerging pattern in users green and smart mobility. Our focus is finding an optimal clusterization of
                                          vehicles based on user demand in the metropolitan city of Barcelona and analyze the users’ behavior with a theory of mind
                                          framework. The notions of clusters, algorithms definitions and optimization procedure are introduced in this study. The
                                          following assumption will be considered: the task is a dynamic multi-agent problem settled in a city on a group of scooters.
                                          Given the conditions and the data set, the algorithm consists of two phases. First we estimate the vehicles density during
                                          the day, hour and location, and we analyze the users’ behavior and draw conclusion on their habits. Then we propose a
                                          unsupervised clustering technique based on Gaussian area, that takes into consideration point of interests and dis-interest,
                                          shaping the area accordingly. Our focus is on simplicity and reproducibility, for this reason our formulation and solution can
                                          be considered a general approach that can be adapted based on specific needs.

                                          Keywords
                                          Resource Allocation, Smart mobility,



1. Introduction                                                                        destinations. This perspective changes the definition of
                                                                                       transportation problems, the influencing factors as well
Private Transport Systems, or more commonly private as the types of solutions that are considered. However,
cars, are among the major contributors (about 18%) to it requires a sound understanding of people’s travel be-
local air pollution, traffic danger, congestion and poor haviour. In order to to study the potential for modal shift
physical health due to lack of exercise[1]. If the final by passenger cars towards integrated smart transport
goal of a green sustainable development is to sustain systems and targets in particular the working class and
or improve the quality of life for all, now and into the middle-aged adults, it should be necessary to design and
long-term future, the current growth in private car use is implement support systems based on user behavioral
clearly unsustainable. Understanding why most people analysis in order to improve current knowledge-based
prefer using a car over other modes of transport for their techniques for smart applications mobility, with particu-
daily travel, and how they can be persuaded to use less lar interest in the optimal planning of individual routes
their cars less or even abandon them altogether, is there- and shared transport systems for the minimization of
fore an important goal, expecially after the pandemics the ecological footprint and the reduction of greenhouse
of COVID-19 and the physical and mental limitations gas emissions. Such studies should take into account
introduced by it [2, 3, 4] . However in order to get such the theory of mind when trying to model the user’s be-
knowledge we must tackle with the complex system of haviour. In fact there is a range of reasons that, despite
personal and behaviour factors that are typically studied their personal attitudes, could trigger people to act in a
by neuropsychology. Organizing the way we travel in a pro-environmental fashion. This process of behaviour
more sustainable way will be the key challenge in green change can be only triggered by means of precise factors
transport systems for the near future. At the moment that are mainly related to non-conscious behavioural
there is a trend in transport from the design of transport attitudes which implicitly and unwillingly reflects on
means towards the provision of access to activities and conscious actions. Sometime this implicit cause-effect
                                                                                       relationship is strong enough to cause an effective cogni-
ICYRIME 2021 @ International Conference of Yearly Reports on                           tive dissonance, also on those people that may express a
Informatics Mathematics and Engineering, online, July 9, 2021
                                                                                       positive attitude towards a greener transportation system.
$ brandizzi@diag.uniroma1.it (N. Brandizzi);
samuele.russo@uniroma1.it (S. Russo); rafal.brociek@polsl.pl                           Moreover, attitudinal research on sustainable transport
(R. Brociek); agata.wajda@polsl.pl (A. Wajda)                                          often only measures perceptions of the instrumental costs
 0000-0002-1846-9996 (S. Russo); 0000-0002-7255-6951                                  and benefits of driving, in terms of time, money and ef-
(R. Brociek); 0000-0002-1667-3328 (A. Wajda)                                           fort, completely ignoring the inner reasoning that trigger
          © 2021 Copyright for this paper by its authors. Use permitted under Creative
          Commons License Attribution 4.0 International (CC BY 4.0).                   human decisions on the matter, as well as other affective
    CEUR
    Workshop
    Proceedings
                  http://ceur-ws.org
                  ISSN 1613-0073
                                       CEUR Workshop Proceedings (CEUR-WS.org)




                                                                                                71
Nicolo’ Brandizzi et al. CEUR Workshop Proceedings                                                                    71–76



and symbolic aspects are particularly relevant for private       cannot do better. Based on [6, 7] the problem of task allo-
car use.                                                         cation has been formulated as a Markov game. In the first
   A common problem with smart mobility is vehicles              step, a utility function must be defined, but due to diffi-
allocation. With hundreds of vehicles scattered across           culties in deriving the agents utility function, a series of
a city, it is important to have strategies that allow to         static potential games was approximated [5]. The utility
redistribute the resources taking into account the users         function of each agent tends to be maximized. However,
and company needs. The focus of this work is to de-              any changes in strategy will result in a change in global
velop a practical resource allocation algorithm suitable         utility. The goal is for each agent to achieve their own
for this kind of problem, taking into consideration users’       best interests, while keeping the global good in mind.
behavior and belief states.                                      Using game theory to analyze the overall behavior is the
   Our aim is to divide the operating area, in this case         next step. At the end of each cycle, the agents utility
the metropolitan city of Barcelona, into sectors of quite        function, state, and location converge to a Nash equi-
regular shape with some known characteristics that can           librium. Various simulators have applied this approach,
be used to drive the resource allocation. For example            resulting in highly efficient relocation. Additionally, this
knowing that in a certain area there is an high probability      approach has some disadvantages such as its sensitivity
of having discharged vehicles at a specific time of the          to environment changes and the need for constant ne-
day is for sure a valuable aspect to be considered when          gotiation between agents. The authors of this paper [8]
doing resource allocation.                                       demonstrated that this approach is highly successful for
   The proposed solution uses a dataset containing the           disaster rescue scenarios. As the conditions in this study
vehicles position and state during a certain period of time.     are different, this approach will not be used since our
This information allow us to extract a probability distribu-     agents will not need to negotiate since the paper focuses
tion representing the typical vehicles state. Then, given        on assigning the closest scooters.
the learned distribution and eventually some relevant
points in the map, the operating area is divided in section      2.2. Theory of Mind
based on the value of a potential function expressing the
aspects we are interested in.                            As humans, we tend to build a belief model of how other
   Our focus is on simplicity and ease of use. For this  humans may react to certain stimuli and update it with
reason our method can be considered a generic approach   each new observation [9, 10, 11]. This behavior was
that can be modified and adapted based on specific needs.first theorized in [11] and named Theory of Mind [ToM],
                                                         after the humans’ ability to represent the mental states
                                                         of others. More recently, [12] applied ToM to let artificial
2. Related work                                          agent build a model of other agents’ observation and
                                                         behavior alone.
In recent years task allocation and routing problem was     The ToM can also be applied to infer human inten-
studied deeply with many solutions and algorithms pro- tion from artificial settings , such as vehicles location
posed for different scenarios and multi agent environ- during the day. Indeed [13] advocates how theory of
ments. A whole variety of researchers has given their mind should focus on practical application rather than
opinion and approaches for task allocation within agents being studied only as a theoretical framework. Indeed, in
[5], also taking into account the users’ behaviors. Such [14], the authors propose a computational model based
approaches span between different filed, the main ones on ToM that is able to infer emotions based on indirect
being:                                                   cues. Moreover they lay out a road-map for future work
                                                         in which they stress the importance of prioritizing mod-
      • Game theory
                                                         eling affective cognition on naturalistic data.
      • Theory of Mind
      • Gaussian Clustering
                                                                 2.3. Gaussian Clustering
2.1. Game theory                                              Maximum likelihood clustering [MLC] approaches [15,
                                                              16] encompass many clustering algorithm which can be
As part of the game theory approach, each agent partici- considered sufficiently general for non task specific pur-
pates in negotiations with other agents about the tasks poses. Many variations of MLC have been implemented
to be completed. Players are considered agents, and allo- considering model based approaches [17, 18, 19, 20, 21],
cating the task is a strategy that results in the best payoff mixture models [22, 23, 24] and fuzzy logic [25, 26, 27, 28].
[5]. Players converge on the Nash equilibrium, a stable         In their work, [20] present a detailed review on the
solution, which is that once the strategies are established, literature of Gaussian modeling, where they follow the
agents cannot deviate from their chosen course as they evolution of model based clustering. A notable example




                                                            72
Nicolo’ Brandizzi et al. CEUR Workshop Proceedings                                                                      71–76



is [17], where the authors deploy a MLC algorithm where
they rely on the common structure of MRI in order to
reparametrize the clusters’ coveriance matrices. They
show how some parameters are similar between clusters
and how the main features can be considered in a more
efficient way. The [18] algorithms by comparison demon-
strate how to exploit the structure of a Gaussian model in
order to generate efficient algorithms for agglomerative
hierarchical clustering.
   Moreover, [23] define a generalized version of [29],
where the role of each variable is specified without any
previous assumptions about the link between the selected
and discarded variables. They show how their algorithm
                                                           Figure 1: Potential representation using method (1).
is more versatile than the original one and can be de-
ployed for high dimensional dataset.
   Finally, [27] propose an unsupervised model based
Gaussian clustering based on fuzzy logic. Their approach
is built on top of [17] and extends it solving both the
initialization problem as well as automatically obtain an
optimal number of clusters.


3. Methodology
A potential function express the interest regarding differ-
ent areas of the city. It can be computed taking into ac-
count different elements, one of which is the vehicles’ po-
sition distribution. Once such function is computed, the
sectors borders are defined by the equipotential curves. Figure 2: Potential representation using method (2).
For simplicity, the potential computation considers only
the multivariate 2D Gaussian describing the vehicles dis-
tribution and some additional relevant positions. Possible
extension of the method will be mentioned in the conclu-
sion.

Gaussian estimation The first step is to compute the
Gaussian parameters based on the available data. Since a
Gaussian distribution is completely described by its mean
vector 𝜇 and covariance matrix Σ, our goal is to estimate
these quantities. In this implementation the focus is on
vehicles distribution at the end of a day, so we extract
the position of each vehicle at the end of a day 𝑖 and
compute 𝜇𝑖 , Σ𝑖 . This procedure is repeated for 𝑛 days
and the Gaussian parameters are obtained by averaging             Figure 3: Map subdivision with additional lines using method
the results. In this way, the resulting distribution will         (2).
represent the probability of having a vehicle in a certain
position with a reasonable certainty.
                                                         of interest and some point of disinterest. Each point of
Area division Our next objective is to divide the area   interest 𝑝𝑎,𝑖 generates a potential 𝑈𝑝𝑎,𝑖 (𝑥), where 𝑈𝑝𝑎,𝑖
in sectors. To do so, we start by computing a potential  is a probability density function of a 2D multivariate
function 𝑈 (𝑥). A very simple choice is to set           Gaussian centered in 𝑝𝑎,𝑖 with a fixed covariance matrix.
                    𝑈 (𝑥) = 𝑓 (𝑥),                  (1)  The  same is done by each point of disinterest 𝑝𝑏,𝑖 , but
                                                         with opposite sign. In this way the final potential can be
where 𝑓 is the probability density function of the esti- computed as
mated distribution. Moreover, we consider some point



                                                             73
Nicolo’ Brandizzi et al. CEUR Workshop Proceedings                                                                        71–76




Figure 4: Final map subdivision together with vehicles position at a given time-stamp.



                                                                      the potential as (1). The normalized values are reported
                         ∑︁                     ∑︁                    in Figure 1, where the equipotential curves are 0.25, 0.8.
 𝑈 (𝑥) = 𝑘1 𝑓 (𝑥) + 𝑘2         𝑈𝑝𝑎,𝑖 (𝑥) − 𝑘3        𝑈𝑝𝑏,𝑖 (𝑥)           Additionally, we present results (2) when additional
                           𝑖                    𝑖                     point of dis/interests are present in the requirements.
                                                    (2)
                                                                      In the Figure 2 the potential computed with parameters
where 𝑘1 , 𝑘2 , 𝑘3 > 0 are adjustable parameters.
                                                                      𝑘1 = 1, 𝑘2 = 0.5, 𝑘3 = 0.3 is presented. Two points of
  With the latter equation, we can split the operating
                                                                      interest are reported with green “×”, while the point of
area by using equipotential curves and additional seg-
                                                                      disinterest with a purple “+”. Also in this case the values
ments. This phase is highly dependant on the operating
                                                                      are normalized and the equipotential curves refers to the
area and on the resource allocation requirements. In
                                                                      values 0.25, 0.8.
the next chapter some solutions will be presented and
                                                                         As can be seen from these figures, in many cases the
compared.
                                                                      equipotential curves are not enough to define sectors
                                                                      with simple shapes, for this reason some additional di-
4. Experiments and Results                                            vision lines should be extracted from the data. A triv-
                                                                      ial solution is to consider the line passing through the
The evaluation of the proposed method takes to account                eigenvectors of the covariance matrix of the estimated
the city of Barcelona, used as the operating area. The                distribution, i.e. the axes of the equipotential ellipses
given dataset contains 813197 records, each having a po-              of the Gaussian. The resulting subdivision for the latter
sition detection event with information about the vehicle             method is shown in Figure 3.
id, the site id, latitude, longitude, altitude, battery per-             This result allows for an additional subdivision that is
centage, date of the last fix, status (e.g. free, running) and        suitable for resource allocation tasks. the reader should
the time-stamp of the detection.                                      note how these results are highly dependant on the points
   The records have been collected between 20/08/2020                 of interest/disinterest, so manual tuning is required for
and 19/09/2020 in the same site id (Barcelona) for around             optimal sector splits.
500 different vehicles. For simplicity, we only considered               Finally, we report 4 a map subdivision with sectors
the vehicle id, latitude, longitude and the time-stamp.               coloring where vehicles’ positions are also shown.
   We first apply a position filtering where any vehicles                As the reader can see, the 12 identified sectors are
outside of the operating area 1 are excluded. This reduces            descriptive of the vehicles distribution in the different
the number of records by 43%.                                         zones of the city.
   As already mentioned the choice of the potential func-                For completeness, in Figure 5 we show the potentials
tion has many options. The easiest solution computes                  obtained by considering the vehicles distribution at dif-
                                                                      ferent time of the day. It can be noticed that the vehicles
    1
      Latitude = (41.3419, 41.4465)                                   distribution doesn’t change significantly during the day,
Longitude = (2.0878, 2.2454)                                          but nonetheless this analysis is necessary.



                                                                 74
Nicolo’ Brandizzi et al. CEUR Workshop Proceedings                                                                        71–76




Figure 5: Potentials comparison when learning the distributions at 10:00 (blue), 14:00 (red), 18:00 (green) and 24:00 (purple) of
each day.



   From the above mentioned analysis, we can infer the              References
general behavior of the users based on vehicles location
through the week. This is a preliminary study which can             [1] P. Caponnetto, et al., The effects of physical exercise
aid future research in the direction of a ToM approach to               on mental health: From cognitive improvements
model users’ mental state.                                              to risk of addiction, International Journal of En-
                                                                        vironmental Research and Public Health 18 (2021).
                                                                        doi:10.3390/ijerph182413384.
5. Conclusions                                                      [2] R. Brociek, G. De Magistris, F. Cardia, F. Coppa,
                                                                        S. Russo, Contagion prevention of covid-19 by
In conclusion the method proposed is a generic approach                 means of touch detection for retail stores, volume
to smart vehicle resource allocation and, specifically, to              3092, 2021, pp. 89 – 94.
split a metropolitan city into sectors. The power of this           [3] S. Russo, S. Illari, R. Avanzato, C. Napoli, Reducing
method relies in in its simplicity and ability to suit a                the psychological burden of isolated oncological
variety of different context. The main disadvantage is                  patients by means of decision trees, volume 2768,
that the sectors subdivision requires some tuning and a                 2020, pp. 46 – 53.
human supervision.                                                  [4] S. Illari, S. Russo, R. Avanzato, C. Napoli, A cloud-
   Further extensions can be considered, specially regard-              oriented architecture for the remote assessment and
ing the potential function definition. Multiple Guassian                follow-up of hospitalized patients, volume 2694,
distributions representing different vehicles conditions                2020, pp. 29 – 35.
(e.g. time of the day, holidays and working hours) can be           [5] V. Singhal, D. Dahiya, Distributed task allocation
weighted differently in the potential computation, so to                in dynamic multi-agent system, in: International
take into account particular needs. Also the potentials                 Conference on Computing, Communication & Au-
generated by the point of interest or disinterested can                 tomation, IEEE, 2015, pp. 643–648.
be modified with ad hoc functions based on the specific             [6] A. C. Chapman, R. A. Micillo, R. Kota, N. R. Jen-
of each point. Overall, our method is valuable and can                  nings, Decentralised dynamic task allocation: a
be used as a starting point to model human belief states                practical game: theoretic approach, in: Proceed-
with a Theory of Mind framework. For future improve-                    ings of The 8th International Conference on Au-
ment it should be taken into account the automation in                  tonomous Agents and Multiagent Systems-Volume
the sectors recognition phase, so to obtain a stand alone               2, Citeseer, 2009, pp. 915–922.
process.                                                            [7] Q. Baert, A. C. Caron, M. Morge, J.-C. Routier,
                                                                        K. Stathis, A location-aware strategy for agents
                                                                        negotiating load-balancing, in: 2019 IEEE 31st In-
                                                                        ternational Conference on Tools with Artificial In-




                                                               75
Nicolo’ Brandizzi et al. CEUR Workshop Proceedings                                                                 71–76



     telligence (ICTAI), IEEE, 2019, pp. 668–675.                   Recognition 45 (2012) 3950–3961.
 [8] X. Zhang, V. Lesser, Multi-linked negotiation in          [23] C. Maugis, G. Celeux, M.-L. Martin-Magniette, Vari-
     multi-agent systems, in: Proceedings of the first in-          able selection for clustering with gaussian mixture
     ternational joint conference on Autonomous agents              models, Biometrics 65 (2009) 701–709.
     and multiagent systems: part 3, 2002, pp. 1207–           [24] T. Su, J. G. Dy, In search of deterministic methods
     1214.                                                          for initializing k-means and gaussian mixture clus-
 [9] A. Gopnik, H. M. Wellman, Why the child’s theory               tering, Intelligent Data Analysis 11 (2007) 319–338.
     of mind really is a theory (1992).                        [25] R.-P. Li, M. Mukaidono, Gaussian clustering method
[10] G. De Magistris, S. Russo, P. Roma, J. Starczewski,            based on maximum-fuzzy-entropy interpretation,
     C. Napoli, An explainable fake news detector based             Fuzzy Sets and systems 102 (1999) 253–258.
     on named entity recognition and stance classifica-        [26] G. Lo Sciuto, S. Russo, C. Napoli, A cloud-based
     tion applied to covid-19, Information (Switzerland)            flexible solution for psychometric tests validation,
     13 (2022). doi:10.3390/info13030137.                           administration and evaluation, volume 2468, 2019,
[11] D. Premack, G. Woodruff, Does the chimpanzee                   p. 16 – 21.
     have a theory of mind?, Behavioral and brain sci-         [27] M.-S. Yang, S.-J. Chang-Chien, Y. Nataliani, Un-
     ences 1 (1978) 515–526.                                        supervised fuzzy model-based gaussian clustering,
[12] N. C. Rabinowitz, F. Perbet, H. F. Song, C. Zhang,             Information Sciences 481 (2019) 1–23.
     S. M. A. Eslami, M. Botvinick, Machine theory of          [28] M. Woźniak, D. Połap, G. Borowik, C. Napoli, A
     mind, in: J. G. Dy, A. Krause (Eds.), Proceedings              first attempt to cloud-based user verification in dis-
     of the 35th International Conference on Machine                tributed system, 2015, pp. 226 – 231. doi:10.1109/
     Learning, ICML 2018, Stockholmsmässan, Stock-                  APCASE.2015.47.
     holm, Sweden, July 10-15, 2018, volume 80 of Pro-         [29] A. E. Raftery, N. Dean, Variable selection for model-
     ceedings of Machine Learning Research, PMLR, 2018,             based clustering, Journal of the American Statistical
     pp. 4215–4224. URL: http://proceedings.mlr.press/              Association 101 (2006) 168–178.
     v80/rabinowitz18a.html.
[13] U. Liszkowski, Using theory of mind, Child Devel-
     opment Perspectives 7 (2013) 104–109.
[14] D. C. Ong, J. Zaki, N. D. Goodman, Computational
     models of emotion inference in theory of mind: A
     review and roadmap, Topics in cognitive science
     11 (2019) 338–357.
[15] H. P. Friedman, J. Rubin, On some invariant cri-
     teria for grouping data, Journal of the American
     Statistical Association 62 (1967) 1159–1178.
[16] L. Giada, M. Marsili, Algorithms of maximum like-
     lihood data clustering with applications, Physica
     A: Statistical Mechanics and its Applications 315
     (2002) 650–664.
[17] J. D. Banfield, A. E. Raftery, Model-based gaussian
     and non-gaussian clustering, Biometrics (1993) 803–
     821.
[18] C. Fraley, Algorithms for model-based gaussian
     hierarchical clustering, SIAM Journal on Scientific
     Computing 20 (1998) 270–281.
[19] N. Brandizzi, V. Bianco, G. Castro, S. Russo, A. Wa-
     jda, Automatic rgb inference based on facial emo-
     tion recognition, volume 3092, 2021, pp. 66 – 74.
[20] P. D. McNicholas, Model-based clustering, Journal
     of Classification 33 (2016) 331–373.
[21] C. Napoli, G. Pappalardo, E. Tramontana, An agent-
     driven semantical identifier using radial basis neu-
     ral networks and reinforcement learning, volume
     1260, 2014.
[22] M.-S. Yang, C.-Y. Lai, C.-Y. Lin, A robust em cluster-
     ing algorithm for gaussian mixture models, Pattern



                                                          76