# Diagnosing the cosmic coincidence problem and its evolution with recent
observations

Jie Zheng1,Yun Chen2,3,∗,Tengpeng Xu2,3 and Zong-Hong Zhu1,4 1 Gravitational
Wave and Cosmology Laboratory, Department of Astronomy, Beijing Normal
University, Beijing 100875, China  2 Key Laboratory for Computational
Astrophysics, National Astronomical Observatories, Chinese Academy of
Sciences, Beijing 100101, China
<EMAIL_ADDRESS>3 College of Astronomy and Space Sciences, University of
Chinese Academy of Sciences,Beijing 100049, China  4 School of Physics and
Technology, Wuhan University, Wuhan 430072, China

###### Abstract

In the framework of a phenomenological cosmological model with the assumption
of $\rho_{X}\propto\rho_{m}a^{\xi}$ ($\rho_{X}$ and $\rho_{m}$ are the energy
densities of dark energy and matter, respectively.), we intend to diagnose the
cosmic coincidence problem by using the recent samples of Type Ia supernovae
(SNe Ia), baryon acoustic oscillation (BAO) and cosmic microwave background
(CMB). $\xi$ is a key parameter to characterize the severity of the
coincidence problem, wherein $\xi=3$ and $0$ correspond to the $\Lambda$CDM
scenario and the self-similar solution without the coincidence problem,
respectively. The case of $\xi=Constant$ has been investigated in the previous
studies, while we further consider the case of
$\xi(z)=\xi_{0}+\xi_{z}*\frac{z}{1+z}$ to explore the possible evolution. A
joint analysis of the Pantheon SNe Ia sample with the recent BAO and CMB data
figures out that $\xi=3.28\pm 0.15$ in the case of $\xi=Constant$ at $68\%$
confidence level (CL), in addition, $\xi_{0}=2.78_{-1.01}^{+0.28}$ and
$\xi_{z}=0.93_{-0.91}^{+1.56}$ in the case of $\xi(z)$ at $68\%$ CL. It
implies that the temporal evolution of the scaling parameter $\xi$ is accepted
by the joint sample at $68\%$ CL; however, the joint sample also cannot
distinguish whether the scaling parameter $\xi$ is variable or not at 95% CL.
Moreover, the $\Lambda$CDM scenario is accepted by the joint sample at $95\%$
CL in both cases, and the coincidence problem still exists. In addition, we
apply the Bayesian evidence to compare the models with the analysis of the
joint sample, it turns out that the $\Lambda$CDM scenario is most supported by
the joint sample; furthermore, the joint sample prefers the scenario with a
constant $\xi$ to the one with a variable $\xi(z)$.

###### keywords:

Dark energy , Cosmology

##  1 Introduction

The existence of an exotic form of energy with negative pressure, dubbed “dark
energy”, is one of the most widely involved mechanism to explain the
accelerating universe. The most popular dark energy models mainly include the
$\Lambda$CDM model and the scalar-field dark energy model. Moreover, the
$\Lambda$CDM model is preferred by most observations, though a small number of
observations display a slight deviation [1, 2]. However, on the theoretical
level the $\Lambda$CDM model is embarrassed by the well-known cosmological
constant problems [3, 4], i.e., the “coincidence” and “fine-tuning” problems.
The “coincidence problem” states that why the present epoch is so special that
the energy density of dark energy is in the same order of magnitude as that of
the matter only at this period. Several possible approaches have been adopted
to explain or alleviate the coincidence problem, mainly including the
anthropic principle [5, 6, 7, 8], the slow evolving and spatially homogeneous
scalar field with the “tracker” properties (see, for instance, [9] for
review), and the interaction between the dark energy and dark matter [10, 11].

In this work, we choose to explore the coincidence problem in a different
perspective. A phenomenological model with minimal underlying theoretical
assumptions is adopted, where the ratio of the energy densities of dark energy
and matter is parameterized as $\rho_{X}\propto\rho_{m}a^{\xi}$ [12, 13]. This
model originates from two special cases, i.e., $\rho_{X}\propto\rho_{m}a^{3}$
for the $\Lambda$CDM model and $\rho_{X}\propto\rho_{m}a^{0}$ for the self-
similar solution without the coincidence problem, where $\xi=3$ and $0$,
respectively. The estimate value of $\xi$ obtained from the observational data
can apparently reveal the severity of the coincidence problem. In addition,
the standard cosmology without interaction between dark energy and dark matter
is characterized by $\xi+3\omega_{X}=0$, and $\xi+3\omega_{X}\neq 0$ indicates
the non-standard cosmology. Furthermore, any solution with a scaling parameter
$0<{\xi}<3$ makes the coincidence problem less severe [14].

Besides the case of $\xi=Constant$ which has been studied in the previous
works, we also explore the possible evolution of $\xi$ with the
parametrization $\xi(z)=\xi_{0}+\xi_{z}*\frac{z}{1+z}$. The previous studies
have conducted observational constraints on the scenario of $\xi=Constant$
with several different cosmological probes (see, for instance, [14, 15, 13,
16, 17]), including the SNe Ia, CMB, BAO, Hubble parameter $H(z)$ versus
redshift and Sandage-Loeb test data sets. In this work, by considering the
cases of $\xi=Constant$ and $\xi(z)=\xi_{0}+\xi_{z}*\frac{z}{1+z}$, we explore
the cosmic coincidence problem and its possible evolution with the recent
observations, including the SNe Ia data from the Pantheon sample [18], the CMB
power spectrum data from the Planck 2018 final analysis [19], and the BAO data
from the measurements of 6dFGS survey[20], SDSS DR7 MGS[21], and BOSS
DR12[22].

This paper is organized as follows. In Section 2, we briefly introduce the
phenomenological model under consideration. The Section 3 presents the
observational data adopted in this work. The results from observational
constraints and the corresponding analyses are displayed in Section 4. In the
last section, we summarize the main conclusions.

##  2 Phenomenological model: basic equations

The model under consideration is characterized with a phenomenological form
for the ratio of the dark energy and matter densities [12, 13],

$\rho_{X}\propto\rho_{m}a^{\xi},\qquad
or\qquad\Omega_{X}\propto\Omega_{m}a^{\xi},$ (1)

where $\Omega_{X}$ and $\Omega_{m}$ are the fractions of the energy density of
the universe contributed from dark energy and matter, respectively. The
scaling parameter ${\xi}$ can be constrained from observational data and used
to reveal the severity of the coincidence problem.

Considering a flat FLRW universe with $\Omega_{X}+\Omega_{m}=1$, we can obtain

$\Omega_{X}=\frac{\Omega_{X,0}a^{\xi}}{1-\Omega_{X,0}\left(1-a^{\xi}\right)},$
(2)

where $\Omega_{X,0}=\Omega_{X}(z=0)$. According to the energy conservation
equation, we have

$\frac{d\rho_{\mathrm{tot}}}{da}+\frac{3}{a}\left(1+\omega_{X}\Omega_{X}\right)\rho_{\mathrm{tot}}=0,$
(3)

where $\rho_{\mathrm{tot}}=\rho_{m}+\rho_{X}$ is the total energy density,
$\omega_{X}$ specifies the equation of state of the dark energy. Meanwhile,
the Eq.(3) can be rewritten as

$\frac{d\rho_{m}}{da}+\frac{3}{a}\rho_{m}=-\left[\frac{d\rho_{X}}{da}+\frac{3}{a}\left(1+\omega_{X}\right)\rho_{X}\right]=Q,$
(4)

where $Q=-(\xi+3\omega_{X})\rho_{m}\kappa a^{\xi-1}/(1+\kappa a^{\xi})$ and
$\kappa=\rho_{X}/(\rho_{m}a^{\xi})$, and the interaction term $Q=0\;(\neq 0)$
denotes the cosmology without (with) interaction between dark energy and
matter.

Based on Eq.(3), we can work out

$\frac{\rho_{\mathrm{tot}}}{\rho_{0}}=\exp\left(\int_{a}^{1}\frac{da}{a}3\left(1+\omega_{X}\Omega_{X}\right)\right).$
(5)

Assuming $\omega_{X}$ as a constant, we can rewritten the above equation as

$E^{2}(z)=\exp\left(\int_{a}^{1}\frac{da}{a}3\left(1+\omega_{X}\Omega_{X}\right)\right),$
(6)

where $E^{2}(z)\equiv[H(z)/H_{0}]^{2}=\rho_{\mathrm{tot}}/\rho_{0}$, and
$E(z)$ is the dimensionless Hubble parameter. When $\xi=Constant$, we can
solve Eq.(6) and get

$E^{2}(z;\textbf{p})=a^{-3}\left(1-\Omega_{X,0}\left(1-a^{\xi}\right)\right)^{-3\omega_{X}/\xi},$
(7)

where the parameter set is
$\textbf{p}\equiv\left(\Omega_{X,0},\omega_{X},\xi\right)$. However, for a
variable $\xi(z)$,

$\xi(z)=\xi_{0}+\xi_{z}*\frac{z}{1+z}.$

We cannot obtain the analytical solution of Eq.(6). Then we should solve it
numerically with the parameter set $\textbf{p
}\equiv\left(\Omega_{X,0},\omega_{X},\xi_{0},\xi_{z}\right)$.

##  3 Data sample

The observational data sets used in our cosmological analyses are described as
follows, including the Pantheon SNe Ia sample, the CMB power spectrum data
from the final Planck 2018 results, and the BAO data from the 6dFGS survey,
the SDSS DR7 MGS, and the BOSS DR12 measurements.

###  3.1 SNe Ia data set

The SNe Ia as standard candles have been proved to be a kind of sensitive
probe of cosmology (see, e.g. [23, 24, 25]). The population of confirmed SNe
Ia has a dramatic increase over the last two decades, in the mean time, the
techniques for measuring the light curve parameters are also continually being
improved to reduce the systematic uncertainties. At present, the most popular
techniques mainly include the SALT/SALT2 [26, 27] and SiFTO [28] models, which
are two popular techniques at present and fit the light curves of SNe Ia by
using the spectral template.

The SNe Ia sample adopted in this work is the Pantheon sample [18], which
consists of 1048 SNe Ia (0.01 $\leq z\leq$ 2.3) combined from Pan-STARRS1(PS1)
Medium Deep Survey, SDSS, SNLS, various low-z and HST samples. In the Pantheon
sample, the distances for each of these SNe Ia are determined after fitting
their light-curves with the most up-to-date published version of SALT2 [29],
then applying the BEAMS with Bias Corrections (BBC) method [30] to determine
the nuisance parameters and adding the distance bias corrections. The uniform
analysis procedure conducted on the SNe Ia of Pantheon sample has
significantly reduced the systematic uncertainties related to photometric
calibration.

The observable given in the Pantheon sample can be deemed as a correction to
the apparent magnitude (see Table A17 of [18]), i.e.,

$\displaystyle Y^{obs}$ $\displaystyle=$ $\displaystyle m_{B}+K$ (8)
$\displaystyle=$ $\displaystyle\mu+M,$

where $\mu$ is the distance modulus, $m_{B}$ is the apparent B-band magnitude,
$M$ is the absolute B-band magnitude of a fiducial SN Ia, and the correction
term $K=\alpha x_{1}-\beta c+\Delta_{M}+\Delta_{B}$ includes the corrections
related to four different sources (see [18] for more details). The
corresponding theoretical (predicted) value is

$\displaystyle Y^{th}$ $\displaystyle=$ $\displaystyle 5\log(d_{L})+25+M$ (9)
$\displaystyle=$ $\displaystyle 5\log[(1+z)D(z)]+Y_{0},$

where the constant term $Y_{0}$ is written as
$Y_{0}=M+5log(\frac{cH_{0}^{-1}}{Mpc})+25$, and the luminosity distance
$d_{L}$ and the normalized comoving distance $D(z)$ are related with each
other through the following formula, i.e.,

$d_{L}(z)=\frac{c(1+z)}{H_{0}}D(z),$ (10)

where $c$ is the velocity of light. In a flat universe, $D(z)$ can be
expressed as

$D(z)=\int_{0}^{z}\frac{d\tilde{z}}{E(\tilde{z})},$ (11)

where $E(z)$ can be worked out with Eq. (6) for the model under consideration.

The chi-square statistic for the Pantheon sample can be constructed as

$\chi^{2}_{\textrm{SNe}}={\Delta\overrightarrow{Y}}^{T}\cdot\textbf{C}^{-1}\cdot{\Delta\overrightarrow{Y}},$
(12)

where the residual vector for the SNe Ia data in the Pantheon sample is
$\Delta\overrightarrow{Y}_{i}=[Y^{obs}_{i}-Y^{th}(z_{i};Y_{0},\textbf{p})]$.
The covariance matrix C of the sample includes the contributions from both the
statistical and systematic errors. The nuisance parameter, i.e., the constant
term $Y_{0}$ is marginalized over with the analytical methodology presented in
[31].

###  3.2 BAO data set

Table 1: The BAO data adopted in this work. Survey | $z_{eff}$ | Measurement | Value | $\sigma$
---|---|---|---|---
6dFGS | 0.106 | $r_{s}/D_{V}$ | 0.336 | 0.015
SDSS DR7 MGS | 0.15 | $D_{V}\left(r_{s,fid}/r_{s}\right)$ | 664 | 25
BOSS DR12 | 0.38 | $D_{M}\left(r_{s,fid}/r_{s}\right)$ | 1518 | –
| 0.38 | $H(z)\left(r_{s}/r_{s,fid}\right)$ | 81.5 | –
| 0.51 | $D_{M}\left(r_{s,fid}/r_{s}\right)$ | 1977 | –
| 0.51 | $H(z)\left(r_{s}/r_{s,fid}\right)$ | 90.4 | –
| 0.61 | $D_{M}\left(r_{s,fid}/r_{s}\right)$ | 2283 | –
| 0.61 | $H(z)\left(r_{s}/r_{s,fid}\right)$ | 97.3 | –

The BAO data extracted from galaxy redshift surveys are also a kind of
powerful cosmological probe [32, 33]. The BAO data set used here is a
combination of measurements from the 6dFGS at $z_{\rm{eff}}=0.106$ [20], the
SDSS DR7 Main Galaxy Sample (MGS) at $z_{\rm{eff}}=0.15$ [21], and the BOSS
DR12 at $z_{\rm{eff}}=(0.38,0.51,0.61)$ [22]. The corresponding measurements
are listed in Table 1.

The observable quantities used in the measurements are expressed in terms of
the transverse co-moving distance $D_{M}(z)$, the volume-averaged angular
diameter distance $D_{V}(z)$, the Hubble rate $H(z)\equiv H_{0}E(z)$, the
sound horizon at the drag epoch $r_{s}$, and its fiducial value
$r_{\rm{s,fid}}$. Following [34], we use the fitting formula of [32] to
compute $r_{s}$, and $r_{\rm{s,fid}}$ is computed with the fiducial cosmology
adopted in the paper in which the measurement is reported. In a flat universe,
the transverse co-moving distance $D_{M}(z)$ equals to the line-of-sight
comoving distance $D_{C}(z)$, which is expressed as,

$D_{C}(z)\equiv\frac{c}{H_{0}}D(z),$ (13)

and $c$ is the speed of light. The volume-averaged angular diameter distance
is

$D_{V}(z)=\left[\frac{cz}{H_{0}}\frac{D_{M}^{2}(z)}{E(z)}\right]^{1/3}.$ (14)

We employ the BAO data set in the analysis with the chi-squared statistic

$\chi_{\mathrm{BAO}}^{2}(p)=\left[\vec{A}_{\mathrm{th}}(p)-\vec{A}_{\mathrm{obs}}\right]^{T}C^{-1}\left[\vec{A}_{\mathrm{th}}(p)-\vec{A}_{\mathrm{obs}}\right],$
(15)

where $C^{-1}$ is the inverse of the covariance matrix. The BOSS DR12
measurements listed in the last six lines of Table 1 are correlated, and the
corresponding covariance matrix is present in Eq.(20) of [34], which is also
available from SDSS website111https://sdss3.org/science/boss_publications.php.

###  3.3 CMB data set

Observations of the CMB spectra provide another kind of independent test of
the existence of dark energy. It is remarkable that the CMB power spectra from
the WMAP [35] and Planck projects [19] have provided strong constraints on
cosmological parameters. Here, we use the combination of temperature and
polarization CMB power spectra from the Planck 2018 release [19], including
the likelihoods at multipoles $\ell=2-2508$ in TT, $\ell=2-1996$ in EE, and
$\ell=30-1996$ in TE. In practice, different algorithms have been used to
estimate the CMB power spectrum, such as Commander[36, 37], SimAll[37] and
Pilk[19]. The “Commander” component-separation algorithm is used to estimate
the power spectrum over the range $\ell=2-29$ in TT. The “SimAll” approach is
used to estimate the power spectrum over the range $\ell=2-29$ in EE. The
“Pilk” cross-half-mission likelihood [37] is used to compute the CMB
high-$\ell$ part for TT,TE,EE over the range $30\leq\ell\leq 2508$ in TT and
over the range $30\leq\ell\leq 1996$ in TE and EE 222For more details on the
Planck CMB spectrum and likelihood code, see
https://wiki.cosmos.esa.int/planckpla/index.php/CMB_spectrum_%26_Likelihood_Code
. Hereafter, $\mathcal{L}_{Planck}$ denotes the likelihood of the Planck data
described above.

##  4 Analysis and Results

###  4.1 Observational constraints

Table 2:  The mean values with $68\%$ confidence limits for model parameters
constrained from the Pantheon SNe sample, and from a joint sample of SNe, BAO
and CMB data sets, respectively. The scenarios with $\xi=Constant$ and
$\xi(z)=\xi_{0}+\xi_{z}*\frac{z}{1+z}$ are both considered.

Model | Data set | $\Omega_{X,0}$ | $\omega_{X}$ | $\xi$ | $\xi_{0}$ | $\xi_{z}$
---|---|---|---|---|---|---
$\xi=Constant$ | Pantheon | $0.75_{-0.08}^{+0.13}$ | $-0.96_{-0.14}^{+0.16}$ | $3.42_{-0.62}^{+1.22}$ | - | -
$\xi=Constant$ | Pantheon + BAO + CMB | $0.67\pm 0.01$ | $-1.12\pm 0.04$ | $3.28\pm 0.15$ | - | -
$\xi(z)=\xi_{0}+\xi_{z}*\frac{z}{1+z}$ | Pantheon | $0.69^{+0.04}_{-0.15}$ | $-1.01_{-0.32}^{+0.04}$ | - | $3.00_{-0.78}^{+0.09}$ | $0.94_{-1.02}^{+0.58}$
$\xi(z)=\xi_{0}+\xi_{z}*\frac{z}{1+z}$ | Pantheon + BAO + CMB | $0.69\pm 0.01$ | $-0.99_{-0.06}^{+0.03}$ | - | $2.78_{-1.01}^{+0.28}$ | $0.93_{-0.91}^{+1.56}$

Figure 1: The 2D probability distributions of model parameters in the scenario
of $\xi=Constant$, constrained from the Pantheon SNe sample (red solid lines),
and from a joint sample of the SNe, BAO and CMB data (green dotted lines),
respectively. The contours correspond to $68\%$ and $95\%$ CLs. Figure 2: The
2D contours of parameters in the scenario of
$\xi(z)=\xi_{0}+\xi_{z}*\frac{z}{1+z}$. The implications of line styles are
the same as those in Fig.1.

In our analysis, the total likelihood for parameters is

$\mathcal{L}(\mathbf{p})=\prod\mathcal{L}_{i},$ (16)

where $\mathcal{L}_{i}$ means the likelihood of each data set. In the case of
using the combination of SNe Ia, BAO and CMB data sets, it takes,

$\mathcal{L}_{tot}(\mathbf{p})=\mathcal{L}_{SNe}\mathcal{L}_{BAO}\mathcal{L}_{Planck}$
(17)

We derive the posterior probability distributions of parameters with Markov
Chain Monte Carlo (MCMC) exploration using the May 2020 version of CosmoMC
[38]. In the next following analysis, we consider two different treatment
schemes for the scaling parameter $\xi$, i.e., $\xi=Constant$ and
$\xi(z)=\xi_{0}+\xi_{z}*\frac{z}{1+z}$.

The case of $\xi=Constant$ has been widely studied in the literature [see e.g.
14, 15, 13, 16, 17]. Here we re-explore this scenario with the latest data
sets. In addition, the case of $\xi(z)$ is taken into account to explore the
possible evolution. We put observational constraints on the model parameters
with the recent Pantheon SNe Ia sample, as well as with a combination of the
SNe Ia, BAO and CMB data sets, respectively. We present the mean values with
$68\%$ confidence limits for the parameters of interest in Table 2 for both
scenarios. In the scenario of $\xi=Constant$, the constraints on
$\Omega_{X,0}$, $\omega_{X}$ and $\xi$ from the combining sample are much
tighter than those from the single Pantheon SNe Ia sample. The constraints on
the parameters $(\Omega_{X,0},\omega_{X},\xi)$ from the Pantheon SNe sample
are consistent with those from the “Constitution Set” SNe sample adopted in
[13] at $68\%$ CL. However, the constraints on $(\Omega_{X,0},\omega_{X},\xi)$
from our combining sample are inconsistent with those from the joint SNe + BAO
+ CMB sample adopted in [13] at $68\%$ CL, but they are consistent at $95\%$
CL. Moreover, the $\Lambda$CDM scenario, i.e., $(\omega_{X},\xi)=(-1,3)$, is
accepted by the Pantheon SNe sample at $68\%$ CL, however, it’s ruled out by
the combining sample at $99\%$ CL. In the scenario of $\xi(z)$, the
constraints on $\Omega_{X,0}$ and $\omega_{X}$ from the combining sample are
much tighter than those from the Pantheon SNe sample, but the constraint
precisions on $\xi_{0}$ and $\xi_{z}$ from the combining sample do not have
significant improvements compared with those from the single Pantheon SNe
sample. The $\Lambda$CDM scenario, i.e.,
$(\omega_{X},\xi_{0},\xi_{z})=(-1,3,0)$, is accepted by the Pantheon SNe
sample but ruled by the combining sample at $68\%$ CL, nevertheless, it’s
accepted by the combining sample at 95% CL. Then, we pay attention to the
constraints on the parameter $\xi_{z}$ which indicates the degree of temporal
evolution of the scaling parameter $\xi$. The mean values with $68\%$
confidence limits for the parameters $\xi_{z}$ are
$\xi_{z}=0.94^{+0.58}_{-1.02}$ from the Pantheon SNe sample and
$\xi_{z}=0.93^{+1.56}_{-0.91}$ from the combining sample. It implies that the
Pantheon SNe sample cannot distinguish between the evolving and non-evolving
scenarios, and the combining sample supports the time-evolving scenario at
$68\%$ CL.

The two-dimensional (2D) contours for the model parameters of interest are
presented in Fig. 1 for the scenario of $\xi=Constant$ and in Fig. 2 for the
scenario of $\xi(z)$. From Fig. 1, one also can see that the constraints from
the combining sample are much more restrictive than those from the Pantheon
SNe sample, though there are degeneracies between some parameters. The
$\omega_{X}-\xi$ plane does not have significant degeneracy from the Pantheon
SNe sample, but displays a negative correlation from the combining sample. The
$\Omega_{X,0}-\xi$ plane demonstrates a positive correlation from both the
single Pantheon SNe sample and the combining sample. Especially, the
$\Omega_{X,0}-\omega_{X}$ plane displays a positive correlation from the
Pantheon sample, conversely, a negative correlation from the combining sample.
From Fig. 2, one can find out that the contours constrained from the combining
sample shrink significantly compared with those from the Pantheon SNe sample
except for the last panel, i.e., the $\xi_{0}-\xi_{z}$ plane. It implies that
the addition of the BAO and CMB data sets cannot greatly improve the
constraint precisions on $\xi_{0}$ and $\xi_{z}$.

###  4.2 Model selection statistics

Table 3: We list the natural logarithm of the Bayesian evidences $\ln B_{i}$ and the Bayes factors $\ln B_{i,0}$ from the joint sample of SNe+BAO+CMB, where the subscript “0” denotes the $\Lambda$CDM model. Model | $\ln B_{i}$ | $\ln B_{i,0}$
---|---|---
$\Lambda$CDM | -1940.80 | 0
$\rho_{X}\propto\rho_{m}a^{\xi}$ with $\xi=Constant$ | -2022.22 | -81.42
$\rho_{X}\propto\rho_{m}a^{\xi}$ with $\xi(z)=\xi_{0}+\xi_{z}*\frac{z}{1+z}$ | -2030.04 | -89.24

In the framework of Bayes’ theorem, the probability that the model $M_{i}$ is
true can be estimated with

$P\left(M_{i}\mid D\right)=\frac{P\left(D\mid
M_{i}\right)P\left(M_{i}\right)}{P(D)},$ (18)

where $P(M_{i}\mid D)$ is the posterior probability, $D$ denotes the
observational data, $P(M_{i})$ is a prior probability in the model $M_{i}$,
and $P(D)$ is the normalization constant. In addition, $P(D\mid M_{i})$ is the
so-called Bayesian evidence [39, 40], which can be written as

$P\left(D\mid M_{i}\right)=\int
P\left(D\mid\bar{\theta},M_{i}\right)P\left(\bar{\theta}\mid
M_{i}\right)d\bar{\theta},$ (19)

where $P(D\mid\bar{\theta},M_{i})$ is the likelihood function under the model
$M_{i}$, and $P(\bar{\theta}\mid M_{i})$ is the prior probability for
parameter $\bar{\theta}$ under the model $M_{i}$. Hence, calculating the
Bayesian evidence requires the evaluation of an integral over the entire
likelihood function and the prior distributions of model parameters. When
comparing two models, e.g., $M_{i}$ versus $M_{j}$, the Bayes factor

$B_{ij}=\frac{P\left(D\mid M_{i}\right)}{P\left(D\mid M_{j}\right)},$ (20)

which is defined as the ratio of the Bayesian evidences of two models can be
employed as a judgment criterion, where the Bayes factor $B_{ij}>1$ (i.e.,
$\ln B_{ij}>0$) means that the observational data prefer $M_{i}$ to $M_{j}$,
and $B_{ij}<1$ implies that $M_{j}$ is preferred [41].

To compare the phenomenological models under consideration with the
$\Lambda$CDM model, we calculate the values of Bayesian evidence for each
model, where the code MCEvidence [42] which is a popular python package to
compute the Bayesian evidence is adopted here, and the observational data
correspond to the joint sample of SNe, BAO and CMB data. In Table 3, we show
the natural logarithm of the Bayesian evidence for each model, $\ln B_{i}$, as
well as the natural logarithm of the Bayes factor, $\ln B_{i0}$, where the
subscript “0” denotes the $\Lambda$CDM model. It turns out that the
$\Lambda$CDM model is most supported by the joint sample, since $B_{1,0}$ and
$B_{2,0}$ are both smaller than 1, where the subscripts “1” and “2” denote the
scenarios with a constant $\xi$ and a variable $\xi(z)$, respectively. In
addition, $B_{1,2}=B_{1}/B_{2}$ is bigger than 1, so the scenario with a
constant $\xi$ is more competitive than the one with a variable $\xi_{z}$.

##  5 Summary and conclusions

We have concentrated on a kind of phenomenological model of cosmology, where
the assumption of $\rho_{X}\propto\rho_{m}a^{\xi}$ is adopted. As a key
parameter, the scaling parameter $\xi$ reveals the severity of the coincidence
problem, where the particular values $\xi=3$ and $\xi=0$ correspond to the
$\Lambda$CDM scenario and the self-similar solution without coincidence
problem, respectively. Besides the scheme of assuming $\xi=Constant$, we have
also considered the scenario with a variable
$\xi(z)=\xi_{0}+\xi_{z}*\frac{z}{1+z}$ to explore the possible evolution. The
observational constraints on the model parameters are conducted with both the
single Pantheon SNe Ia sample and a joint sample of SNe, BAO and CMB data
sets, where the CMB power spectrum data are from the Planck 2018 final
analysis , and the BAO data are from the measurements of 6dFGS, SDSS DR7 MGS,
and BOSS DR12.

The main conclusions can be summarized as follows: (i) In the case of
$\xi=Constant$, the $\Lambda$CDM scenario, i.e., $(w_{X},\xi)=(-1,3)$, is
accepted by the Pantheon SNe sample and by the joint sample at $68\%$ CL and
$95\%$ CL, respectively. Moreover, in the case of a variable $\xi(z)$, the
$\Lambda$CDM scenario, i.e., $(w_{X},\xi_{0},\xi_{z})=(-1,3,0)$, is also
accepted by the Pantheon SNe sample and by the joint sample at $68\%$ CL and
$95\%$ CL, respectively. (ii) According to the observational constraints on
the model parameters, the Pantheon SNe sample cannot distinguish between the
scenarios of a constant $\xi$ and a variable $\xi(z)$ at $95\%$ CL because of
$\xi_{z}\in[-2.60,5.23]$ at 95% CL; moreover, the joint sample also cannot
distinguish whether the scaling parameter $\xi$ is variable or not at 95% CL
because of $\xi_{z}\in[-0.67,4.40]$ at 95% CL. (iii) According to the Bayesian
evidences calculated from the joint sample, we find out that the $\Lambda$CDM
model is most supported by the joint sample; furthermore, the joint sample
prefers the scenario with a constant $\xi$ to the one with a variable
$\xi(z)$. (iv) The inclusion of the BAO and CMB data sets just can provide
very limited improvements on constraining $\xi_{0}$ and $\xi_{z}$ in the
scenario of $\xi(z)$, but it has significantly reduced the allowed regions of
other parameters. Thus, to diagnose the evolution of the scaling parameter
$\xi$ more robustly, it seems to be quite necessary to explore other probes
which can supply more efficient improvements on constraining $\xi_{0}$ and
$\xi_{z}$.

##  6 acknowledgments

This work has been supported by the National Natural Science Foundation of
China (Nos. 11988101, 11633001, 11920101003, 11703034, 11773032 and 11573031),
the Strategic Priority Research Program of the Chinese Academy of Sciences
(No. XDB23000000), the Interdiscipline Research Funds of Beijing Normal
University, and the NAOC Nebula Talents Program.

#### Note added.

The data underlying this article will be shared on reasonable request to the
corresponding author.

## References

  * [1] P. Bull, et al., Physics of the Dark Universe 12 (2016) 56.
  * [2] J. S. Bullock, M. Boylan-Kolchin, ARAA 55 (2017) 343.
  * [3] S. Weinberg, Rev. Mod. Phys 61 (1989) 1.
  * [4] S. M. Carroll, W. H. Press, E. L. Turner, ARAA 30 (1992) 499.
  * [5] S. Weinberg, arXiv:astro-ph/0005265.
  * [6] A. Vilenkin, arXiv:hep-th/0106083.
  * [7] J. Garriga, M. Livio, A. Vilenkin, Phys. Rev. D 61 (1999) 023503.
  * [8] J. Garriga, A. Vilenkin, Phys. Rev. D 64 (2001) 023517.
  * [9] E. J. Copeland, M. Sami, S. Tsujikawa, Int. J. Mod. Phys. D 15 (2006) 1753.
  * [10] L. Amendola, arXiv:astro-ph/9908023v1.
  * [11] G. Caldera-Cabral, R. maartens, A.Urena-Lopez, arXiv:0812.1827v2.
  * [12] N. Dalal, et al., Phys. Rev. Lett. 87 (2001) 141302.
  * [13] Y. Chen, et al., Astrophys. J. 711 (2010) 439.
  * [14] D. Pavón, S. Sen, W. Zimdahl, JCAP 5 (2004) 009.
  * [15] Z. K. Guo, N. Ohta, S. Tsujikawa, Phys. Rev. D 76 (2007) 023508.
  * [16] S. Cao, N. Liang, Z.-H.Zhu, Mon. Not. R. Astron. Soc. 416 (2011) 1099.
  * [17] M.-J. Zhang, W.-B.Liu, EPJC 74 (2014) 2863.
  * [18] D. Scolnic, et al., Astrophys. J. 859 (2018) 101.
  * [19] N. Aghanim, et al., _å_ 641 (2020) A6. arXiv:1807.06209.
  * [20] F. Beutler, et al., Mon. Not. R. Astron. Soc. 416 (2011) 3017.
  * [21] A. J. Ross et al., Mon. Not. R. Astron. Soc. 449 (2015) 835.
  * [22] S. Alam, et al., Mon. Not. R. Astron. Soc. 470 (2017) 2617.
  * [23] D. Branch, D. L. Miller, APJL 405 (1993) L5.
  * [24] A. G. Riess, W. H. Press, R. P. Kirshner, APJL 438 (1995) L17.
  * [25] A. V. Filippenko, ASSL 332 (2005) 97 [arXiv:astro-ph/0410609].
  * [26] J. Guy, et al., Astron. Astrophys. 443 (2005) 781.
  * [27] J. Guy, et al., Astron. Astrophys. 466 (2007) 11.
  * [28] A. Conley, et al., Astrophys. J. 681 (2008) 482.
  * [29] M. Betoule, et al., Astron. Astrophys. 568 (2014) A22.
  * [30] R. Kessler, D. Scolnic, Astrophys. J. 836 (2017) 56.
  * [31] R. Giostri, et al., JCAP 03 (2012) 027.
  * [32] D. J. Eisenstein, W. Hu, Astrophys. J. 496 (1998) 605
  * [33] D. J. Eisenstein, et al., Astrophys. J. 633 (2005) 560.
  * [34] J. Ryan, Y. Chen, B. Ratra, Mon. Not. R. Astron. Soc. 488 (2019) 3844
  * [35] G. Hinshaw, et al., Astrophys. J. Suppl. 208 (2013) 19.
  * [36] Y. Akrami, et al.,Astron. Astrophys. 641 (2020) 74.
  * [37] N. Aghanim, et al.,Astron. Astrophys. 641 (2020) 92.
  * [38] A. Lewis, S. Bridle, Phys. Rev. D 66 (2002) 103511.
  * [39] R. Trotta, Contemporary. Physics. 49 (2008) 71.
  * [40] G. Efstathiou, Mon. Not. R. Astron. Soc. 388 (2008) 1314.
  * [41] M. Szydlowski, et al., Eur. Phys. J. C 75 (2015) 5.
  * [42] A. Heavens, et al.,arXiv:1704.03472.


# WebCrowds: An Authoring Tool for Crowd Simulation

Gabriel Fonseca Silva  Virtual Humans Lab
PUCRS
Porto Alegre, Brazil
<EMAIL_ADDRESS>Paulo Knob  Virtual Humans Lab
PUCRS
Porto Alegre, Brazil
<EMAIL_ADDRESS>Rubens Montanha  Virtual Humans Lab
PUCRS
Porto Alegre, Brazil
<EMAIL_ADDRESS>Soraia Musse  Virtual Humans Lab
PUCRS
Porto Alegre, Brazil
<EMAIL_ADDRESS>
###### Abstract

Crowd simulation is an area of research largely used in the game industry.
From the movement of a single NPC to the movement of an entire army, crowd
simulation methods can be used to move agents through the environment while
avoiding collisions with obstacles and between each other. Thus, it is
important that game developers have access to crowd simulation tools that are
both powerful and easy to use. In this paper, we present WebCrowds, an
authoring tool for crowd simulation which can be used by anyone to build
environments and simulate the movement of agents. The results achieved by our
research suggest that WebCrowds is easy to use, delivers trustworthy
simulation results, and can be used as an authoring tool for game developers
who need to simulate crowds in their games.

###### Index Terms:

Crowd Simulation, Authoring Tool, Virtual Agents, Framework

##  I Introduction

Several contributions have been made in the area of crowd simulation, given
its application in many different fields111Draft version made for arXiv:
https://arxiv.org/. Since the pioneer work of Thalmann and Musse [1], many
other methods emerged for both microscopic [2] and macroscopic [3] points of
view and, more recently, combining them both [4]. Ranging from the simulation
of a crowd of people or robots [5] to the modeling of personality for
simulated virtual agents [6, 7], crowd simulation has a wide range of uses in
different fields.

Focusing on the area of games, crowd simulation is important for many types of
games. Since the movement of Non-Playable Characters (NPCs) to the management
of whole armies, crowd simulation methods can be used to move virtual agents
from one point to another while avoiding collision with themselves or other
obstacles. Suyikno et al. [8] proposed a model to simulate the hiding behavior
of NPCs, while Silva et al. [9] proposed a method to move agents forward in
time and space fit to be used in ”Fog of War” systems. Given the importance of
crowd simulation in games, it is essential that game developers have a tool
where they can build environments and simulate crowds.

This work presents an authoring tool for crowd simulation. Named as WebCrowds,
our tool is divided into two parts: the user Editor, which is accessed through
a web Browser, and the crowd simulator, which is served as a web service and
is hosted inside a Server. WebCrowds allows users to build environments
placing agents, obstacles, and goals in the scene. Users can also load presets
from an OBJ file, and even save/load their built scenes using JavaScript
Object Notation (JSON) files, to be used for other simulations. Since the
simulation is executed on a Server, users can access WebCrowds even with
lower-performance computers.

##  II Related Work

This section discusses some work related to authoring tools and techniques for
crowd simulation scenarios. Ulicny et al. [10] presented a way of drawing a
crowd simulation where the user could use different types of brushes to create
the crowds and change their appearance, behavior, and direction to create a
scene to simulate. Chen et al. [11] presented a way to compose crowd scenarios
using natural language processing techniques, where different words and
expressions represent the attributes and behavior of each agent. Some of these
expressions may contain emotions, such as ”walk happily” and ”walk sadly”.
These agents are created using data provided by a user, and this data is used
to extract character keywords. This model was also employed by Liu et al.
[12], where keywords such as quantity, character type, behavioral verb,
location, and object, are taken into account. The data structure of the crowd
scene is divided into three components: crowd, behavior, and destination. Each
of these components has its keywords.

Colas et al. [13] presented a model for authoring crowd simulations using
sketches. The user draws curves in the interface, which are used to compose an
interaction field grid, influencing the steering behavior of agents. Other
agents and obstacles in the scene are also taken into account when composing
the grid, which allows agents to avoid collision with one another or move
behind obstacles. Kim and Sung [14] presented a model using sketching in
combination with augmented reality, where users can use dry-erase markers to
compose scenes. The authors use computer vision techniques to identify shapes
and colors in the sketches to define which type of object (e.g. goals, paths,
and trees) should be placed in that position.

The work found in the literature focuses on crowd animation, where users may
define behaviors or directly input an animation for virtual characters; or
explore new user interaction techniques, such as sketching, augmented reality,
and natural language. Differing from them, WebCrowds provides information on
the constructed environment and the simulation run, allowing users to evaluate
trajectories and densities of virtual agents and make any adjustments desired.

##  III Proposed Model

In this section, we present WebCrowds, an authoring tool for crowd simulation
which can be used by anyone to build environments and simulate the movement of
virtual agents. Next, we present the main elements of our model.

###  III-A System Architecture

Figure 1 presents an overview of our proposed model, which is available online
and can be accessed through a Browser222WebCrowds is available at:
https://vhlab.com.br/projects/webcrowds/.. Inside WebCrowds, the users can
create an environment by adding, positioning, and editing objects. In the
bottom right of Figure 2(a), highlighted in purple, it is possible to see the
Objects that can be used, namely: Agents, Goals, Obstacles, and Presets. More
details about these objects are going to be provided in Section III-B.

Following the pipeline presented in Figure 1, when the user opens WebCrowds in
their Browser, they have access to the Editor, where the Scene can be edited
to be then simulated. Once the agents, goals, and obstacles are included, the
user can run the simulation. When the user runs the simulation, the Request
Controller gathers information about the Objects in the Scene (e.g. their
positions and properties) and sends a request to the Server (Send Request). In
its turn, when the Server receives a new simulation, it triggers its own
Routine. In short, the Server executes the simulation with the parameters sent
from the Browser and, once it is finished, generates the results. More details
about the Server are provided in Section III-C.

The results are generated and sent back to the Request Controller (Receive
Response), which will display them in the browser (Simulation Results). These
results are comprised of three metrics: a Density Map (which shows the density
of agents during the simulation), the Agent’s Trajectories (which shows the
trajectories of each agent), and the Simulation Time. Finally, In Figure 1, it
is possible to see that the Server (on the right) also connects with a
Database. It was done to overcome request timeout issues, which would prevent
the simulation from finishing.

Figure 1:  Pipeline of WebCrowds. Users can use the Editor through a web
Browser. Requests for a given simulation are sent to the Server. The Server
returns the results when the simulation is finished, which are shown in the
Browser.

###  III-B Editor

In this section, we describe the three main elements of WebCrowds: Objects,
Object Actions, and General Actions. All three can be seen in Figure 2(a),
highlighted in purple (bottom right), yellow (bottom left), and blue (top),
respectively.

####  III-B1 Objects

In WebCrowds, the users can deal with four types of Objects: Agents, Goals,
Obstacles, and Presets. All of them can be seen in the bottom right of Figure
2(a), highlighted in purple. These objects can be positioned within the
scene’s environment and are detailed next:

  * •

Agents: Allows the creation of agents spawn areas, represented as blue squares
in the central region of Figure 2(a);

  * •

Goals: Allows the creation of goals for the agents to achieve, represented as
green circles in Figure 2(a);

  * •

Obstacles: Allows the creation of obstacles in the environment that should be
avoided by the agents, represented as red squares in Figure 2(a); and

  * •

Presets: Allows the user to load built-in scenarios into the environment.
Presets behave as a set of Obstacles that can’t be modified. We modeled five
possible presets, as presented in Figure 2(b).

####  III-B2 Object Actions

In WebCrowds Object Actions are simply the actions that users can perform with
Objects. The users can control four types of Objects Actions: Create, Remove,
Move and Edit. All of them can be seen in the bottom left of Figure 2(a),
highlighted in yellow, and are detailed as follows:

  * •

Create: Allows the creation of any type of Object (i.e. Agent, Obstacle, Goal,
or Preset);

  * •

Remove: Allows the removal of Objects present in the environment;

  * •

Move: Allows the user to move any Object present in the environment,
positioning it where he/she sees fit; and

  * •

Edit: Allows the user to edit any Object present in the environment. The
editable options depend on the type of Object. When editing an Agents object,
users can change the number of virtual agents to be spawned in that area, as
well as the Goal that these agents want to reach. When editing an Obstacle,
the user can change its size and rotation. Goals and Presets have no editing
options.

####  III-B3 General Actions

In WebCrowds we have five General Actions: Save Scene, Load Scene, Run Scene,
Camera Control and Reset Scene, as next detailed. All of them can be seen at
the top of Figure 2, highlighted in blue, where the Recycle Bin icon
represents the Reset action.

  * •

Save Scene: Allows the user to save the current environment into her/his
computer/device. All the Objects present in the environment are saved into a
JSON file and can be used in later simulations;

  * •

Load Scene: Allows the loading of a JSON file from the user’s computer/device.
Ideally, this JSON file is the same one that was generated with the Save Scene
action, but any JSON file can be used as long as it follows the same
information pattern;

  * •

Run Scene: Sends a request to the Server to run a simulation with the
environment built;

  * •

Camera Control: Allows the user to perform some actions concerning the camera,
such as Movement (with WASD keyboard keys), changing the Camera Speed (as
shown in Figure 2(a)) and Zoom in/Zoom out (using the mouse wheel); and

  * •

Reset Scene: Allows the user to clear the environment and start a new one,
being accessed by the Recycle Bin icon in Figure 2(a) (top-right).

(a) Editor’s interface. General Actions are available at the top of the UI,
highlighted in cyan; Object Action at the bottom-left, highlighted in yellow;
and Objects at the bottom-right, highlighted in purple.

(b) Preset selection screen. Five built-in presets are available, which behave
as unmodifiable Obstacles.

Figure 2: Editor’s User Interface. Objects, Object Actions, and General
Actions are presented in (a). The preset selection screen is presented in (b).

###  III-C Server

In WebCrowds, the Server is responsible for running the simulation defined in
the Editor, generating the Results, and sending them back to the Browser. The
simulation runs using the BioCrowds simulation model [5], developed in Python.
However, since the Server is decoupled from the Editor, any crowd simulation
method can be applied. Moreover, we also added a path planning algorithm (i.e.
A*), so agents can easily find their paths. In our current implementation, the
Database stores the position and size of all Objects, in addition to each
agent’s goal and trajectory.

As commented in the System Architecture (Section III-A), the results generated
by the Server are comprised of a Density Map, Agents’ Trajectory, and the
total Simulation Time. Figure 3 presents an example with Agents’ Trajectories
and Density Map figures generated by the Server. In Figure 3(a), it is
possible to see the two obstacles (orange and blue squares) that affect the
trajectories of the agents. Goals are represented as the blue points, and the
trajectories are represented as the red lines, one line for each agent.

Figure 3(b) presents an example of a Density Map, generated with the same
simulation which generated the trajectories from Figure 3(a). The color
density scale is presented on the right as a vertical color bar. It ranges
from deep blue to yellow, with deep blue denoting the spaces where no agents
were present and yellow the spaces with the highest concentration of agents.
Finally, we hosted our Server routine inside a Heroku free account.

(a) Agents’ Trajectories.

(b) Density Map.

Figure 3:  Results generated by the Server. Agents’ Trajectories 3(a) show the
trajectories of all agents of the simulation, while Density Map 3(b) shows the
concentration of agents in the environment.

##  IV User Experiment

A user experiment was designed to evaluate two main aspects of WebCrowds: (a)
”Is the system easy to use?”, and (b) ”Are the simulation results clear?”.
Users were presented with an online questionnaire (described in Table I),
where they were asked to open WebCrowds, perform tasks (e.g., creating a
simulation scenario and observing its results), and answer questions related
to these tasks. Participants over 18 years old of all backgrounds and
technical knowledge were invited, as volunteers, via social media to perform
the experiment and the entire process was made without the supervision of the
authors. The estimated duration of the experiment was 35 to 45 minutes.

Experts with knowledge of real-world public safety simulation scenarios (i.e.,
fire prevention and evacuation) also participated in the experiment. Experts
gave their consent to being recorded with screen capture and a webcam. The
goal was to evaluate the interface with application experts. After completing
the questionnaire, experts were interviewed and asked to comment on possible
features to employ WebCrowds as an assisting tool for public safety
professionals.

For this experiment, we defined some constraints. The simulation environment
was set to a default size of 30 by 30 meters, each Agents object was limited
to a maximum of 10 agents, and the entire Scene was limited to 100 agents
total. Obstacles were limited to a minimum size of 2 by 2 meters, and maximum
of 20 by 20.

###  IV-A Questionnaire

The online questionnaire starts with a brief description of the project, the
estimated duration, and the author’s contact information. Following ethical
guidelines for applying the questionnaire, all participants were asked if they
agreed to grant access to their answers and personal information regarding
age, gender, educational level, occupation, and prior experience with
technology and simulation tools333Project Estudos e Avaliações da Percepção
Humana em Personagens e Multidões Virtuais, number 46571721.6.0000.5336,
approved by the Ethics Committee of Pontifical Catholic University of Rio
Grande do Sul.. Given their agreement, participants were presented with
instructions to access WebCrowds.

The main portion of the questionnaire is divided into 7 steps. Each step is
composed of: a list of tasks to be performed in WebCrowds; statements
regarding the performed tasks. The steps are detailed next:

  * •

Step 1: Participants are free to interact with WebCrowds before performing
tasks;

  * •

Step 2: Participants should create one Agents and a Goal object. Set the Goal
of the Agents and run the simulation;

  * •

Step 3: Participants should create an Obstacle between the objects of the
previous step. Run the simulation;

  * •

Step 4: Participants should create any objects as desired and edit the
properties of Agents and Obstacles. Run the simulation;

  * •

Step 5: Participants should load a Preset and modify the scene as desired. Run
the simulation;

  * •

Step 6: Participants should save the Scene to a file, then, Clear the Scene.
Open the saved Scene and run the simulation; and

  * •

Step 7: Participants were asked to provide their final feedback on WebCrowds.

Table I presents the statements given to participants at each Step, for their
evaluation. Statements regarding the system being easy to use are marked with
a “*”, and statements regarding WebCrowds presenting clear results are marked
with a “º”. For each statement, participants gave their feedback using a five-
level Likert scale from Strongly Disagree (1) to Strongly Agree (5). From Step
2 until Step 6, it was also included the following questions that could be
answered with textual information:

  * •

“If you had any difficulty performing this step, please describe it”: an
optional text field;

  * •

“If you have any suggestions or comments regarding the tasks of this step,
please share”: an optional text field; and

  * •

“Do you wish to continue to the next steps?”: a Yes or No question, so the
participant may leave the experiment at any moment.

TABLE I: Table of statements presented to participants at each Stage of the questionnaire. Step | ID | Statement
---|---|---
1 | —— | No statements in this Step.
2 | S2-A* | Creating new objects is a simple process;
| S2-B* | Setting the Goal of an Agents object is a simple process.
| S2-Cº | The information on the Agents’ Trajectory is clear.
3 | S3-A* | Creating a new Obstacle is a simple process.
|  | S3-Bº
---

| The information on the Simulation Time has been
---
impacted by the added Obstacle.
|  | S3-Cº
---

| The information on the Agents’ Trajectory is clear
---
and consistent with the added Obstacle.
4 | S4-A* | Editing an object’s properties is a simple process.
|  | S4-Bº
---

| The information on the Agents’ Trajectory
---
is consistent with the built environment.
|  | S4-Cº
---

| The information on the Density Map clearly
---
indicates the areas most used by agents.
5 | S5-A* | Creating a Preset object is a simple process.
|  | S5-Bº
---

| The information on the Agents’ Trajectory
---
is consistent with the built environment.
|  | S5-Cº
---

| The information on the Density Map
---
clearly indicates the areas most used by agents.
| 6
---

| S6-Aº
---

| The results of this simulation are similar to the
---
results of the previous simulation.
7 | S7-A* | The tool is easy to use.
| S7-Bº | The results presented by the simulations are clear.
*Statements regarding a) Easy to Use.
ºStatements regarding b) Clear Results.

##  V Results and Discussion

The experiment had a total of 20 participants, being it 18 general users and 2
experts. Regarding the age of the participants: 3 participants (15%) were 18
to 20 years old; 11 (55%) were 21 to 29 years old; 2 (10%) were 30 to 39 years
old; 2 (10%) were 40 to 49 years old; 1 (5%) was 50 to 59 years old; and 1
(5%) was over 60 years old. Regarding gender: 11 participants were male (55%);
8 were female (40%); and 1 (5%) preferred to not self-identify. Participants
had varying degrees of experience with technology and simulation tools, as
presented in Figure 4. Although the majority of participants considered
themselves as having average or higher experience with technology, most of
them had little or no prior contact with simulation tools. Both expert users
considered themselves as having an average experience with both technology and
simulation tools.

Figure 4: Participants’ previous experience with technology and simulation
tools.

Table II presents the average and standard deviations for the answers of both
general users and experts, concerning all statements of the questionnaire. It
is important to remember that the Likert Scale varied from 1 to 5, thus, the
maximum possible Average is 5. It is possible to notice that the worst average
was scored by general users concerning S2-B (“Setting the Goal of an Agent’s
object is a simple process”). Indeed, looking at users’ feedback, this sub-
task was mentioned as the most frequent issue by the users: from the 20
participants, 7 commented about this topic. More details about the feedback of
the users are provided in Section V-A. Moreover, the highest standard
deviation was observed with general users in S5-B (“The information on the
Agents’ Trajectory is consistent with the built environment”). It suggests
that, although having a high average score (4.44), the results presented to
the users may have caused a little confusion. One of the participants
suggested that both maps (Density and Trajectories) could have more legends
and other types of indications. Finally, S3-A (“Creating a new Obstacle is a
simple process”) presented the highest average score (4.833) and lowest
standard deviation (0.383) for general users, which suggests that this sub-
task was the one that general users felt more comfortable with.

Concerning the experts’ evaluation, all the answers lay between 4 and 5 on the
Likert scale. Suggestions were also made and are presented in the next
section. Moreover, we can compare the results achieved by general users and
experts. In order to investigate if the answers vary too much between general
users and experts, we rely on the ANOVA test. The results reveal a uniformity
in the participants’ answers (F(4.19)=3.34,p=.07)), which suggest that both
general users and experts had similar impressions about WebCrowds. It may also
suggest that WebCrowds is, despite some limitations, simple enough for general
users to use and powerful enough to be used as a simulation tool by experts of
different areas.

TABLE II: Average and Standard Deviation of general users for all statements of the questionnaire. Lower values are underlined while the higher values are in bold. | General Users (18)
---|---
ID | Average | Std Dev
S2-A* | 4.55 | 0.78
S2-B* | 3.44 | 0.78
S2-Cº | 4.55 | 0.78
S3-A* | 4.83 | 0.38
S3-Bº | 4.55 | 0.78
S3-Cº | 4.72 | 0.75
S4-A* | 4.38 | 0.69
S4-Bº | 4.72 | 0.57
S4-Cº | 4.50 | 0.78
S5-A* | 4.50 | 0.78
S5-Bº | 4.44 | 1.04
S5-Cº | 4.77 | 0.42
S6-Aº | 4.50 | 0.98
S7-A* | 4.33 | 0.59
S7-Bº | 4.66 | 0.48
a) Easy to Use* | 4.34 | 0.87
b) Clear Resultsº | 4.60 | 0.75

###  V-A User Feedback

As described in Section IV-A, participants were free to provide feedback and
describe any difficulty they had when performing the tasks of a step. The most
frequent issue mentioned was regarding the task of setting a Goal for an
Agents object in Step 2. A total of 7 participants commented on this topic,
describing that the procedure could be streamlined by: having Agents select a
default Goal in the environment, which could later be edited by users; by
allowing objects to be edited in groups; and by giving clearer visual feedback
that a Goal is set to a given Agents object. The difficulty found in the task
is also apparent for participants that did not provide feedback, given that
the statement S2-B has the lowest average score and highest standard deviation
in Table II. Other suggestions were the inclusion of an interactive tutorial
for first-time users, undo-redo options, and combining the Move and Edit
Object Actions.

Concerning the comments made by the experts, they commented on two main topics
that they consider when designing and evaluating evacuation plans: the usage
of the space, related to the type of building (e.g. restaurant, shopping) and
its population; and units of passage, related to size and quantity of exits.
Large buildings with many people inside would require a higher number of units
of passage to increase the flow of people and achieve a certain evacuation
time, as defined by law. They also commented that additional signalization
(e.g. exit signs) is required if the maximum distance traveled during the
evacuation surpasses a given threshold. In order to employ our proposed model
as an assisting tool for these professionals, WebCrowds could provide an
average and maximum distance traveled by agents and allow the editing of the
size of Goals and usage of spaces within the Editor’s environment. The
inclusion of another type of Object (i.e. Sign) could also be provided,
allowing the user to include signalization in the environment.

##  VI Final Considerations

This paper presented WebCrowds, an authoring tool for crowd simulation that
can be used by anyone to build environments and simulate the movement of
agents. WebCrowds is divided into the Editor and the Server. The users have
access to the Editor, where they can freely build their own scene, run
simulations and receive the results. We conducted experiments with users, both
general and experts. The results of such experiments suggest that WebCrowds
was easy to use, delivered comprehensible simulation results back to the user,
and can be a valuable authoring tool for people to simulate the movement of
crowds. It can be integrated with game engines in two ways. First, the JSON
files generated by the editor contain the information of every object and can
be parsed to produce elements in a game level/scene. Second, the engine may
produce the information required to run a WebCrowds simulation, so developers
can evaluate the possible trajectories and densities of the agents in the
environment they are building.

WebCrowds has some limitations. There are already many extensions for
BioCrowds that could be used to enhance the behavior of the agents, like
personality [6] and emotion contagion [15]. Moreover, A* can make agents
choose to squeeze themselves in crowded places instead of looking for paths
with lower densities. One possible solution would be to use a dynamic path-
planner (e.g. D*), which would be able to change agents’ paths during the
simulation.

In future work, there are some avenues to explore. Further testing can be made
with game developers, exploring applications such as level design and path-
planning for virtual characters. Besides the metrics presented in this work as
results of the simulation (i.e. Density Map, Trajectories Map, and Simulation
Time), we could implement other metrics, such as average and maximum distance
traveled for agents. Moreover, identified limitations could be tackled and
mitigated, like agents’ behavior enhancing and dynamic path-planning. Finally,
we can use the feedback provided by the users to improve WebCrowds. For
instance, defining default Goals for Agents, defining size for Goals, and
allowing the edit of groups of objects.

## Acknowledgments

This work is partially supported by CNPq and CAPES.

## References

  * [1] S. R. Musse and D. Thalmann, “A model of human crowd behavior: Group inter-relationship and collision detection analysis,” in _Computer Animation and Simulation’97_. Springer, 1997, pp. 39–51.
  * [2] N. Pelechano, J. M. Allbeck, and N. I. Badler, “Controlling individual agents in high-density crowd simulation,” 2007.
  * [3] R. L. Hughes, “A continuum theory for the flow of pedestrians,” _Transportation Research Part B: Methodological_ , vol. 36, no. 6, pp. 507–535, 2002.
  * [4] A. D. Silva Antonitsch, D. H. M. Schaffer, G. W. Rockenbach, P. Knob, and S. R. Musse, “Bioclouds: A multi-level model to simulate and visualize large crowds,” in _Computer Graphics International Conference_. Springer, 2019, pp. 15–27.
  * [5] A. de Lima Bicho, R. A. Rodrigues, S. R. Musse, C. R. Jung, M. Paravisi, and L. P. Magalhães, “Simulating crowds based on a space colonization algorithm,” _Computers & Graphics_, vol. 36, no. 2, pp. 70–79, 2012.
  * [6] P. Knob, M. Balotin, and S. R. Musse, “Simulating crowds with ocean personality traits,” in _Proceedings of the 18th international conference on intelligent virtual agents_ , 2018, pp. 233–238.
  * [7] F. Durupınar, U. Güdükbay, A. Aman, and N. I. Badler, “Psychological parameters for crowd simulation: From audiences to mobs,” _IEEE transactions on visualization and computer graphics_ , vol. 22, no. 9, pp. 2145–2159, 2015.
  * [8] D. A. Suyikno and A. Setiawan, “Feasible npc hiding behaviour using goal oriented action planning in case of hide-and-seek 3d game simulation,” in _2019 Fourth International Conference on Informatics and Computing (ICIC)_. IEEE, 2019, pp. 1–6.
  * [9] G. F. Silva, P. Knob, D. A. Schlatter, C. G. Johansson, and S. R. Musse, “Moving virtual agents forward in space and time,” in _2020 19th Brazilian Symposium on Computer Games and Digital Entertainment (SBGames)_. IEEE, 2020, pp. 1–10.
  * [10] B. Ulicny, P. de Heras Ciechomski, and D. Thalmann, “Crowdbrush: interactive authoring of real-time crowd scenes,” in _International Conference on Computer Graphics and Interactive Techniques, SIGGRAPH 2005, Los Angeles, California, USA, July 31 - August 4, 2005, Courses_ , J. Fujii, Ed. ACM, 2005, p. 3. [Online]. Available: https://doi.org/10.1145/1198555.1198673
  * [11] C. Chen, S. Wong, and W. Liu, “Generation of small groups with rich behaviors from natural language interface,” _Comput. Animat. Virtual Worlds_ , vol. 31, no. 4-5, 2020. [Online]. Available: https://doi.org/10.1002/cav.1960
  * [12] W. Liu, S. Wong, and C. Chen, “A natural language interface with casual users for crowd animation,” _Comput. Animat. Virtual Worlds_ , vol. 31, no. 4-5, 2020. [Online]. Available: https://doi.org/10.1002/cav.1965
  * [13] A. Colas, W. van Toll, K. Zibrek, L. Hoyet, A.-H. Olivier, and J. Pettré, “Interaction fields: Intuitive sketch-based steering behaviors for crowd simulation,” _Computer Graphics Forum_ , vol. 41, no. 2, pp. 521–534, 2022\. [Online]. Available: https://onlinelibrary.wiley.com/doi/abs/10.1111/cgf.14491
  * [14] G. Kim and M. Sung, “Cor-sketchar: Cooperative sketch-based real-time augmented reality authoring tool for crowd simulation,” _Applied Sciences_ , vol. 12, no. 15, 2022. [Online]. Available: https://www.mdpi.com/2076-3417/12/15/7416
  * [15] A. Borges Fortes Neto, C. Pelachaud, and S. R. Musse, “Giving emotional contagion ability to virtual agents in crowds,” in _International Conference on Intelligent Virtual Agents_. Springer, 2017, pp. 63–72.